cortexapps-cli 0.26.1__tar.gz → 0.26.3__tar.gz
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.
- {cortexapps_cli-0.26.1 → cortexapps_cli-0.26.3}/PKG-INFO +1 -1
- {cortexapps_cli-0.26.1 → cortexapps_cli-0.26.3}/cortexapps_cli/cortex.py +25 -24
- {cortexapps_cli-0.26.1 → cortexapps_cli-0.26.3}/pyproject.toml +1 -1
- {cortexapps_cli-0.26.1 → cortexapps_cli-0.26.3}/LICENSE +0 -0
- {cortexapps_cli-0.26.1 → cortexapps_cli-0.26.3}/README.rst +0 -0
- {cortexapps_cli-0.26.1 → cortexapps_cli-0.26.3}/cortexapps_cli/__init__.py +0 -0
|
@@ -73,11 +73,12 @@ def read_file(args):
|
|
|
73
73
|
def read_json_from_yaml(args):
|
|
74
74
|
if str(type(args.file)) == "<class '_io.TextIOWrapper'>":
|
|
75
75
|
data = yaml.safe_load(args.file.read())
|
|
76
|
+
|
|
76
77
|
else:
|
|
77
78
|
with open(args.file.name, 'rb') as f:
|
|
78
79
|
data = yaml.safe_load(f)
|
|
79
80
|
|
|
80
|
-
return
|
|
81
|
+
return json.dumps({ "spec": "" + str(data) + "" })
|
|
81
82
|
|
|
82
83
|
def check_config_file(config_file, replace_string):
|
|
83
84
|
if not os.path.isfile(config_file):
|
|
@@ -294,6 +295,15 @@ def add_argument_groups(subparser):
|
|
|
294
295
|
metavar=''
|
|
295
296
|
)
|
|
296
297
|
|
|
298
|
+
def add_argument_hierarchyDepth(subparser):
|
|
299
|
+
subparser.add_argument(
|
|
300
|
+
'-d',
|
|
301
|
+
'--hierarchy-depth',
|
|
302
|
+
help='Depth of the parent / children hierarchy nodes. Can be \'full\' or a valid integer',
|
|
303
|
+
default='full',
|
|
304
|
+
metavar=''
|
|
305
|
+
)
|
|
306
|
+
|
|
297
307
|
def add_argument_id(subparser, help_text='The id of the CQL query'):
|
|
298
308
|
subparser.add_argument(
|
|
299
309
|
'-i',
|
|
@@ -324,6 +334,16 @@ def add_argument_includeDrafts(subparser, help_text='Include plugin drafts.'):
|
|
|
324
334
|
action='store_true'
|
|
325
335
|
)
|
|
326
336
|
|
|
337
|
+
def add_argument_includeHierarchyFields(subparser):
|
|
338
|
+
subparser.add_argument(
|
|
339
|
+
'-i',
|
|
340
|
+
'--includeHierarchyFields',
|
|
341
|
+
help='List of sub fields to include for hierarchies. Only supports \'groups\'',
|
|
342
|
+
required=False,
|
|
343
|
+
default=argparse.SUPPRESS,
|
|
344
|
+
metavar=''
|
|
345
|
+
)
|
|
346
|
+
|
|
327
347
|
def add_argument_includeIncoming(subparser, help_text='Including incoming dependencies.'):
|
|
328
348
|
subparser.add_argument(
|
|
329
349
|
'-i',
|
|
@@ -1025,22 +1045,9 @@ def subparser_catalog_list(subparser):
|
|
|
1025
1045
|
action='store_true',
|
|
1026
1046
|
required=False
|
|
1027
1047
|
)
|
|
1028
|
-
sp
|
|
1029
|
-
'-d',
|
|
1030
|
-
'--hierarchy-depth',
|
|
1031
|
-
help='Depth of the parent / children hierarchy nodes. Can be \'full\' or a valid integer',
|
|
1032
|
-
default='full',
|
|
1033
|
-
metavar=''
|
|
1034
|
-
)
|
|
1048
|
+
add_argument_hierarchyDepth(sp)
|
|
1035
1049
|
add_argument_groups(sp)
|
|
1036
|
-
sp
|
|
1037
|
-
'-i',
|
|
1038
|
-
'--includeHierarchyFields',
|
|
1039
|
-
help='List of sub fields to include for hierarchies. Only supports \'groups\'',
|
|
1040
|
-
default=False,
|
|
1041
|
-
action='store_true',
|
|
1042
|
-
required=False
|
|
1043
|
-
)
|
|
1050
|
+
add_argument_includeHierarchyFields(sp)
|
|
1044
1051
|
sp.add_argument(
|
|
1045
1052
|
'-in',
|
|
1046
1053
|
'--includeNestedFields',
|
|
@@ -1123,14 +1130,8 @@ def catalog_descriptor(args):
|
|
|
1123
1130
|
|
|
1124
1131
|
def subparser_catalog_details(subparser):
|
|
1125
1132
|
sp = subparser.add_parser('details', help='Retrieve entity details')
|
|
1126
|
-
sp
|
|
1127
|
-
|
|
1128
|
-
'--includeHierarchyFields',
|
|
1129
|
-
help='List of sub fields to include for hierarchies. Only supports \'groups\'',
|
|
1130
|
-
default=argparse.SUPPRESS,
|
|
1131
|
-
metavar=''
|
|
1132
|
-
)
|
|
1133
|
-
add_argument_groups(sp)
|
|
1133
|
+
add_argument_includeHierarchyFields(sp)
|
|
1134
|
+
add_argument_hierarchyDepth(sp)
|
|
1134
1135
|
add_argument_tag(sp)
|
|
1135
1136
|
sp.set_defaults(func=catalog_details)
|
|
1136
1137
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|