#NEWLINE# @ lockutils . synchronized ( 'cisco-cfg-agent' , 'neutron-' ) #NEWLINE# def process_services( self , device_ids = None , removed_devices_info = None ) : #NEWLINE# #INDENT# "Process services managed by this config agent.\n\n        This method is invoked by any of three scenarios.\n\n        1. Invoked by a periodic task running every `RPC_LOOP_INTERVAL`\n        seconds. This is the most common scenario.\n        In this mode, the method is called without any arguments.\n\n        2. Called by the `_process_backlogged_hosting_devices()` as part of\n        the backlog processing task. In this mode, a list of device_ids\n        are passed as arguments. These are the list of backlogged\n        hosting devices that are now reachable and we want to sync services\n        on them.\n\n        3. Called by the `hosting_devices_removed()` method. This is when\n        the config agent has received a notification from the plugin that\n        some hosting devices are going to be removed. The payload contains\n        the details of the hosting devices and the associated neutron\n        resources on them which should be processed and removed.\n\n        To avoid race conditions with these scenarios, this function is\n        protected by a lock.\n\n        This method goes on to invoke `process_service()` on the\n        different service helpers.\n\n        :param device_ids : List of devices that are now available and needs\n         to be processed\n        :param removed_devices_info: Info about the hosting devices which\n        are going to be removed and details of the resources hosted on them.\n        Expected Format:\n                {\n                 'hosting_data': {'hd_id1': {'routers': [id1, id2, ...]},\n                                  'hd_id2': {'routers': [id3, id4, ...]}, ...},\n                 'deconfigure': True/False\n                }\n        :return: None\n        " #NEWLINE# LOG . debug ( 'Processing services started' ) #NEWLINE# if device_ids . routing_service_helper : #NEWLINE# #INDENT# self . routing_service_helper . process_service ( device_ids , removed_devices_info ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# LOG . warning ( _LW ( 'No routing service helper loaded' ) ) #NEWLINE# #UNINDENT# LOG . debug ( 'Processing services completed' )