mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 19:58:03 +00:00
lf_dataplane_test autopep8
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -180,14 +180,16 @@ class DataplaneTest(cv_test):
|
|||||||
|
|
||||||
blob_test = "dataplane-test-latest-"
|
blob_test = "dataplane-test-latest-"
|
||||||
|
|
||||||
self.rm_text_blob(self.config_name, blob_test) # To delete old config with same name
|
# To delete old config with same name
|
||||||
|
self.rm_text_blob(self.config_name, blob_test)
|
||||||
self.show_text_blob(None, None, False)
|
self.show_text_blob(None, None, False)
|
||||||
|
|
||||||
# Test related settings
|
# Test related settings
|
||||||
cfg_options = []
|
cfg_options = []
|
||||||
|
|
||||||
### HERE###
|
### HERE###
|
||||||
self.apply_cfg_options(cfg_options, self.enables, self.disables, self.raw_lines, self.raw_lines_file)
|
self.apply_cfg_options(cfg_options, self.enables,
|
||||||
|
self.disables, self.raw_lines, self.raw_lines_file)
|
||||||
|
|
||||||
# cmd line args take precedence and so come last in the cfg array.
|
# cmd line args take precedence and so come last in the cfg array.
|
||||||
if self.upstream != "":
|
if self.upstream != "":
|
||||||
@@ -215,7 +217,8 @@ class DataplaneTest(cv_test):
|
|||||||
self.pull_report, self.lf_host, self.lf_user, self.lf_password,
|
self.pull_report, self.lf_host, self.lf_user, self.lf_password,
|
||||||
cv_cmds, ssh_port=self.ssh_port, local_lf_report_dir=self.local_lf_report_dir,
|
cv_cmds, ssh_port=self.ssh_port, local_lf_report_dir=self.local_lf_report_dir,
|
||||||
graph_groups_file=self.graph_groups)
|
graph_groups_file=self.graph_groups)
|
||||||
self.rm_text_blob(self.config_name, blob_test) # To delete old config with same name
|
# To delete old config with same name
|
||||||
|
self.rm_text_blob(self.config_name, blob_test)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@@ -287,12 +290,14 @@ def main():
|
|||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
cv_add_base_parser(parser) # see cv_test_manager.py
|
cv_add_base_parser(parser) # see cv_test_manager.py
|
||||||
|
|
||||||
parser.add_argument('--json', help="--json <config.json> json input file", default="")
|
parser.add_argument(
|
||||||
parser.add_argument('--influx_json', help="--influx_json <influx_config.json> influx config json input file", default="")
|
'--json', help="--json <config.json> json input file", default="")
|
||||||
|
parser.add_argument(
|
||||||
|
'--influx_json', help="--influx_json <influx_config.json> influx config json input file", default="")
|
||||||
parser.add_argument("-u", "--upstream", type=str, default="",
|
parser.add_argument("-u", "--upstream", type=str, default="",
|
||||||
help="Upstream port for wifi capacity test ex. 1.1.eth2")
|
help="Upstream port for wifi capacity test ex. 1.1.eth2")
|
||||||
parser.add_argument("--station", type=str, default="",
|
parser.add_argument("--station", type=str, default="",
|
||||||
@@ -306,10 +311,11 @@ def main():
|
|||||||
help="Specify requested upload speed. Percentage of theoretical is also supported. Default: 0")
|
help="Specify requested upload speed. Percentage of theoretical is also supported. Default: 0")
|
||||||
parser.add_argument("--duration", default="",
|
parser.add_argument("--duration", default="",
|
||||||
help="Specify duration of each traffic run")
|
help="Specify duration of each traffic run")
|
||||||
parser.add_argument("--graph_groups", help="File to save graph_groups to", default=None)
|
parser.add_argument(
|
||||||
|
"--graph_groups", help="File to save graph_groups to", default=None)
|
||||||
parser.add_argument("--report_dir", default="")
|
parser.add_argument("--report_dir", default="")
|
||||||
parser.add_argument("--local_lf_report_dir", help="--local_lf_report_dir <where to pull reports to> default '' put where dataplane script run from",default="")
|
parser.add_argument("--local_lf_report_dir",
|
||||||
|
help="--local_lf_report_dir <where to pull reports to> default '' put where dataplane script run from", default="")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@@ -353,7 +359,6 @@ def main():
|
|||||||
json_data_tmp = [[x] for x in json_data["raw_line"]]
|
json_data_tmp = [[x] for x in json_data["raw_line"]]
|
||||||
args.raw_line = json_data_tmp
|
args.raw_line = json_data_tmp
|
||||||
|
|
||||||
|
|
||||||
# use influx json config file
|
# use influx json config file
|
||||||
if args.influx_json != "":
|
if args.influx_json != "":
|
||||||
try:
|
try:
|
||||||
@@ -376,27 +381,27 @@ def main():
|
|||||||
|
|
||||||
cv_base_adjust_parser(args)
|
cv_base_adjust_parser(args)
|
||||||
|
|
||||||
CV_Test = DataplaneTest(lf_host = args.mgr,
|
CV_Test = DataplaneTest(lf_host=args.mgr,
|
||||||
lf_port = args.port,
|
lf_port=args.port,
|
||||||
lf_user = args.lf_user,
|
lf_user=args.lf_user,
|
||||||
lf_password = args.lf_password,
|
lf_password=args.lf_password,
|
||||||
instance_name = args.instance_name,
|
instance_name=args.instance_name,
|
||||||
config_name = args.config_name,
|
config_name=args.config_name,
|
||||||
upstream = args.upstream,
|
upstream=args.upstream,
|
||||||
pull_report = args.pull_report,
|
pull_report=args.pull_report,
|
||||||
local_lf_report_dir = args.local_lf_report_dir,
|
local_lf_report_dir=args.local_lf_report_dir,
|
||||||
load_old_cfg = args.load_old_cfg,
|
load_old_cfg=args.load_old_cfg,
|
||||||
download_speed = args.download_speed,
|
download_speed=args.download_speed,
|
||||||
upload_speed = args.upload_speed,
|
upload_speed=args.upload_speed,
|
||||||
duration = args.duration,
|
duration=args.duration,
|
||||||
dut = args.dut,
|
dut=args.dut,
|
||||||
station = args.station,
|
station=args.station,
|
||||||
enables = args.enable,
|
enables=args.enable,
|
||||||
disables = args.disable,
|
disables=args.disable,
|
||||||
raw_lines = args.raw_line,
|
raw_lines=args.raw_line,
|
||||||
raw_lines_file = args.raw_lines_file,
|
raw_lines_file=args.raw_lines_file,
|
||||||
sets = args.set,
|
sets=args.set,
|
||||||
graph_groups = args.graph_groups,
|
graph_groups=args.graph_groups,
|
||||||
test_rig=args.test_rig
|
test_rig=args.test_rig
|
||||||
)
|
)
|
||||||
CV_Test.setup()
|
CV_Test.setup()
|
||||||
|
|||||||
Reference in New Issue
Block a user