python/cv: Start adding debugging to create_chamberview

Try to figure out why this doesn't work on testbed heather,
at the least, I think DUT is probably wrong in the resgresison
script.  More work is needed to get this working.

Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
Ben Greear
2022-01-30 20:18:02 -08:00
committed by shivam
parent b774389d54
commit 1da6d7d2f3
2 changed files with 31 additions and 5 deletions

View File

@@ -85,10 +85,13 @@ class cv_test(Realm):
def __init__(self,
lfclient_host="localhost",
lfclient_port=8080,
lf_report_dir=None
lf_report_dir=None,
debug_=False,
):
super().__init__(lfclient_host=lfclient_host,
lfclient_port=lfclient_port)
lfclient_port=lfclient_port,
debug_=debug_
)
self.lf_report_dir = lf_report_dir
self.report_name = None
@@ -440,6 +443,9 @@ class cv_test(Realm):
text_blob = "profile_link" + " " + Resources + " " + Profile + " " + Amount + " " + "\'DUT:" + " " + DUT \
+ " " + Dut_Radio + "\' " + Traffic + " " + Uses1 + "," + Uses2 + " " + Freq + " " + VLAN
if self.debug:
print("text-blob-line: %s" % (text_blob))
data = {
"type": "Network-Connectivity",
"name": scenario_name,

View File

@@ -36,6 +36,7 @@ import importlib
import argparse
import time
import re
from pprint import pprint
if sys.version_info[0] != 3:
print("This script requires Python 3")
@@ -51,10 +52,12 @@ class CreateChamberview(cv):
def __init__(self,
lfmgr="localhost",
port="8080",
_debug_on=False,
):
super().__init__(
lfclient_host=lfmgr,
lfclient_port=port,
debug_=_debug_on
)
self.lfmgr = lfmgr
self.port = port
@@ -71,9 +74,11 @@ class CreateChamberview(cv):
raw_line=None):
if raw_line:
print("creating %s scenario" % create_scenario)
print("creating %s scenario using raw lines" % create_scenario)
for create_lines in raw_line:
self.pass_raw_lines_to_cv(create_scenario, create_lines[0])
ln = create_lines[0]
#print("ln: %s" % (ln))
self.pass_raw_lines_to_cv(create_scenario, ln)
# check for lines
if line:
@@ -90,7 +95,13 @@ class CreateChamberview(cv):
Freq = "-1"
VLAN = ""
#print("line: ")
#pprint(line)
for item in line:
#print("item: ")
#pprint(item)
if " " in item[0]:
item[0] = (re.split(' ', item[0]))
elif "," in item[0]:
@@ -99,8 +110,10 @@ class CreateChamberview(cv):
print("Wrong arguments entered !")
exit(1)
print("creating %s scenario" % scenario_name)
for sub_item in item[0]:
#print("sub-item: ")
#pprint(sub_item)
sub_item = sub_item.split("=")
if sub_item[0] == "Resource" or str(
sub_item[0]) == "Res" or sub_item[0] == "R":
@@ -212,9 +225,16 @@ def main():
default=False,
action='store_true',
help="delete scenario (by default: False)")
parser.add_argument('--debug',
'-d',
default=False,
action="store_true",
help='Enable debugging')
args = parser.parse_args()
Create_Chamberview = CreateChamberview(lfmgr=args.lfmgr,
_debug_on=args.debug,
port=args.port,
)
if args.delete_scenario: