diff options
author | liyin <liyin11@huawei.com> | 2017-05-08 09:04:32 +0000 |
---|---|---|
committer | liyin <liyin11@huawei.com> | 2017-05-10 11:16:02 +0000 |
commit | 6a8257127b3dce1f18a650afe6921a34b6c6f5b8 (patch) | |
tree | bfb2d60c1ce3f6688b92e5787818f222d620f52e /testsuites/vstf/vstf_scripts/vstf/agent/spirent | |
parent | 2d9642a33a6a58f53aceba4ff3d6242f191f25f0 (diff) |
Delete testcase of rubbos and vstf.
JIRA:BOTTLENECK-167
This patch will delete vstf and rubbos testcase code.
Include some testcase config file,
if there will be someone who want to use this testcase
maybe B or C version code will contain those testcase.
if you use the D version code to run this two testcase
we will info you that:
Rubbos testsuite is not updating anymore.
This entrance for running Rubbos within Bottlenecks is no longer supported.
Change-Id: I04e4042ff3998b3696df2ed47a9ffab6f1620ec3
Signed-off-by: liyin <liyin11@huawei.com>
Diffstat (limited to 'testsuites/vstf/vstf_scripts/vstf/agent/spirent')
3 files changed, 0 insertions, 728 deletions
diff --git a/testsuites/vstf/vstf_scripts/vstf/agent/spirent/__init__.py b/testsuites/vstf/vstf_scripts/vstf/agent/spirent/__init__.py deleted file mode 100644 index 83b8d15d..00000000 --- a/testsuites/vstf/vstf_scripts/vstf/agent/spirent/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## diff --git a/testsuites/vstf/vstf_scripts/vstf/agent/spirent/spirent.py b/testsuites/vstf/vstf_scripts/vstf/agent/spirent/spirent.py deleted file mode 100644 index ff2af1f8..00000000 --- a/testsuites/vstf/vstf_scripts/vstf/agent/spirent/spirent.py +++ /dev/null @@ -1,334 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - - -import Tkinter - - -def build_cmd(*args): - cmd = '' - for arg in args: - cmd = cmd + str(arg) + ' ' - #import pdb - # pdb.set_trace() - return cmd - - -class stcPython(): - - def __init__(self): - self.tclsh = Tkinter.Tcl() - self.stcpkg = '/home/Spirent_TestCenter_4.46/Spirent_TestCenter_Application_Linux' - self.tclsh.eval( - "set auto_path [ linsert $auto_path 0 %s ]" % - (self.stcpkg)) - self.tclsh.eval("package require SpirentTestCenter") - - def build_cmd(self, *args): - cmd = '' - for arg in args: - cmd = cmd + str(arg) + ' ' - return cmd - - # [ stc base interface ] - def stc_init(self, *args): - cmd = build_cmd('stc::init', *args) - return self.tclsh.eval(cmd) - # stc connect - - def stc_connect(self, *args): - cmd = build_cmd('stc::connect', *args) - return self.tclsh.eval(cmd) - # stc disconnect - - def stc_disconnect(self, *args): - cmd = build_cmd('stc::disconnect', *args) - return self.tclsh.eval(cmd) - # stc create - - def stc_create(self, *args): - cmd = build_cmd('stc::create', *args) - return self.tclsh.eval(cmd) - # stc delete - - def stc_delete(self, *args): - cmd = build_cmd('stc::delete', *args) - return self.tclsh.eval(cmd) - # stc config - - def stc_config(self, *args): - cmd = build_cmd('stc::config', *args) - return self.tclsh.eval(cmd) - # stc get - - def stc_get(self, *args): - cmd = build_cmd('stc::get', *args) - return self.tclsh.eval(cmd) - # stc apply - - def stc_apply(self, *args): - cmd = build_cmd('stc::apply', *args) - return self.tclsh.eval(cmd) - # stc perform - - def stc_perform(self, *args): - cmd = build_cmd('stc::perform', *args) - return self.tclsh.eval(cmd) - # stc reserve - - def stc_reserve(self, *args): - cmd = build_cmd('stc::reserve', *args) - return self.tclsh.eval(cmd) - # stc release - - def stc_release(self, *args): - cmd = build_cmd('stc::release', *args) - return self.tclsh.eval(cmd) - # stc subscribe - - def stc_subscribe(self, *args): - cmd = build_cmd('stc::subscribe', *args) - return self.tclsh.eval(cmd) - # stc unsubscribe - - def stc_unsubscribe(self, *args): - cmd = build_cmd('stc::unsubscribe', *args) - return self.tclsh.eval(cmd) - # stc wait until sequencer complete - - def stc_waituntilcomplete(self, *args): - cmd = build_cmd('stc::waituntilcomplete', *args) - return self.tclsh.eval(cmd) - # stc help - - def stc_help(self, *args): - cmd = build_cmd('stc::help', *args) - return self.tclsh.eval(cmd) - - # [ stc expand interface ] - # get one dict-key's value - # return value - def stc_get_value(self, stc_dict, stc_key): - cmd = stc_dict + ' -' + stc_key - return self.stc_get(cmd) - # create project - # return: project_name - - def stc_create_project(self): - return self.stc_create('project') - # create port under project - # return: port name - - def stc_create_port(self, project_name): - cmd = 'port -under ' + project_name - return self.stc_create(cmd) - # config port location - # return: None - - def stc_config_port_location(self, port_name, chassisAddress, slot, port): - #import pdb - # pdb.set_trace() - cmd = port_name + ' -location //' + chassisAddress + \ - '/' + slot + '/' + port + ' -UseDefaultHost False' - return self.stc_config(cmd) - # create streamblock under port - # return: streamblock name - - def stc_create_streamblock( - self, - port_name, - vlan_tag, - ExpectedRxPort, - srcMac, - dstMac, - sourceAddr, - destAddr): - #import pdb - # pdb.set_trace() - if vlan_tag is None or vlan_tag == 'None': - frameStruc = '"EthernetII IPv4 Udp"' - if ExpectedRxPort == '': - return self.stc_create( - 'streamBlock -under ', - port_name, - '-frameConfig ', - frameStruc, - '-frame "EthernetII.srcMac', - srcMac, - 'EthernetII.dstMac', - dstMac, - 'IPv4.1.sourceAddr', - sourceAddr, - 'IPv4.1.destAddr', - destAddr, - '"') - else: - return self.stc_create( - 'streamBlock -under ', - port_name, - '-ExpectedRxPort', - ExpectedRxPort, - '-frameConfig ', - frameStruc, - '-frame "EthernetII.srcMac', - srcMac, - 'EthernetII.dstMac', - dstMac, - 'IPv4.1.sourceAddr', - sourceAddr, - 'IPv4.1.destAddr', - destAddr, - '"') - else: - frameStruc = '"EthernetII Vlan IPv4 Udp"' - if ExpectedRxPort == '': - return self.stc_create( - 'streamBlock -under ', - port_name, - '-frameConfig ' + - frameStruc, - '-frame "EthernetII.srcMac', - srcMac, - 'EthernetII.dstMac', - dstMac, - 'Vlan.1.id', - vlan_tag, - 'IPv4.1.sourceAddr', - sourceAddr, - 'IPv4.1.destAddr', - destAddr, - '"') - else: - return self.stc_create( - 'streamBlock -under ', - port_name, - '-ExpectedRxPort', - ExpectedRxPort, - '-frameConfig ' + - frameStruc, - '-frame "EthernetII.srcMac', - srcMac, - 'EthernetII.dstMac', - dstMac, - 'Vlan.1.id', - vlan_tag, - 'IPv4.1.sourceAddr', - sourceAddr, - 'IPv4.1.destAddr', - destAddr, - '"') - # config streamblock with part arguments - # argument list use args dictionary - - def stc_config_streamblock(self, streamblock_name, args_dict): - cmd = '' - for key in args_dict.keys(): - temp_cmd = '-' + key + ' ' + str(args_dict[key]) - cmd = cmd + temp_cmd - return self.stc_config(streamblock_name, cmd) - # get generator name from port name - # return: generator name - - def stc_get_generator(self, port_name): - cmd = port_name + ' -children-generator' - return self.stc_get(cmd) - # config generator with part arguments - # argument list use args dictionary - # return none - - def stc_config_generator(self, generator_name, args_dict): - cmd = '' - for key in args_dict.keys(): - temp_cmd = '-' + key + ' ' + str(args_dict[key]) - cmd = cmd + temp_cmd - return self.stc_config(generator_name, cmd) - # attach port - # return: port's parent project info - - def stc_attach_ports(self, portList): - cmd = 'AttachPorts -portList {' - for port in portList: - cmd = cmd + ' ' + port - cmd = cmd + '} -autoConnect TRUE' - return self.stc_perform(cmd) - # config src mac and dst mac - # return: none - - def stc_config_ethII(self, ethII, src_mac, dst_mac): - cmd = ethII + ' -srcMac ' + src_mac + ' -dstMac ' + dst_mac - return self.stc_config(cmd) - # config src ip and dst ip - # return: none - - def stc_config_ethIII(self, ethIII, src_ip, dst_ip): - cmd = ethIII + ' -sourceAddr ' + src_ip + ' -destAddr ' + dst_ip - return self.stc_config(cmd) - # start streamblock - # return: none - - def stc_streamblock_start(self, streamblock_list): - cmd = 'StreamBlockStart -StreamBlockList {' - for streamblock in streamblock_list: - cmd = cmd + ' ' + streamblock - cmd = cmd + ' } -ExecuteSynchronous TRUE' - return self.stc_perform(cmd) - # stop streamblock - - def stc_streamblock_stop(self, streamblock_list): - cmd = 'StreamBlockStop -StreamBlockList {' - for streamblock in streamblock_list: - cmd = cmd + ' ' + streamblock - cmd = cmd + ' } -ExecuteSynchronous TRUE' - return self.stc_perform(cmd) - # start generator - # return: none - - def stc_generator_start(self, generator_List): - cmd = 'GeneratorStart -generatorList {' - for generator in generator_List: - cmd = cmd + ' ' + generator - cmd = cmd + ' }' - return self.stc_perform(cmd) - # stop generator - # return: none - - def stc_generator_stop(self, generator_List): - cmd = 'GeneratorStop -generatorList {' - for generator in generator_List: - cmd = cmd + ' ' + generator - cmd = cmd + ' }' - return self.stc_perform(cmd) - # create rfc2544 throughput test - - def stc_setup_rfc2544_throughput(self): - pass - # create rfc2544 frameloss test - - def stc_setup_rfc2544_frameloss(self): - pass - # create rfc2544 latency test - - def stc_setup_rfc2544_latency(self): - pass - # start Sequence start - - def stc_sequence_start(self): - return self.stc_perform('SequencerStart') - # output rfc2544 throughput result - - def stc_get_rfc2544_throughput_result(self): - pass - # output rfc2544 frameloss result - - def stc_get_rfc2544_frameloss_result(self): - pass - # output rfc2544 latency result - - def stc_get_rfc2544_latency_result(self): - pass diff --git a/testsuites/vstf/vstf_scripts/vstf/agent/spirent/tools.py b/testsuites/vstf/vstf_scripts/vstf/agent/spirent/tools.py deleted file mode 100644 index 0936d39d..00000000 --- a/testsuites/vstf/vstf_scripts/vstf/agent/spirent/tools.py +++ /dev/null @@ -1,386 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - - -import time -from spirent import stcPython - - -class Spirent_Tools(object): - baseAPI = stcPython() - - def __init__(self): - """This class provide API of Spirent - - """ - super(Spirent_Tools, self).__init__() - - def send_packet(self, flow): - try: - #import pdb - # pdb.set_trace() - flow = eval(flow) - # stc init action - self.baseAPI.stc_perform(' ResetConfig -config system1') - self.baseAPI.stc_init() - # create project - project = self.baseAPI.stc_create_project() - # create port - port_handle = self.baseAPI.stc_create_port(project) - # config port - slot = flow['send_port'].split('/')[0] - port = flow['send_port'].split('/')[1] - self.baseAPI.stc_config_port_location( - port_handle, flow['tester_ip'], slot, port) - # create streamblock - streamblock_handle = self.baseAPI.stc_create_streamblock( - port_name=port_handle, - ExpectedRxPort='', - vlan_tag=flow['vlan'], - srcMac=flow['src_mac'], - dstMac=flow['dst_mac'], - sourceAddr=flow['src_ip'], - destAddr=flow['dst_ip'] - ) - # attach port - port_list = [port_handle] - self.baseAPI.stc_attach_ports(port_list) - # start streamblock - streamblock_list = [streamblock_handle] - flag = self.baseAPI.stc_streamblock_start(streamblock_list) - return str(streamblock_list).strip('[]') - except: - print("[ERROR]create stream block and send packet failed.") - return False - - def mac_learning(self, flowA, flowB): - try: - #import pdb - # pdb.set_trace() - flowA = eval(flowA) - flowB = eval(flowB) - port_list = [] - streamblock_list = [] - # stc init action - self.baseAPI.stc_perform(' ResetConfig -config system1') - self.baseAPI.stc_init() - # create project - project = self.baseAPI.stc_create_project() - # create port and config port - for flow in [flowA, flowB]: - flow['port_handle'] = self.baseAPI.stc_create_port(project) - tmp_test_ip = flow['tester_ip'] - tmp_slot = flow['send_port'].split('/')[0] - tmp_port = flow['send_port'].split('/')[1] - self.baseAPI.stc_config_port_location( - flow['port_handle'], tmp_test_ip, tmp_slot, tmp_port) - # create streamblock - flow['streamblock'] = self.baseAPI.stc_create_streamblock( - port_name=flow['port_handle'], - ExpectedRxPort='', - vlan_tag=flow['vlan'], - srcMac=flow['src_mac'], - dstMac=flow['dst_mac'], - sourceAddr=flow['src_ip'], - destAddr=flow['dst_ip']) - # create port and stream block list - port_list.append(flow['port_handle']) - streamblock_list.append(flow['streamblock']) - - # attach port - self.baseAPI.stc_attach_ports(port_list) - # start streamblock - flag = self.baseAPI.stc_streamblock_start(streamblock_list) - # mac learning - time.sleep(2) - # stop stream block - self.baseAPI.stc_streamblock_stop(streamblock_list) - # delete streamblock and release port - for flow in [flowA, flowB]: - tmp_test_ip = flow['tester_ip'] - tmp_slot = flow['send_port'].split('/')[0] - tmp_port = flow['send_port'].split('/')[1] - self.baseAPI.stc_delete(flow['streamblock']) - self.baseAPI.stc_release( - '%s/%s/%s' % - (tmp_test_ip, tmp_slot, tmp_port)) - # delete project - self.baseAPI.stc_delete('project1') - ret = self.baseAPI.stc_perform('ResetConfig -config system1') - return True - except: - print("[ERROR]mac learning failed") - return False - - def stop_flow(self, streamblock_list, flow): - flow = eval(flow) - streamblock_list = streamblock_list.strip('\'').split(',') - # stop streamblock list - try: - ret = self.baseAPI.stc_streamblock_stop(streamblock_list) - except: - print("[ERROR]Stop the streamblock list failed.") - return False - # delete streamblock - try: - for streamblock in streamblock_list: - ret = self.baseAPI.stc_delete(streamblock) - except: - print("[ERROR]delete stream block.") - return False - # release port - try: - slot = flow['send_port'].split('/')[0] - port = flow['send_port'].split('/')[1] - ret = self.baseAPI.stc_release( - '%s/%s/%s' % - (flow['tester_ip'], slot, port)) - except: - print("[ERROR]Release port failed") - return False - # delete project - try: - ret = self.baseAPI.stc_delete('project1') - ret = self.baseAPI.stc_perform('ResetConfig -config system1') - return True - except: - print("[ERROR]Delete project1 failed.") - return False - - def run_rfc2544_throughput(self, forward_init_flows, reverse_init_flows): - #import pdb - # pdb.set_trace() - # rebuild the flows - forward_init_flows = eval(forward_init_flows) - reverse_init_flows = eval(reverse_init_flows) - # stc init action - self.baseAPI.stc_perform(' ResetConfig -config system1') - self.baseAPI.stc_init() - # create project - project = self.baseAPI.stc_create_project() - # create sequencer - seq_handle = self.baseAPI.stc_create('Sequencer -under %s' % (project)) - # create port handle - forward_port_handle = self.baseAPI.stc_create_port(project) - reverse_port_handle = self.baseAPI.stc_create_port(project) - # create forward flow streamblock - for key in forward_init_flows.keys(): - forward_init_flows[key]['port_handle'] = forward_port_handle - tmp_test_ip = forward_init_flows[key]['tester_ip'] - tmp_slot = forward_init_flows[key]['send_port'].split('/')[0] - tmp_port = forward_init_flows[key]['send_port'].split('/')[1] - self.baseAPI.stc_config_port_location( - forward_init_flows[key]['port_handle'], tmp_test_ip, tmp_slot, tmp_port) - # create streamblock - forward_init_flows[key]['streamblock'] = self.baseAPI.stc_create_streamblock( - port_name=forward_init_flows[key]['port_handle'], - vlan_tag=forward_init_flows[key]['vlan'], - ExpectedRxPort=reverse_port_handle, - srcMac=forward_init_flows[key]['src_mac'], - dstMac=forward_init_flows[key]['dst_mac'], - sourceAddr=forward_init_flows[key]['src_ip'], - destAddr=forward_init_flows[key]['dst_ip']) - # create reverse flow streamblock - for key in reverse_init_flows.keys(): - reverse_init_flows[key]['port_handle'] = reverse_port_handle - tmp_test_ip = reverse_init_flows[key]['tester_ip'] - tmp_slot = reverse_init_flows[key]['send_port'].split('/')[0] - tmp_port = reverse_init_flows[key]['send_port'].split('/')[1] - self.baseAPI.stc_config_port_location( - reverse_init_flows[key]['port_handle'], tmp_test_ip, tmp_slot, tmp_port) - # create streamblock - reverse_init_flows[key]['streamblock'] = self.baseAPI.stc_create_streamblock( - port_name=reverse_init_flows[key]['port_handle'], - vlan_tag=reverse_init_flows[key]['vlan'], - ExpectedRxPort=forward_port_handle, - srcMac=reverse_init_flows[key]['src_mac'], - dstMac=reverse_init_flows[key]['dst_mac'], - sourceAddr=reverse_init_flows[key]['src_ip'], - destAddr=reverse_init_flows[key]['dst_ip']) - # Create the RFC 2544 throughput test - throughput_config = self.baseAPI.stc_create( - 'Rfc2544ThroughputConfig -under ', - project, - '-AcceptableFrameLoss 0.01', - '-NumOfTrials 1', - '-DurationSeconds 60', - '-SearchMode BINARY', - '-RateLowerLimit 1', - '-RateUpperLimit 100', - '-RateInitial 10', - '-UseExistingStreamBlocks True', - '-EnableLearning False', - '-FrameSizeIterationMode CUSTOM', - '-CustomFrameSizeList "70 128 256 512 1024 1280 1518"', - '-LatencyType LIFO', - '-EnableJitterMeasurement TRUE') - #import pdb - # pdb.set_trace() - # list streamblocks - streamblock_list = '" ' - for key in forward_init_flows.keys(): - streamblock_list = streamblock_list + \ - forward_init_flows[key]['streamblock'] + ' ' - for key in reverse_init_flows.keys(): - streamblock_list = streamblock_list + \ - reverse_init_flows[key]['streamblock'] + ' ' - streamblock_list = streamblock_list + '"' - - throughput_sbProfile = self.baseAPI.stc_create( - 'Rfc2544StreamBlockProfile -under ' + - throughput_config + - ' -Active TRUE -LocalActive TRUE') - self.baseAPI.stc_config( - throughput_sbProfile, - '-StreamBlockList ' + - streamblock_list) - self.baseAPI.stc_perform( - 'ExpandBenchmarkConfigCommand', - '-config ', - throughput_config) - - # attach the port before testing - port_list = [forward_port_handle, reverse_port_handle] - self.baseAPI.stc_attach_ports(port_list) - - # stc apply and begin to sequence test - self.baseAPI.stc_apply() - self.baseAPI.stc_perform("SequencerStart") - - # wait until complete - self.baseAPI.stc_waituntilcomplete() - - # get result db - resultsdb = self.baseAPI.stc_get( - "system1.project.TestResultSetting", - "-CurrentResultFileName") - results_dict = self.baseAPI.stc_perform( - 'QueryResult', - '-DatabaseConnectionString', - resultsdb, - '-ResultPath RFC2544ThroughputTestResultDetailedSummaryView') - # print results_dict - return True, results_dict - - def run_rfc2544_frameloss(self, forward_init_flows, reverse_init_flows): - #import pdb - # pdb.set_trace() - # rebuild the flows - forward_init_flows = eval(forward_init_flows) - reverse_init_flows = eval(reverse_init_flows) - # stc init action - self.baseAPI.stc_perform(' ResetConfig -config system1') - self.baseAPI.stc_init() - # create project - project = self.baseAPI.stc_create_project() - # create sequencer - seq_handle = self.baseAPI.stc_create('Sequencer -under %s' % (project)) - # create port handle - forward_port_handle = self.baseAPI.stc_create_port(project) - reverse_port_handle = self.baseAPI.stc_create_port(project) - # create forward flow streamblock - for key in forward_init_flows.keys(): - forward_init_flows[key]['port_handle'] = forward_port_handle - tmp_test_ip = forward_init_flows[key]['tester_ip'] - tmp_slot = forward_init_flows[key]['send_port'].split('/')[0] - tmp_port = forward_init_flows[key]['send_port'].split('/')[1] - self.baseAPI.stc_config_port_location( - forward_init_flows[key]['port_handle'], tmp_test_ip, tmp_slot, tmp_port) - # create streamblock - forward_init_flows[key]['streamblock'] = self.baseAPI.stc_create_streamblock( - port_name=forward_init_flows[key]['port_handle'], - vlan_tag=forward_init_flows[key]['vlan'], - ExpectedRxPort=reverse_port_handle, - srcMac=forward_init_flows[key]['src_mac'], - dstMac=forward_init_flows[key]['dst_mac'], - sourceAddr=forward_init_flows[key]['src_ip'], - destAddr=forward_init_flows[key]['dst_ip']) - # create reverse flow streamblock - for key in reverse_init_flows.keys(): - reverse_init_flows[key]['port_handle'] = reverse_port_handle - tmp_test_ip = reverse_init_flows[key]['tester_ip'] - tmp_slot = reverse_init_flows[key]['send_port'].split('/')[0] - tmp_port = reverse_init_flows[key]['send_port'].split('/')[1] - self.baseAPI.stc_config_port_location( - reverse_init_flows[key]['port_handle'], tmp_test_ip, tmp_slot, tmp_port) - # create streamblock - reverse_init_flows[key]['streamblock'] = self.baseAPI.stc_create_streamblock( - port_name=reverse_init_flows[key]['port_handle'], - vlan_tag=reverse_init_flows[key]['vlan'], - ExpectedRxPort=forward_port_handle, - srcMac=reverse_init_flows[key]['src_mac'], - dstMac=reverse_init_flows[key]['dst_mac'], - sourceAddr=reverse_init_flows[key]['src_ip'], - destAddr=reverse_init_flows[key]['dst_ip']) - # Create the RFC 2544 frameloss test - frameloss_config = self.baseAPI.stc_create( - 'Rfc2544FrameLossConfig -under ', - project, - '-NumOfTrials 1 ', - '-DurationSeconds 60 ', - '-LoadUnits PERCENT_LINE_RATE ', - '-LoadType CUSTOM ' - '-CustomLoadList 100 ' - '-UseExistingStreamBlocks True ', - '-EnableLearning False ', - '-FrameSizeIterationMode CUSTOM ', - '-CustomFrameSizeList "70 128 256 512 1024 1280 1518"', - '-LatencyType LIFO', - '-EnableJitterMeasurement TRUE') - #import pdb - # pdb.set_trace() - # list streamblocks - streamblock_list = '" ' - for key in forward_init_flows.keys(): - streamblock_list = streamblock_list + \ - forward_init_flows[key]['streamblock'] + ' ' - for key in reverse_init_flows.keys(): - streamblock_list = streamblock_list + \ - reverse_init_flows[key]['streamblock'] + ' ' - streamblock_list = streamblock_list + '"' - - frameloss_sbProfile = self.baseAPI.stc_create( - 'Rfc2544StreamBlockProfile -under ' + - frameloss_config + - ' -Active TRUE -LocalActive TRUE') - self.baseAPI.stc_config( - frameloss_sbProfile, - '-StreamBlockList ' + - streamblock_list) - self.baseAPI.stc_perform( - 'ExpandBenchmarkConfigCommand', - '-config ', - frameloss_config) - - # attach the port before testing - port_list = [forward_port_handle, reverse_port_handle] - self.baseAPI.stc_attach_ports(port_list) - - # stc apply and begin to sequence test - self.baseAPI.stc_apply() - self.baseAPI.stc_perform("SequencerStart") - - # wait until complete - self.baseAPI.stc_waituntilcomplete() - - # get result db - resultsdb = self.baseAPI.stc_get( - "system1.project.TestResultSetting", - "-CurrentResultFileName") - results_dict = self.baseAPI.stc_perform( - 'QueryResult', - '-DatabaseConnectionString', - resultsdb, - '-ResultPath RFC2544FrameLossTestResultDetailedSummaryView') - #import pdb - # pdb.set_trace() - return True, results_dict - - def run_rfc2544_latency(self, forward_init_flows, reverse_init_flows): - pass |