コード例 #1
0
ファイル: test_mech.py プロジェクト: Ebrink/networking-vpp
    def setUp(self):
        neutron.conf.plugins.ml2.config.register_ml2_plugin_opts(cfg.CONF)
        neutron.conf.agent.securitygroups_rpc.register_securitygroups_opts(
            cfg.CONF)
        config_opts.register_vpp_opts(cfg.CONF)

        super(EtcdAgentCommunicatorTestCases, self).setUp()
コード例 #2
0
ファイル: type_gpe.py プロジェクト: Ebrink/networking-vpp
 def initialize(self):
     try:
         config_opts.register_vpp_opts(cfg.CONF)
         self.segmentation_key = next(iter(self.primary_keys))
         self.gpe_vni_allocator = GpeVNIAllocator(
             self.model, cfg.CONF.ml2_vpp.gpe_vni_ranges)
     except nvpp_exc.GpeVNIRangeError:
         LOG.exception("Failed to parse gpe_vni_range from config. "
                       "Service terminated!")
         raise SystemExit()
コード例 #3
0
ファイル: test_etcdcom.py プロジェクト: fepan/networking-vpp
    def setUp(self, mock_event, mock_client, mock_make_client):
        super(EtcdAgentCommunicatorTestCase, self).setUp()

        mock_make_client.side_effect = self.etcd_client
        self.client = etcd.Client()

        config_opts.register_vpp_opts(cfg.CONF)
        compat.register_securitygroups_opts(cfg.CONF)

        def callback(host, port):
            pass
        self.agent_communicator = mech_vpp.EtcdAgentCommunicator(
            callback)
コード例 #4
0
 def initialize(self):
     try:
         config_opts.register_vpp_opts(cfg.CONF)
         gpe_vni_ranges = cfg.CONF.ml2_vpp.gpe_vni_ranges
         self.segmentation_key = next(iter(self.primary_keys))
         # A list of VNI tuples:(min_vni, max_vni) available for allocation
         self.gpe_ranges = []
         self.gpe_ranges.extend(self._parse_gpe_vni_ranges(gpe_vni_ranges))
         self.sync_allocations()
     except nvpp_exc.GpeVNIRangeError(vni_range=gpe_vni_ranges):
         LOG.exception("Failed to parse gpe_vni_ranges from config. "
                       "Service terminated!")
         raise SystemExit()
コード例 #5
0
    def setUp(self, mock_event, mock_client, mock_make_client):
        super(EtcdAgentCommunicatorTestCase, self).setUp()

        mock_make_client.side_effect = self.etcd_client
        self.client = etcd.Client()

        config_opts.register_vpp_opts(cfg.CONF)
        compat.register_securitygroups_opts(cfg.CONF)

        def callback(host, port):
            pass

        self.agent_communicator = mech_vpp.EtcdAgentCommunicator(callback)
コード例 #6
0
ファイル: mech_vpp.py プロジェクト: Ebrink/networking-vpp
    def initialize(self):
        config_opts.register_vpp_opts(cfg.CONF)
        neutron.conf.agent.securitygroups_rpc.register_securitygroups_opts(
            cfg.CONF)

        self.allowed_network_types = cfg.CONF.ml2_vpp.network_types

        self.communicator = EtcdAgentCommunicator(self.port_bind_complete)

        names = names = cfg.CONF.ml2_vpp.driver_extensions
        if names != '':
            self.mgr = ExtensionManager('networking_vpp.driver.extensions',
                                        names, MechDriverExtensionBase)
            self.mgr.call_all('run', self.communicator)
コード例 #7
0
ファイル: test_mech.py プロジェクト: naveenjoy/networking-vpp
    def setUp(self, mock_eventlet, mock_client, mock_make_client):
        compat.register_ml2_base_opts(cfg.CONF)
        compat.register_securitygroups_opts(cfg.CONF)
        config_opts.register_vpp_opts(cfg.CONF)

        mock_make_client.side_effect = self.etcd_client
        self.client = etcd.Client()

        cfg.CONF.set_override('mechanism_drivers', ['logger', 'vpp'], 'ml2')
        cfg.CONF.set_override('core_plugin',
                              'neutron.plugins.ml2.plugin.Ml2Plugin')
        core_plugin = cfg.CONF.core_plugin
        super(VPPMechanismDriverTestCase, self).setUp(plugin=core_plugin)
        self.mech = mech_vpp.VPPMechanismDriver()
        self.mech.initialize()
コード例 #8
0
ファイル: test_mech.py プロジェクト: fepan/networking-vpp
    def setUp(self, mock_eventlet, mock_client, mock_make_client):
        compat.register_ml2_base_opts(cfg.CONF)
        compat.register_securitygroups_opts(cfg.CONF)
        config_opts.register_vpp_opts(cfg.CONF)

        mock_make_client.side_effect = self.etcd_client
        self.client = etcd.Client()

        cfg.CONF.set_override('mechanism_drivers',
                              ['logger', 'vpp'], 'ml2')
        cfg.CONF.set_override('core_plugin',
                              'neutron.plugins.ml2.plugin.Ml2Plugin')
        core_plugin = cfg.CONF.core_plugin
        super(VPPMechanismDriverTestCase, self).setUp(plugin=core_plugin)
        self.mech = mech_vpp.VPPMechanismDriver()
        self.mech.initialize()
コード例 #9
0
    def setUp(self, mck):
        super(EtcdClientSecuredTestCase, self).setUp()

        mck.side_effect = self.fake_crypto

        config_opts.register_vpp_opts(cfg.CONF)
        cfg.CONF.ml2_vpp.jwt_controller_name_pattern = "etcd.*"
        cfg.CONF.ml2_vpp.jwt_node_private_key = "jwt_private_key.pem"
        cfg.CONF.ml2_vpp.jwt_node_cert = "jwt_node_cert.pem"
        cfg.CONF.ml2_vpp.jwt_ca_cert = "jwt_ca_cert.pem"
        cfg.CONF.ml2_vpp.jwt_signing = True
        cfg.CONF.ml2_vpp.jwt_max_duration = 0

        self.kdb = {}

        self.client_factory = etcdutils.EtcdClientFactory(cfg.CONF.ml2_vpp)
        self.client_factory.etcd_args['allow_reconnect'] = False
        self.client_factory.etcd_args['host'] = ''
        etcd_client = self.client_factory.client()
        self.client = etcdutils.SignedEtcdJSONWriter(etcd_client)
コード例 #10
0
    def setUp(self, mck):
        super(EtcdClientSecuredTestCase, self).setUp()

        mck.side_effect = self.fake_crypto

        config_opts.register_vpp_opts(cfg.CONF)
        cfg.CONF.ml2_vpp.jwt_controller_name_pattern = "etcd.*"
        cfg.CONF.ml2_vpp.jwt_node_private_key = "jwt_private_key.pem"
        cfg.CONF.ml2_vpp.jwt_node_cert = "jwt_node_cert.pem"
        cfg.CONF.ml2_vpp.jwt_ca_cert = "jwt_ca_cert.pem"
        cfg.CONF.ml2_vpp.jwt_signing = True
        cfg.CONF.ml2_vpp.jwt_max_duration = 0

        self.kdb = {}

        self.client_factory = etcdutils.EtcdClientFactory(cfg.CONF.ml2_vpp)
        self.client_factory.etcd_args['allow_reconnect'] = False
        self.client_factory.etcd_args['host'] = ''
        etcd_client = self.client_factory.client()
        self.client = etcdutils.SignedEtcdJSONWriter(etcd_client)
コード例 #11
0
    def initialize(self):
        config_opts.register_vpp_opts(cfg.CONF)
        compat.register_securitygroups_opts(cfg.CONF)

        self.communicator = EtcdAgentCommunicator(self.port_bind_complete)
コード例 #12
0
ファイル: test_mech.py プロジェクト: naveenjoy/networking-vpp
    def setUp(self):
        compat.register_ml2_base_opts(cfg.CONF)
        compat.register_securitygroups_opts(cfg.CONF)
        config_opts.register_vpp_opts(cfg.CONF)

        super(EtcdAgentCommunicatorTestCases, self).setUp()
コード例 #13
0
ファイル: test_mech.py プロジェクト: fepan/networking-vpp
    def setUp(self):
        compat.register_ml2_base_opts(cfg.CONF)
        compat.register_securitygroups_opts(cfg.CONF)
        config_opts.register_vpp_opts(cfg.CONF)

        super(EtcdAgentCommunicatorTestCases, self).setUp()