Пример #1
0
    def __init__(self):
        self._drivers = []
        self.notification_api = resources_rpc.ResourcesPushRpcApi()
        self.rpc_notifications_required = False
        rpc_registry.provide(self._get_qos_policy_cb, resources.QOS_POLICY)
        # notify any registered QoS driver that we're ready, those will
        # call the driver manager back with register_driver if they
        # are enabled
        registry.notify(qos_consts.QOS_PLUGIN, events.AFTER_INIT, self)

        if self.rpc_notifications_required:
            self.push_api = resources_rpc.ResourcesPushRpcApi()
Пример #2
0
    def __init__(self, enable_rpc=False):
        self._drivers = []
        self.notification_api = resources_rpc.ResourcesPushRpcApi()
        #TODO(mangelajo): remove the enable_rpc parameter in Pike since
        #                 we only use it when a message_queue derived driver
        #                 is found in the notification_drivers
        self.rpc_notifications_required = enable_rpc
        rpc_registry.provide(self._get_qos_policy_cb, resources.QOS_POLICY)
        # notify any registered QoS driver that we're ready, those will
        # call the driver manager back with register_driver if they
        # are enabled
        registry.notify(qos_consts.QOS_PLUGIN, events.AFTER_INIT, self)

        if self.rpc_notifications_required:
            self.push_api = resources_rpc.ResourcesPushRpcApi()
Пример #3
0
 def setUp(self):
     super(ResourcesPushRpcApiTestCase, self).setUp()
     mock.patch.object(resources_rpc.n_rpc, 'get_client').start()
     mock.patch.object(resources_rpc, '_validate_resource_type').start()
     self.rpc = resources_rpc.ResourcesPushRpcApi()
     self.cctxt_mock = self.rpc.client.prepare.return_value
     self.resource_obj = _create_test_resource(self.context)
Пример #4
0
 def setUp(self):
     super(ResourcesPushRpcApiTestCase, self).setUp()
     mock.patch.object(resources_rpc.n_rpc, 'get_client').start()
     self.rpc = resources_rpc.ResourcesPushRpcApi()
     self.cctxt_mock = self.rpc.client.prepare.return_value
     mock.patch.object(version_manager, 'get_resource_versions',
                      return_value=set([TEST_VERSION])).start()
Пример #5
0
 def __init__(self):
     super(PortForwardingPlugin, self).__init__()
     self.push_api = resources_rpc.ResourcesPushRpcApi()
     self.l3_plugin = directory.get_plugin(constants.L3)
     self.core_plugin = directory.get_plugin()
     registry.publish(pf_consts.PORT_FORWARDING_PLUGIN, events.AFTER_INIT,
                      self)
Пример #6
0
 def __init__(self):
     super(NDPProxyPlugin, self).__init__()
     self.push_api = resources_rpc.ResourcesPushRpcApi()
     self.l3_plugin = directory.get_plugin(constants.L3)
     self.core_plugin = directory.get_plugin()
     LOG.info(
         "The router's 'enable_ndp_proxy' parameter's default value "
         "is %s", cfg.CONF.enable_ndp_proxy_by_default)
Пример #7
0
    def __init__(self):
        super(Plugin, self).__init__()
        self.push_api = resources_rpc.ResourcesPushRpcApi()
        self.l3_plugin = directory.get_plugin(constants.L3)
        self.core_plugin = directory.get_plugin()

        # Option allowed_conntrack_helpers is a list of key, value pairs.
        # The list can contain same key (conntrack helper module) multiple
        # times with a different value (protocol). Merge to a dictonary
        # with key (conntrack helper) and values (protocols) as a list.
        self.constraints = collections.defaultdict(list)
        for x in cfg.CONF.allowed_conntrack_helpers:
            self.constraints[next(iter(x.keys()))].append(
                next(iter(x.values())))
Пример #8
0
 def __init__(self):
     self._resource_rpc = resources_rpc.ResourcesPushRpcApi()
Пример #9
0
 def __init__(self):
     self._rpc_pusher = resources_rpc.ResourcesPushRpcApi()
     self._setup_change_handlers()
     LOG.debug("ML2 OVO RPC backend initialized.")
Пример #10
0
 def __init__(self):
     self.notification_api = resources_rpc.ResourcesPushRpcApi()
Пример #11
0
 def __init__(self):
     super(PortForwardingPlugin, self).__init__()
     self.push_api = resources_rpc.ResourcesPushRpcApi()
     self.l3_plugin = directory.get_plugin(constants.L3)
     self.core_plugin = directory.get_plugin()
Пример #12
0
 def __init__(self):
     self.notification_api = resources_rpc.ResourcesPushRpcApi()
     registry.provide(_get_qos_policy_cb, resources.QOS_POLICY)
Пример #13
0
    def __init__(self, service_plugin):
        super(BaGPipeBGPVPNDriver, self).__init__(service_plugin)

        self._push_rpc = resources_rpc.ResourcesPushRpcApi()
Пример #14
0
 def __init__(self):
     super(LocalIPPlugin, self).__init__()
     self._resource_rpc = resources_rpc.ResourcesPushRpcApi()
Пример #15
0
 def initialize(self):
     super(BaGPipeSfcDriver, self).initialize()
     self.rt_allocator = sfc_db.RTAllocator()
     self._push_rpc = resources_rpc.ResourcesPushRpcApi()