def setUp(self): if 'v6' in self._testMethodName: self.skipTest("NVSD Plugin does not support IPV6.") def mocked_oneconvergence_init(self): def side_effect(*args, **kwargs): return {'id': str(uuid.uuid4())} self.nvsdlib = mock.Mock() self.nvsdlib.create_network.side_effect = side_effect test_sg_rpc.set_firewall_driver(test_sg_rpc.FIREWALL_HYBRID_DRIVER) notifier_cls = mock.patch(AGENTNOTIFIER).start() self.notifier = mock.Mock() notifier_cls.return_value = self.notifier self._attribute_map_bk_ = {} for item in attributes.RESOURCE_ATTRIBUTE_MAP: self._attribute_map_bk_[item] = (attributes. RESOURCE_ATTRIBUTE_MAP[item]. copy()) with mock.patch.object(nvsd_plugin.OneConvergencePluginV2, 'oneconvergence_init', new=mocked_oneconvergence_init): super(OneConvergenceSecurityGroupsTestCase, self).setUp(PLUGIN_NAME)
def setUp(self, plugin=None): test_sg_rpc.set_firewall_driver(test_sg_rpc.FIREWALL_HYBRID_DRIVER) notifier_p = mock.patch(NOTIFIER) notifier_cls = notifier_p.start() self.notifier = mock.Mock() notifier_cls.return_value = self.notifier self.useFixture(fixture.APIDefinitionFixture()) super(Ml2SecurityGroupsTestCase, self).setUp('ml2')
def setUp(self, plugin=None): test_sg_rpc.set_firewall_driver(test_sg_rpc.FIREWALL_HYBRID_DRIVER) notifier_p = mock.patch(NOTIFIER) notifier_cls = notifier_p.start() self.notifier = mock.Mock() notifier_cls.return_value = self.notifier self.useFixture(tools.AttributeMapMemento()) super(Ml2SecurityGroupsTestCase, self).setUp(PLUGIN_NAME)
def setUp(self, plugin=None): test_sg_rpc.set_firewall_driver(test_sg_rpc.FIREWALL_HYBRID_DRIVER) self.setup_config_files() self.setup_patches() self._attribute_map_bk_ = {} super(RestProxySecurityGroupsTestCase, self).setUp(self.plugin_str) self.setup_db() plugin = manager.NeutronManager.get_plugin() self.notifier = plugin.notifier self.rpc = plugin.endpoints[0] self.startHttpPatch()
def setUp(self, plugin=None): test_sg_rpc.set_firewall_driver(test_sg_rpc.FIREWALL_HYBRID_DRIVER) self.setup_config_files() self.setup_patches() self._attribute_map_bk_ = {} super(RestProxySecurityGroupsTestCase, self).setUp(self.plugin_str) self.setup_db() plugin = directory.get_plugin() self.notifier = plugin.notifier self.rpc = plugin.endpoints[0] self.startHttpPatch()
def setUp(self, plugin=None): test_sg_rpc.set_firewall_driver(test_sg_rpc.FIREWALL_HYBRID_DRIVER) notifier_p = mock.patch(NOTIFIER) notifier_cls = notifier_p.start() self.notifier = mock.Mock() notifier_cls.return_value = self.notifier self._attribute_map_bk_ = {} for item in attributes.RESOURCE_ATTRIBUTE_MAP: self._attribute_map_bk_[item] = ( attributes.RESOURCE_ATTRIBUTE_MAP[item].copy()) super(Ml2SecurityGroupsTestCase, self).setUp(PLUGIN_NAME)
def setUp(self, plugin=None): test_sg_rpc.set_firewall_driver(test_sg_rpc.FIREWALL_HYBRID_DRIVER) notifier_p = mock.patch(NOTIFIER) notifier_cls = notifier_p.start() self.notifier = mock.Mock() notifier_cls.return_value = self.notifier self._attribute_map_bk_ = {} for item in attributes.RESOURCE_ATTRIBUTE_MAP: self._attribute_map_bk_[item] = (attributes. RESOURCE_ATTRIBUTE_MAP[item]. copy()) super(Ml2SecurityGroupsTestCase, self).setUp(PLUGIN_NAME)
def setUp(self, plugin=None): test_sg_rpc.set_firewall_driver(test_sg_rpc.FIREWALL_HYBRID_DRIVER) self.plugin_notifier_p = mock.patch(NOTIFIER) self.setup_config_files() self.setup_patches() self.plugin_notifier_p.start() self._attribute_map_bk_ = {} test_sg.SecurityGroupDBTestCase.setUp(self, self.plugin_str) self.setup_db() plugin = directory.get_plugin() self.notifier = plugin.notifier self.rpc = plugin.endpoints[0] self.startHttpPatch()
def setUp(self, plugin=None): base.override_nvalues() test_sg_rpc.set_firewall_driver(test_sg_rpc.FIREWALL_HYBRID_DRIVER) mock.patch(NOTIFIER).start() mock.patch(OFC_MANAGER).start() self._attribute_map_bk_ = {} for item in attributes.RESOURCE_ATTRIBUTE_MAP: self._attribute_map_bk_[item] = ( attributes.RESOURCE_ATTRIBUTE_MAP[item].copy()) super(NecSecurityGroupsTestCase, self).setUp(PLUGIN_NAME) plugin = manager.NeutronManager.get_plugin() self.notifier = plugin.notifier self.rpc = plugin.callback_sg
def setUp(self, plugin=None): base.override_nvalues() test_sg_rpc.set_firewall_driver(test_sg_rpc.FIREWALL_HYBRID_DRIVER) mock.patch(NOTIFIER).start() mock.patch(OFC_MANAGER).start() self._attribute_map_bk_ = {} for item in attributes.RESOURCE_ATTRIBUTE_MAP: self._attribute_map_bk_[item] = (attributes. RESOURCE_ATTRIBUTE_MAP[item]. copy()) super(NecSecurityGroupsTestCase, self).setUp(PLUGIN_NAME) plugin = manager.NeutronManager.get_plugin() self.notifier = plugin.notifier self.rpc = plugin.callback_sg