pytest: Start integrating with existing libraries.

This is going to take more work, but getting somewhat closer.

Stop using pytest/helpers, they are replaced by libraries.

Existing libraries are often taking a command-line-args option
as easy way to pass something to various methods.  This will
have to be resolved to work with the way pytest wants to
run.

Much hard-coding needs to be removed, and specifically,
the 'set profile' logic is completley  not working.

Need to use library logic that can query the eq-id based
on name (and query eq-name based on serial port/ssh, perhaps).

Need to resolve how cmd-line can take multiple APs, but
each will have different eq-id.

Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
Ben Greear
2021-02-11 13:18:38 -08:00
parent 2ea71662c3
commit 55d9e99978
12 changed files with 236 additions and 109 deletions

View File

@@ -96,7 +96,7 @@ if equipment_id == "-1":
print("Found equipment ID: %s inventoryId: %s"%(e['id'], e['inventoryId']))
equipment_id = str(e['id'])
if equipment_id == -1:
if equipment_id == "-1":
print("ERROR: Could not find equipment-id.")
sys.exit(1)
@@ -166,11 +166,11 @@ print('Current Active AP FW from CLI:', ap_cli_fw)
##Compare Latest and Current AP FW and Upgrade
report_data = None
do_upgrade = cloud.should_upgrade_ap_fw(bearer, command_line_args, report_data, ap_image, fw_model, ap_cli_fw,
logger)
do_upgrade = cloud.should_upgrade_ap_fw(command_line_args.force_upgrade, command_line_args.skip_upgrade,
report_data, ap_image, fw_model, ap_cli_fw, logger)
cloudModel = cloud_sdk_models[model_id]
pf = cloud.do_upgrade_ap_fw(bearer, command_line_args, report_data, test_cases, client,
pf = cloud.do_upgrade_ap_fw(command_line_args, report_data, test_cases, client,
ap_image, cloudModel, model_id, jfrog_user, jfrog_pwd, rid,
customer_id, equipment_id, logger)