X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=vstf%2Fvstf%2Fagent%2Funittest%2Fenv%2Ftest_vs_plugin_manager.py;fp=vstf%2Fvstf%2Fagent%2Funittest%2Fenv%2Ftest_vs_plugin_manager.py;h=0000000000000000000000000000000000000000;hb=07fa6d43cf0ac1baf3cd67e741f474273fbd387d;hp=f78c3e7d2110a548d9285a6c5861da821966fdbd;hpb=486719ea0024e683f4e90832e647becf3d5d5ab7;p=bottlenecks.git diff --git a/vstf/vstf/agent/unittest/env/test_vs_plugin_manager.py b/vstf/vstf/agent/unittest/env/test_vs_plugin_manager.py deleted file mode 100755 index f78c3e7d..00000000 --- a/vstf/vstf/agent/unittest/env/test_vs_plugin_manager.py +++ /dev/null @@ -1,68 +0,0 @@ -""" -Created on 2015-9-24 - -@author: y00228926 -""" -import unittest - -from vstf.agent.unittest.env import model -from vstf.agent.env.vswitch_plugins import manager -from vstf.common.utils import check_call - - -class TestVsPlugins(model.Test): - def setUp(self): - super(TestVsPlugins, self).setUp() - self.cfg = { - "type": "ovs", - "name": "ovs1", - "uplinks": [ - { - "bdf": self.bdf_of_eth[0], - "vlan_mode": "trunk", - "vlan_id": "100,200,300,400" - }, - { - "bdf": self.bdf_of_eth[1], - "vlan_mode": "trunk", - "vlan_id": "100,200,300,400" - } - ], - "vtep": {} - } - self.mgr = manager.VswitchPluginManager() - - def tearDown(self): - super(TestVsPlugins, self).tearDown() - - def _check_br_exists(self, name): - try: - check_call('ifconfig %s' % name, shell=True) - except Exception, e: - return False - return True - - def test_create_bridge(self): - self.cfg['name'] = 'br1' - self.br = self.mgr.get_vs_plugin('bridge') - self.br.clean() - self.br.init() - self.br.create_br(self.cfg) - self.assertTrue(self._check_br_exists('br1')) - self.br.clean() - self.assertFalse(self._check_br_exists('br1')) - - def test_clean(self): - self.mgr.clean() - - def test_get_supported_plugins(self): - ret = self.mgr.get_supported_plugins() - self.assertEqual(set(ret), {'bridge', 'ovs'}) - - -if __name__ == "__main__": - import logging - - logging.basicConfig(level=logging.INFO) - LOG = logging.getLogger(__name__) - unittest.main()