Beispiel #1
0
    def __init__(self, configfile=None):
        self.base_binding_dict = {
            portbindings.VIF_TYPE: portbindings.VIF_TYPE_OVS,
            portbindings.VIF_DETAILS: {portbindings.CAP_PORT_FILTER: False}}

        super(SdnvePluginV2, self).__init__()
        self.setup_rpc()
        self.sdnve_controller_select()
        if self.fake_controller:
            self.sdnve_client = sdnve_fake.FakeClient()
        else:
            self.sdnve_client = sdnve.Client()
Beispiel #2
0
    def setUp(self):
        super(TestSdnveApi, self).setUp()

        class MockKeystoneClient(object):
            def __init__(self, **kwargs):
                pass

            def get_tenant_name(self, id):
                return 'test tenant name'

        with mock.patch('neutron.plugins.ibm.sdnve_api.'
                        'KeystoneClient',
                        new=MockKeystoneClient):
            self.api = sdnve_api.Client()