catocli 2.0.2__py3-none-any.whl → 2.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of catocli might be problematic. Click here for more details.
- catocli/Utils/clidriver.py +4 -1
- catocli/__init__.py +1 -1
- catocli/parsers/custom/__init__.py +4 -3
- catocli/parsers/custom/customLib.py +239 -1
- catocli/parsers/custom/export_rules/__init__.py +2 -0
- catocli/parsers/custom/export_rules/export_rules.py +30 -6
- catocli/parsers/custom/export_sites/__init__.py +1 -0
- catocli/parsers/custom/export_sites/export_sites.py +194 -55
- catocli/parsers/custom/import_rules_to_tf/__init__.py +1 -1
- catocli/parsers/custom/import_rules_to_tf/import_rules_to_tf.py +1 -137
- catocli/parsers/custom/import_sites_to_tf/__init__.py +45 -0
- catocli/parsers/custom/import_sites_to_tf/import_sites_to_tf.py +891 -0
- catocli/parsers/mutation_accountManagement/__init__.py +6 -6
- catocli/parsers/mutation_admin/__init__.py +6 -6
- catocli/parsers/mutation_container/__init__.py +2 -2
- catocli/parsers/mutation_hardware/__init__.py +2 -2
- catocli/parsers/mutation_policy/__init__.py +192 -192
- catocli/parsers/mutation_sandbox/__init__.py +4 -4
- catocli/parsers/mutation_site/__init__.py +56 -56
- catocli/parsers/mutation_sites/__init__.py +56 -56
- catocli/parsers/mutation_xdr/__init__.py +6 -6
- catocli/parsers/parserApiClient.py +199 -12
- catocli/parsers/query_accountBySubdomain/__init__.py +2 -2
- catocli/parsers/query_accountManagement/__init__.py +2 -2
- catocli/parsers/query_accountMetrics/__init__.py +2 -2
- catocli/parsers/query_accountRoles/__init__.py +2 -2
- catocli/parsers/query_accountSnapshot/__init__.py +2 -2
- catocli/parsers/query_admin/__init__.py +2 -2
- catocli/parsers/query_admins/__init__.py +2 -2
- catocli/parsers/query_appStats/__init__.py +2 -2
- catocli/parsers/query_appStatsTimeSeries/__init__.py +2 -2
- catocli/parsers/query_auditFeed/__init__.py +2 -2
- catocli/parsers/query_catalogs/__init__.py +2 -2
- catocli/parsers/query_container/__init__.py +2 -2
- catocli/parsers/query_devices/__init__.py +2 -2
- catocli/parsers/query_entityLookup/__init__.py +2 -2
- catocli/parsers/query_events/__init__.py +2 -2
- catocli/parsers/query_eventsFeed/__init__.py +2 -2
- catocli/parsers/query_eventsTimeSeries/__init__.py +2 -2
- catocli/parsers/query_hardware/__init__.py +2 -2
- catocli/parsers/query_hardwareManagement/__init__.py +2 -2
- catocli/parsers/query_licensing/__init__.py +2 -2
- catocli/parsers/query_policy/__init__.py +2 -2
- catocli/parsers/query_sandbox/__init__.py +2 -2
- catocli/parsers/query_site/__init__.py +2 -2
- catocli/parsers/query_siteLocation/__init__.py +2 -2
- catocli/parsers/query_subDomains/__init__.py +2 -2
- catocli/parsers/query_xdr/__init__.py +4 -4
- catocli/parsers/raw/README.md +18 -0
- catocli/parsers/raw/__init__.py +5 -2
- {catocli-2.0.2.dist-info → catocli-2.0.4.dist-info}/METADATA +1 -1
- {catocli-2.0.2.dist-info → catocli-2.0.4.dist-info}/RECORD +57 -55
- schema/catolib.py +14 -9
- {catocli-2.0.2.dist-info → catocli-2.0.4.dist-info}/LICENSE +0 -0
- {catocli-2.0.2.dist-info → catocli-2.0.4.dist-info}/WHEEL +0 -0
- {catocli-2.0.2.dist-info → catocli-2.0.4.dist-info}/entry_points.txt +0 -0
- {catocli-2.0.2.dist-info → catocli-2.0.4.dist-info}/top_level.txt +0 -0
|
@@ -6,29 +6,46 @@ from graphql_client import ApiClient, CallApi
|
|
|
6
6
|
from graphql_client.api_client import ApiException
|
|
7
7
|
import logging
|
|
8
8
|
import pprint
|
|
9
|
+
import uuid
|
|
10
|
+
from urllib3.filepost import encode_multipart_formdata
|
|
9
11
|
|
|
10
12
|
def createRequest(args, configuration):
|
|
11
13
|
params = vars(args)
|
|
12
14
|
instance = CallApi(ApiClient(configuration))
|
|
13
15
|
operationName = params["operation_name"]
|
|
14
16
|
operation = loadJSON("models/"+operationName+".json")
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
variablesObj = {}
|
|
18
|
+
if params["json"] and not params["t"]:
|
|
19
|
+
try:
|
|
20
|
+
variablesObj = json.loads(params["json"])
|
|
21
|
+
except ValueError as e:
|
|
22
|
+
print("ERROR: Query argument must be valid json in quotes. ",e,'\n\nExample: \'{"yourKey":"yourValue"}\'')
|
|
23
|
+
exit()
|
|
24
|
+
elif not params["t"] and params["json"] is None:
|
|
25
|
+
# Default to empty object if no json provided and not using -t flag
|
|
26
|
+
variablesObj = {}
|
|
20
27
|
if "accountId" in operation["args"]:
|
|
21
28
|
variablesObj["accountId"] = configuration.accountID
|
|
22
29
|
else:
|
|
23
30
|
variablesObj["accountID"] = configuration.accountID
|
|
24
|
-
|
|
31
|
+
if params["t"]==True:
|
|
32
|
+
# Skip validation when using -t flag
|
|
33
|
+
isOk = True
|
|
34
|
+
else:
|
|
35
|
+
isOk, invalidVars, message = validateArgs(variablesObj,operation)
|
|
25
36
|
if isOk==True:
|
|
26
37
|
body = generateGraphqlPayload(variablesObj,operation,operationName)
|
|
27
38
|
if params["t"]==True:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
39
|
+
# Load query from queryPayloads file
|
|
40
|
+
try:
|
|
41
|
+
queryPayloadFile = "queryPayloads/" + operationName + ".json"
|
|
42
|
+
queryPayload = loadJSON(queryPayloadFile)
|
|
43
|
+
if queryPayload and "query" in queryPayload:
|
|
44
|
+
print(queryPayload["query"])
|
|
45
|
+
else:
|
|
46
|
+
print("ERROR: Query not found in " + queryPayloadFile)
|
|
47
|
+
except Exception as e:
|
|
48
|
+
print("ERROR: Could not load query from " + queryPayloadFile + ": " + str(e))
|
|
32
49
|
return None
|
|
33
50
|
else:
|
|
34
51
|
try:
|
|
@@ -37,7 +54,13 @@ def createRequest(args, configuration):
|
|
|
37
54
|
return e
|
|
38
55
|
else:
|
|
39
56
|
print("ERROR: "+message,", ".join(invalidVars))
|
|
40
|
-
|
|
57
|
+
try:
|
|
58
|
+
queryPayloadFile = "queryPayloads/" + operationName + ".json"
|
|
59
|
+
queryPayload = loadJSON(queryPayloadFile)
|
|
60
|
+
print("\nExample: catocli "+operationName.replace(".", " "), json.dumps(queryPayload['variables']))
|
|
61
|
+
except Exception as e:
|
|
62
|
+
print("ERROR: Could not load query from " + queryPayloadFile + ": " + str(e))
|
|
63
|
+
|
|
41
64
|
def querySiteLocation(args, configuration):
|
|
42
65
|
params = vars(args)
|
|
43
66
|
operationName = params["operation_name"]
|
|
@@ -110,6 +133,14 @@ def querySiteLocation(args, configuration):
|
|
|
110
133
|
|
|
111
134
|
def createRawRequest(args, configuration):
|
|
112
135
|
params = vars(args)
|
|
136
|
+
# Handle endpoint override
|
|
137
|
+
if hasattr(args, 'endpoint') and args.endpoint:
|
|
138
|
+
configuration.host = args.endpoint
|
|
139
|
+
|
|
140
|
+
# Check if binary/multipart mode is enabled
|
|
141
|
+
if hasattr(args, 'binary') and args.binary:
|
|
142
|
+
return createRawBinaryRequest(args, configuration)
|
|
143
|
+
|
|
113
144
|
instance = CallApi(ApiClient(configuration))
|
|
114
145
|
isOk = False
|
|
115
146
|
try:
|
|
@@ -189,6 +220,7 @@ def validateArgs(variablesObj,operation):
|
|
|
189
220
|
isOk = False
|
|
190
221
|
invalidVars.append('"'+varName+'"')
|
|
191
222
|
message = "Invalid argument names. Looking for: "+", ".join(list(operation["operationArgs"].keys()))
|
|
223
|
+
|
|
192
224
|
if isOk==True:
|
|
193
225
|
for varName in operation["operationArgs"]:
|
|
194
226
|
if operation["operationArgs"][varName]["required"] and varName not in variablesObj:
|
|
@@ -309,4 +341,159 @@ def renderArgsAndFields(responseArgStr, variablesObj, curOperation, definition,
|
|
|
309
341
|
responseArgStr += indent + " }\n"
|
|
310
342
|
responseArgStr += indent + "}\n"
|
|
311
343
|
responseArgStr += "\n"
|
|
312
|
-
|
|
344
|
+
return responseArgStr
|
|
345
|
+
|
|
346
|
+
def createRawBinaryRequest(args, configuration):
|
|
347
|
+
"""Handle multipart/form-data requests for file uploads and binary content"""
|
|
348
|
+
params = vars(args)
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
# Parse the JSON body
|
|
352
|
+
try:
|
|
353
|
+
body = json.loads(params["json"])
|
|
354
|
+
except ValueError as e:
|
|
355
|
+
print("ERROR: JSON argument must be valid json. ", e)
|
|
356
|
+
return
|
|
357
|
+
except Exception as e:
|
|
358
|
+
print("ERROR: ", e)
|
|
359
|
+
return
|
|
360
|
+
|
|
361
|
+
# Build form data
|
|
362
|
+
form_fields = {}
|
|
363
|
+
files = []
|
|
364
|
+
|
|
365
|
+
# Add the operations field containing the GraphQL payload
|
|
366
|
+
form_fields['operations'] = json.dumps(body)
|
|
367
|
+
|
|
368
|
+
# Handle file mappings if files are specified
|
|
369
|
+
if hasattr(args, 'files') and args.files:
|
|
370
|
+
# Build the map object for file uploads
|
|
371
|
+
file_map = {}
|
|
372
|
+
for i, (field_name, file_path) in enumerate(args.files):
|
|
373
|
+
file_index = str(i + 1)
|
|
374
|
+
file_map[file_index] = [field_name]
|
|
375
|
+
|
|
376
|
+
# Read file content
|
|
377
|
+
try:
|
|
378
|
+
with open(file_path, 'rb') as f:
|
|
379
|
+
file_content = f.read()
|
|
380
|
+
files.append((file_index, (os.path.basename(file_path), file_content, 'application/octet-stream')))
|
|
381
|
+
except IOError as e:
|
|
382
|
+
print(f"ERROR: Could not read file {file_path}: {e}")
|
|
383
|
+
return
|
|
384
|
+
|
|
385
|
+
# Add the map field
|
|
386
|
+
form_fields['map'] = json.dumps(file_map)
|
|
387
|
+
|
|
388
|
+
# Test mode - just print the request structure
|
|
389
|
+
if params.get("t") == True:
|
|
390
|
+
print("Multipart form data request:")
|
|
391
|
+
if params.get("p") == True:
|
|
392
|
+
print(f"Operations: {json.dumps(json.loads(form_fields.get('operations')), indent=2)}")
|
|
393
|
+
else:
|
|
394
|
+
print(f"Operations: {form_fields.get('operations')}")
|
|
395
|
+
if 'map' in form_fields:
|
|
396
|
+
print(f"Map: {form_fields.get('map')}")
|
|
397
|
+
if files:
|
|
398
|
+
print(f"Files: {[f[0] + ': ' + f[1][0] for f in files]}")
|
|
399
|
+
return None
|
|
400
|
+
|
|
401
|
+
# Perform the multipart request
|
|
402
|
+
try:
|
|
403
|
+
return sendMultipartRequest(configuration, form_fields, files, params)
|
|
404
|
+
except Exception as e:
|
|
405
|
+
# Safely handle exception string conversion
|
|
406
|
+
try:
|
|
407
|
+
error_str = str(e)
|
|
408
|
+
except Exception:
|
|
409
|
+
error_str = f"Exception of type {type(e).__name__}"
|
|
410
|
+
|
|
411
|
+
if params.get("v") == True:
|
|
412
|
+
import traceback
|
|
413
|
+
print(f"ERROR: Failed to send multipart request: {error_str}")
|
|
414
|
+
traceback.print_exc()
|
|
415
|
+
else:
|
|
416
|
+
print(f"ERROR: Failed to send multipart request: {error_str}")
|
|
417
|
+
return None
|
|
418
|
+
|
|
419
|
+
def sendMultipartRequest(configuration, form_fields, files, params):
|
|
420
|
+
"""Send a multipart/form-data request directly using urllib3"""
|
|
421
|
+
import urllib3
|
|
422
|
+
|
|
423
|
+
# Create pool manager
|
|
424
|
+
pool_manager = urllib3.PoolManager(
|
|
425
|
+
cert_reqs='CERT_NONE' if not getattr(configuration, 'verify_ssl', False) else 'CERT_REQUIRED'
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
# Prepare form data
|
|
429
|
+
fields = []
|
|
430
|
+
for key, value in form_fields.items():
|
|
431
|
+
fields.append((key, value))
|
|
432
|
+
|
|
433
|
+
for file_key, (filename, content, content_type) in files:
|
|
434
|
+
fields.append((file_key, (filename, content, content_type)))
|
|
435
|
+
|
|
436
|
+
# Encode multipart data
|
|
437
|
+
body_data, content_type = encode_multipart_formdata(fields)
|
|
438
|
+
|
|
439
|
+
# Prepare headers
|
|
440
|
+
headers = {
|
|
441
|
+
'Content-Type': content_type,
|
|
442
|
+
'User-Agent': f"Cato-CLI-v{getattr(configuration, 'version', 'unknown')}"
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
# Add API key if not using headers file
|
|
446
|
+
if hasattr(configuration, 'api_key') and hasattr(configuration, 'api_key') and configuration.api_key and 'x-api-key' in configuration.api_key:
|
|
447
|
+
headers['x-api-key'] = configuration.api_key['x-api-key']
|
|
448
|
+
|
|
449
|
+
# Add custom headers
|
|
450
|
+
if hasattr(configuration, 'custom_headers') and configuration.custom_headers:
|
|
451
|
+
headers.update(configuration.custom_headers)
|
|
452
|
+
|
|
453
|
+
# Verbose output
|
|
454
|
+
if params.get("v") == True:
|
|
455
|
+
print(f"Host: {getattr(configuration, 'host', 'unknown')}")
|
|
456
|
+
masked_headers = headers.copy()
|
|
457
|
+
if 'x-api-key' in masked_headers:
|
|
458
|
+
masked_headers['x-api-key'] = '***MASKED***'
|
|
459
|
+
print(f"Request Headers: {json.dumps(masked_headers, indent=4, sort_keys=True)}")
|
|
460
|
+
print(f"Content-Type: {content_type}")
|
|
461
|
+
print(f"Form fields: {list(form_fields.keys())}")
|
|
462
|
+
print(f"Files: {[f[0] for f in files]}\n")
|
|
463
|
+
|
|
464
|
+
try:
|
|
465
|
+
# Make the request
|
|
466
|
+
resp = pool_manager.request(
|
|
467
|
+
'POST',
|
|
468
|
+
getattr(configuration, 'host', 'https://api.catonetworks.com/api/v1/graphql'),
|
|
469
|
+
body=body_data,
|
|
470
|
+
headers=headers
|
|
471
|
+
)
|
|
472
|
+
|
|
473
|
+
# Parse response
|
|
474
|
+
if resp.status < 200 or resp.status >= 300:
|
|
475
|
+
reason = resp.reason if resp.reason is not None else "Unknown Error"
|
|
476
|
+
error_msg = f"HTTP {resp.status}: {reason}"
|
|
477
|
+
if resp.data:
|
|
478
|
+
try:
|
|
479
|
+
error_msg += f"\n{resp.data.decode('utf-8')}"
|
|
480
|
+
except Exception:
|
|
481
|
+
error_msg += f"\n{resp.data}"
|
|
482
|
+
print(f"ERROR: {error_msg}")
|
|
483
|
+
return None
|
|
484
|
+
|
|
485
|
+
try:
|
|
486
|
+
response_data = json.loads(resp.data.decode('utf-8'))
|
|
487
|
+
except json.JSONDecodeError:
|
|
488
|
+
response_data = resp.data.decode('utf-8')
|
|
489
|
+
|
|
490
|
+
return [response_data]
|
|
491
|
+
|
|
492
|
+
except Exception as e:
|
|
493
|
+
# Safely handle exception string conversion
|
|
494
|
+
try:
|
|
495
|
+
error_str = str(e)
|
|
496
|
+
except Exception:
|
|
497
|
+
error_str = f"Exception of type {type(e).__name__}"
|
|
498
|
+
print(f"ERROR: Network/request error: {error_str}")
|
|
499
|
+
return None
|
|
@@ -6,9 +6,9 @@ def query_accountBySubdomain_parse(query_subparsers):
|
|
|
6
6
|
help='accountBySubdomain() query operation',
|
|
7
7
|
usage=get_help("query_accountBySubdomain"))
|
|
8
8
|
|
|
9
|
-
query_accountBySubdomain_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_accountBySubdomain_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_accountBySubdomain_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_accountBySubdomain_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_accountBySubdomain_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_accountBySubdomain_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_accountBySubdomain_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_accountBySubdomain_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_accountManagement_parse(query_subparsers):
|
|
|
6
6
|
help='accountManagement() query operation',
|
|
7
7
|
usage=get_help("query_accountManagement"))
|
|
8
8
|
|
|
9
|
-
query_accountManagement_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_accountManagement_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_accountManagement_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_accountManagement_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_accountManagement_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_accountManagement_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_accountManagement_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_accountManagement_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_accountMetrics_parse(query_subparsers):
|
|
|
6
6
|
help='accountMetrics() query operation',
|
|
7
7
|
usage=get_help("query_accountMetrics"))
|
|
8
8
|
|
|
9
|
-
query_accountMetrics_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_accountMetrics_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_accountMetrics_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_accountMetrics_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_accountMetrics_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_accountMetrics_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_accountMetrics_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_accountMetrics_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_accountRoles_parse(query_subparsers):
|
|
|
6
6
|
help='accountRoles() query operation',
|
|
7
7
|
usage=get_help("query_accountRoles"))
|
|
8
8
|
|
|
9
|
-
query_accountRoles_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_accountRoles_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_accountRoles_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_accountRoles_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_accountRoles_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_accountRoles_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_accountRoles_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_accountRoles_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_accountSnapshot_parse(query_subparsers):
|
|
|
6
6
|
help='accountSnapshot() query operation',
|
|
7
7
|
usage=get_help("query_accountSnapshot"))
|
|
8
8
|
|
|
9
|
-
query_accountSnapshot_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_accountSnapshot_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_accountSnapshot_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_accountSnapshot_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_accountSnapshot_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_accountSnapshot_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_accountSnapshot_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_accountSnapshot_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_admin_parse(query_subparsers):
|
|
|
6
6
|
help='admin() query operation',
|
|
7
7
|
usage=get_help("query_admin"))
|
|
8
8
|
|
|
9
|
-
query_admin_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_admin_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_admin_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_admin_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_admin_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_admin_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_admin_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_admin_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_admins_parse(query_subparsers):
|
|
|
6
6
|
help='admins() query operation',
|
|
7
7
|
usage=get_help("query_admins"))
|
|
8
8
|
|
|
9
|
-
query_admins_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_admins_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_admins_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_admins_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_admins_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_admins_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_admins_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_admins_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_appStats_parse(query_subparsers):
|
|
|
6
6
|
help='appStats() query operation',
|
|
7
7
|
usage=get_help("query_appStats"))
|
|
8
8
|
|
|
9
|
-
query_appStats_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_appStats_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_appStats_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_appStats_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_appStats_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_appStats_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_appStats_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_appStats_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_appStatsTimeSeries_parse(query_subparsers):
|
|
|
6
6
|
help='appStatsTimeSeries() query operation',
|
|
7
7
|
usage=get_help("query_appStatsTimeSeries"))
|
|
8
8
|
|
|
9
|
-
query_appStatsTimeSeries_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_appStatsTimeSeries_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_appStatsTimeSeries_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_appStatsTimeSeries_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_appStatsTimeSeries_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_appStatsTimeSeries_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_appStatsTimeSeries_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_appStatsTimeSeries_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_auditFeed_parse(query_subparsers):
|
|
|
6
6
|
help='auditFeed() query operation',
|
|
7
7
|
usage=get_help("query_auditFeed"))
|
|
8
8
|
|
|
9
|
-
query_auditFeed_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_auditFeed_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_auditFeed_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_auditFeed_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_auditFeed_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_auditFeed_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_auditFeed_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_auditFeed_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_catalogs_parse(query_subparsers):
|
|
|
6
6
|
help='catalogs() query operation',
|
|
7
7
|
usage=get_help("query_catalogs"))
|
|
8
8
|
|
|
9
|
-
query_catalogs_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_catalogs_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_catalogs_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_catalogs_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_catalogs_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_catalogs_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_catalogs_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_catalogs_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_container_parse(query_subparsers):
|
|
|
6
6
|
help='container() query operation',
|
|
7
7
|
usage=get_help("query_container"))
|
|
8
8
|
|
|
9
|
-
query_container_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_container_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_container_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_container_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_container_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_container_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_container_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_container_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_devices_parse(query_subparsers):
|
|
|
6
6
|
help='devices() query operation',
|
|
7
7
|
usage=get_help("query_devices"))
|
|
8
8
|
|
|
9
|
-
query_devices_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_devices_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_devices_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_devices_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_devices_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_devices_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_devices_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_devices_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_entityLookup_parse(query_subparsers):
|
|
|
6
6
|
help='entityLookup() query operation',
|
|
7
7
|
usage=get_help("query_entityLookup"))
|
|
8
8
|
|
|
9
|
-
query_entityLookup_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_entityLookup_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_entityLookup_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_entityLookup_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_entityLookup_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_entityLookup_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_entityLookup_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_entityLookup_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_events_parse(query_subparsers):
|
|
|
6
6
|
help='events() query operation',
|
|
7
7
|
usage=get_help("query_events"))
|
|
8
8
|
|
|
9
|
-
query_events_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_events_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_events_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_events_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_events_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_events_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_events_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_events_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_eventsFeed_parse(query_subparsers):
|
|
|
6
6
|
help='eventsFeed() query operation',
|
|
7
7
|
usage=get_help("query_eventsFeed"))
|
|
8
8
|
|
|
9
|
-
query_eventsFeed_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_eventsFeed_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_eventsFeed_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_eventsFeed_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_eventsFeed_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_eventsFeed_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_eventsFeed_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_eventsFeed_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_eventsTimeSeries_parse(query_subparsers):
|
|
|
6
6
|
help='eventsTimeSeries() query operation',
|
|
7
7
|
usage=get_help("query_eventsTimeSeries"))
|
|
8
8
|
|
|
9
|
-
query_eventsTimeSeries_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_eventsTimeSeries_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_eventsTimeSeries_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_eventsTimeSeries_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_eventsTimeSeries_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_eventsTimeSeries_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_eventsTimeSeries_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_eventsTimeSeries_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_hardware_parse(query_subparsers):
|
|
|
6
6
|
help='hardware() query operation',
|
|
7
7
|
usage=get_help("query_hardware"))
|
|
8
8
|
|
|
9
|
-
query_hardware_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_hardware_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_hardware_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_hardware_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_hardware_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_hardware_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_hardware_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_hardware_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_hardwareManagement_parse(query_subparsers):
|
|
|
6
6
|
help='hardwareManagement() query operation',
|
|
7
7
|
usage=get_help("query_hardwareManagement"))
|
|
8
8
|
|
|
9
|
-
query_hardwareManagement_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_hardwareManagement_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_hardwareManagement_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_hardwareManagement_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_hardwareManagement_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_hardwareManagement_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_hardwareManagement_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_hardwareManagement_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_licensing_parse(query_subparsers):
|
|
|
6
6
|
help='licensing() query operation',
|
|
7
7
|
usage=get_help("query_licensing"))
|
|
8
8
|
|
|
9
|
-
query_licensing_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_licensing_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_licensing_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_licensing_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_licensing_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_licensing_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_licensing_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_licensing_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_policy_parse(query_subparsers):
|
|
|
6
6
|
help='policy() query operation',
|
|
7
7
|
usage=get_help("query_policy"))
|
|
8
8
|
|
|
9
|
-
query_policy_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_policy_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_policy_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_policy_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_policy_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_sandbox_parse(query_subparsers):
|
|
|
6
6
|
help='sandbox() query operation',
|
|
7
7
|
usage=get_help("query_sandbox"))
|
|
8
8
|
|
|
9
|
-
query_sandbox_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_sandbox_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_sandbox_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_sandbox_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_sandbox_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_sandbox_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_sandbox_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_sandbox_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -6,9 +6,9 @@ def query_site_parse(query_subparsers):
|
|
|
6
6
|
help='site() query operation',
|
|
7
7
|
usage=get_help("query_site"))
|
|
8
8
|
|
|
9
|
-
query_site_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_site_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_site_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_site_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_site_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_site_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_site_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_site_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
@@ -5,9 +5,9 @@ def query_siteLocation_parse(query_subparsers):
|
|
|
5
5
|
query_siteLocation_parser = query_subparsers.add_parser('siteLocation',
|
|
6
6
|
help='siteLocation local cli query',
|
|
7
7
|
usage=get_help("query_siteLocation"))
|
|
8
|
-
query_siteLocation_parser.add_argument('json', help='Variables in JSON format.')
|
|
8
|
+
query_siteLocation_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
9
9
|
query_siteLocation_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
10
|
-
query_siteLocation_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
10
|
+
query_siteLocation_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
11
11
|
query_siteLocation_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
12
12
|
query_siteLocation_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
13
13
|
query_siteLocation_parser.set_defaults(func=querySiteLocation,operation_name='query.siteLocation')
|
|
@@ -6,9 +6,9 @@ def query_subDomains_parse(query_subparsers):
|
|
|
6
6
|
help='subDomains() query operation',
|
|
7
7
|
usage=get_help("query_subDomains"))
|
|
8
8
|
|
|
9
|
-
query_subDomains_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_subDomains_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_subDomains_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_subDomains_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
11
|
+
query_subDomains_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
12
|
query_subDomains_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
13
|
query_subDomains_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
14
|
query_subDomains_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|