Example #1
0
 def setup_rpc(self):
     # RPC support
     self.topic = c_constants.DEVICE_MANAGER_PLUGIN
     self.conn = n_rpc.Connection()
     self.agent_notifiers[c_constants.AGENT_TYPE_CFG] = (
         devmgr_rpc_cfgagent_api.DeviceMgrCfgAgentNotifyAPI(self))
     self.endpoints = [devices_rpc.DeviceMgrCfgRpcCallback(self)]
     self.conn.create_consumer(self.topic, self.endpoints, fanout=False)
     self.conn.consume_in_threads()
 def __init__(self):
     super(TestCorePlugin, self).__init__()
     self.cfg_agent_scheduler = importutils.import_object(
         cfg.CONF.general.configuration_agent_scheduler_driver)
     self.agent_notifiers[cisco_constants.AGENT_TYPE_CFG] = (
         devmgr_rpc_cfgagent_api.DeviceMgrCfgAgentNotifyAPI(self))