X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=vstf%2Fvstf%2Fagent%2Funittest%2Fperf%2Ftest_vstfperf.py;fp=vstf%2Fvstf%2Fagent%2Funittest%2Fperf%2Ftest_vstfperf.py;h=0000000000000000000000000000000000000000;hb=07fa6d43cf0ac1baf3cd67e741f474273fbd387d;hp=30d7c7fddb9bd620377e9149a83e7359f15ae98d;hpb=486719ea0024e683f4e90832e647becf3d5d5ab7;p=bottlenecks.git diff --git a/vstf/vstf/agent/unittest/perf/test_vstfperf.py b/vstf/vstf/agent/unittest/perf/test_vstfperf.py deleted file mode 100755 index 30d7c7fd..00000000 --- a/vstf/vstf/agent/unittest/perf/test_vstfperf.py +++ /dev/null @@ -1,98 +0,0 @@ -""" -Created on 2015-9-28 - -@author: y00228926 -""" -import unittest - -from vstf.agent.perf.vstfperf import Vstfperf -from vstf.agent.unittest.perf import model - - -class Test(model.Model): - def setUp(self): - super(Test, self).setUp() - - for ns, dev, ip_setting in zip(self.ns_list, self.device_list, self.ip_setting_list): - net_dev = { - "namespace":ns, - "iface":dev, - 'ip_setting':ip_setting - } - self.mgr.config_dev(net_dev) - - self.start = { - "operation": "start", - "action": "send", - "tool": "netperf", - "params":{ - "namespace": self.ns_list[0], - "protocol": "tcp_lat", - "dst":[ - {"ip": self.ip_list[1]} - ], - "size": 64, - "threads": 1, - "time": 1, - }, - } - self.stop = { - "operation": "stop", - "action": "send", - "tool": "netperf", - "params":{ - "namespace": self.ns_list[1], - }, - } - - def tearDown(self): - super(Test, self).tearDown() - - def testNetperf(self): - perf = Vstfperf() - self.start['tool'] = 'netperf' - self.stop['tool'] = 'netperf' - self.start['action'] = 'receive' - self.start['operation'] = 'start' - self.start['params']['namespace'] = self.ns_list[1] - self.start['params']['protocol'] = 'udp_bw' - perf.run(**self.start) - self.start['action'] = 'send' - self.start['operation'] = 'start' - self.start['params']['namespace'] = self.ns_list[0] - perf.run(**self.start) - self.stop['action'] = 'send' - self.stop['operation'] = 'stop' - self.stop['params']['namespace'] = self.ns_list[0] - perf.run(**self.stop) - self.stop['action'] = 'receive' - self.stop['operation'] = 'stop' - self.stop['params']['namespace'] = self.ns_list[1] - perf.run(**self.stop) - - def testQperf(self): - perf = Vstfperf() - self.start['tool'] = 'qperf' - self.stop['tool'] = 'qperf' - self.start['action'] = 'receive' - self.start['operation'] = 'start' - self.start['params']['namespace'] = self.ns_list[1] - perf.run(**self.start) - self.start['action'] = 'send' - self.start['operation'] = 'start' - self.start['params']['namespace'] = self.ns_list[0] - perf.run(**self.start) - self.stop['action'] = 'send' - self.stop['operation'] = 'stop' - self.stop['params']['namespace'] = self.ns_list[0] - perf.run(**self.stop) - self.stop['action'] = 'receive' - self.stop['operation'] = 'stop' - self.stop['params']['namespace'] = self.ns_list[1] - perf.run(**self.stop) - - -if __name__ == "__main__": - import logging - logging.basicConfig(level = logging.DEBUG) - unittest.main() \ No newline at end of file