mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-02 11:57:49 +00:00
cloudsdk: Support 'ping' api, add to debug scripts.
Easy way to find out what cloud version we are running. Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
@@ -10,7 +10,7 @@ parser = argparse.ArgumentParser(description="Query SDK Objects", add_help=False
|
||||
parser.add_argument("--type", type=str, help="Type of thing to query",
|
||||
choices=['profile', 'customer', 'location', 'equipment', 'portalUser',
|
||||
'status', 'client-sessions', 'client-info', 'alarm', 'service-metric',
|
||||
'event', 'firmware', 'all'],
|
||||
'event', 'firmware', 'ping', 'all'],
|
||||
default = "all")
|
||||
parser.add_argument("--cmd", type=str, help="Operation to do, default is 'get'",
|
||||
choices=['get', 'delete', 'child_of'],
|
||||
@@ -97,6 +97,17 @@ if qtype == 'all' or qtype == 'customer':
|
||||
logging.error(logging.traceback.format_exc())
|
||||
print("Failed to read Customer %i"%(customer_id))
|
||||
|
||||
if qtype == 'all' or qtype == 'ping':
|
||||
try:
|
||||
rv = base.cloud.ping(base.cloudSDK_url, base.bearer)
|
||||
print("Cloud Ping %s:"%(base.cloudSDK_url))
|
||||
#jobj = json.load(ssids)
|
||||
print(json.dumps(rv, indent=4, sort_keys=True))
|
||||
except Exception as ex:
|
||||
print(ex)
|
||||
logging.error(logging.traceback.format_exc())
|
||||
print("Failed to read Cloud Ping %i"%(base.cloudSDK_url))
|
||||
|
||||
if qtype == 'all' or qtype == 'firmware':
|
||||
try:
|
||||
rv = base.cloud.CloudSDK_images(base.command_line_args.model, base.cloudSDK_url, base.bearer)
|
||||
|
||||
Reference in New Issue
Block a user