X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=vstf%2Fvstf%2Fagent%2Funittest%2Fenv%2Ftest_bridge_plugin.py;fp=vstf%2Fvstf%2Fagent%2Funittest%2Fenv%2Ftest_bridge_plugin.py;h=0000000000000000000000000000000000000000;hb=07fa6d43cf0ac1baf3cd67e741f474273fbd387d;hp=ac4eb26807a575674c5a8b23f22c5656ff82d16f;hpb=486719ea0024e683f4e90832e647becf3d5d5ab7;p=bottlenecks.git diff --git a/vstf/vstf/agent/unittest/env/test_bridge_plugin.py b/vstf/vstf/agent/unittest/env/test_bridge_plugin.py deleted file mode 100755 index ac4eb268..00000000 --- a/vstf/vstf/agent/unittest/env/test_bridge_plugin.py +++ /dev/null @@ -1,56 +0,0 @@ -""" -Created on 2015-10-12 - -@author: y00228926 -""" -import unittest - -from vstf.common.utils import check_call -from vstf.agent.unittest.env import model -from vstf.agent.env.vswitch_plugins import bridge_plugin -from vstf.agent.env.driver_plugins import manager - - -class Test(model.Test): - def setUp(self): - super(Test, self).setUp() - self.plugin = bridge_plugin.BridgePlugin() - self.dr_mgr = manager.DriverPluginManager() - self.br_cfg = { - "name": "br1", - "uplinks": [ - { - "bdf": self.bdf_of_eth[0], - }, - { - "bdf": self.bdf_of_eth[1], - } - ] - } - self.dr_mgr.clean() - self.dr_mgr.load(['ixgbe']) - - def tearDown(self): - super(Test, 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_br(self): - self.plugin.clean() - self.plugin.create_br(self.br_cfg) - self.assertTrue(self._check_br_exists(self.br_cfg['name'])) - self.plugin.clean() - self.assertFalse(self._check_br_exists(self.br_cfg['name'])) - - -if __name__ == "__main__": - import logging - - logging.basicConfig(level=logging.INFO) - LOG = logging.getLogger(__name__) - unittest.main()