Пример #1
0
 def _setup_rpc(self):
     self.context = context.get_admin_context_without_session()
     # Set GBP rpc API
     self.of_rpc = rpc.GBPServerRpcApi(rpc.TOPIC_OPFLEX)
     self.topic = topics.AGENT
     self.endpoints = [self]
     consumers = [[rpc.TOPIC_OPFLEX, rpc.ENDPOINT, topics.UPDATE]]
     self.connection = agent_rpc.create_consumers(
         self.endpoints, self.topic, consumers, start_listening=True)
Пример #2
0
    def setup_rpc(self):
        self.agent_id = 'opflex-agent-%s' % cfg.CONF.host
        self.context = context.get_admin_context_without_session()
        # Set GBP rpc API
        self.of_rpc = rpc.GBPServerRpcApi(rpc.TOPIC_OPFLEX)
        self.plugin_rpc = ovs.OVSPluginApi(topics.PLUGIN)
        self.sg_plugin_rpc = sg_rpc.SecurityGroupServerRpcApi(topics.PLUGIN)
        self.sg_agent = sg_rpc.SecurityGroupAgentRpc(
            self.context, self.sg_plugin_rpc, defer_refresh_firewall=True)

        self.state_rpc = agent_rpc.PluginReportStateAPI(topics.PLUGIN)
        self.topic = topics.AGENT
        self.endpoints = [self]
        consumers = [[topics.PORT, topics.UPDATE],
                     [topics.PORT, topics.DELETE],
                     [topics.SECURITY_GROUP, topics.UPDATE],
                     [topics.SUBNET, topics.UPDATE],
                     [rpc.TOPIC_OPFLEX, rpc.VRF, topics.UPDATE]]
        self.connection = agent_rpc.create_consumers(
            self.endpoints, self.topic, consumers, start_listening=False)
Пример #3
0
 def __init__(self):
     self.host = cfg.CONF.host
     self.agent_id = 'opflex-notify-agent-%s' % self.host
     self.context = context.get_admin_context_without_session()
     self.sockname = cfg.CONF.OPFLEX.opflex_notify_socket_path
     self.of_rpc = rpc.GBPServerRpcApi(rpc.TOPIC_OPFLEX)