catocli 1.0.17__py3-none-any.whl → 1.0.19__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/__init__.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = "1.0.17"
1
+ __version__ = "1.0.19"
2
2
  __cato_host__ = "https://api.catonetworks.com/api/v1/graphql2"
@@ -45,28 +45,28 @@ def querySiteLocation(args, configuration):
45
45
  try:
46
46
  variablesObj = json.loads(params["json"])
47
47
  except ValueError as e:
48
- print("ERROR: Query argument must be valid json in quotes. ",e,'\n\nExample: \'{filters:[{"search": "Your city here","field":"city","opeation":"exact"}}\'')
48
+ print("ERROR: Query argument must be valid json in quotes. ",e,'\n\nExample: \'{"filters":[{"search": "Your city here","field":"city","opeation":"exact"}}\'')
49
49
  exit()
50
50
  if not variablesObj.get("filters"):
51
- print("ERROR: Missing argument, must include filters array. ",e,'\n\nExample: \'{filters:[{"search": "Your city here","field":"city","opeation":"exact"}}\'')
51
+ print("ERROR: Missing argument, must include filters array. ",e,'\n\nExample: \'{"filters":[{"search": "Your city here","field":"city","opeation":"exact"}}\'')
52
52
  exit()
53
53
  if not isinstance(variablesObj.get("filters"), list):
54
- print("ERROR: Invalid argument, must include filters array. ",e,'\n\nExample: \'{filters:[{"search": "Your city here","field":"city","opeation":"exact"}}\'')
54
+ print("ERROR: Invalid argument, must include filters array. ",e,'\n\nExample: \'{"filters":[{"search": "Your city here","field":"city","opeation":"exact"}}\'')
55
55
  exit()
56
56
  requiredFields = ["search","field","operation"]
57
57
  for filter in variablesObj["filters"]:
58
58
  if not isinstance(filter, dict):
59
- print("ERROR: Invalid filter '"+str(filter)+"', filters must be valid json and include 'search', 'field', and 'operation'. ",'\n\nExample: \'{filters:[{"search": "Your city here","field":"city","opeation":"exact"}}\'',type(filter))
59
+ print("ERROR: Invalid filter '"+str(filter)+"', filters must be valid json and include 'search', 'field', and 'operation'. ",'\n\nExample: \'{"filters":[{"search": "Your city here","field":"city","opeation":"exact"}}\'',type(filter))
60
60
  exit()
61
61
  for param in filter:
62
62
  if param not in requiredFields:
63
- print("ERROR: Invalid field '"+param+"', filters must include 'search', 'field', and 'operation'. ",'\n\nExample: \'{filters:[{"search": "Your city here","field":"city","opeation":"exact"}}\'')
63
+ print("ERROR: Invalid field '"+param+"', filters must include 'search', 'field', and 'operation'. ",'\n\nExample: \'{"filters":[{"search": "Your city here","field":"city","opeation":"exact"}}\'')
64
64
  exit()
65
65
  for filter in variablesObj["filters"]:
66
66
  for param in filter:
67
67
  val = filter.get(param)
68
68
  if param=="search" and (not isinstance(val, str) or len(val)<3):
69
- print("ERROR: Invalid search '"+val+"', must be a string value and at least 3 characters in lengh. ",'\n\nExample: \'{filters:[{"search": "Your city here","field":"city","opeation":"exact"}}\'')
69
+ print("ERROR: Invalid search '"+val+"', must be a string value and at least 3 characters in lengh. ",'\n\nExample: \'{"filters":[{"search": "Your city here","field":"city","opeation":"exact"}}\'')
70
70
  exit()
71
71
  if param=="field" and (not isinstance(val, str) or val not in [ 'countryName', 'stateName', 'city']):
72
72
  print("ERROR: Invalid field '"+val+"', must be one of the following: 'countryName', 'stateName', or 'city'.",'\n\nExample: \'{"search":"your query here","field":"city"}\'')
@@ -16,7 +16,7 @@
16
16
 
17
17
  `catocli query siteLocation '{"filters":[{"search": "Your stateName here","field":"stateName","operation":"endsWith"}]}'`
18
18
 
19
- `catocli query siteLocation '{filters:[{"search": "Your City here","field":"city","operation":"startsWith"},{"search": "Your StateName here","field":"stateName","operation":"endsWith"},{"search": "Your Country here","field":"countryName","operation":"contains"}}'`
19
+ `catocli query siteLocation '{"filters":[{"search": "Your City here","field":"city","operation":"startsWith"},{"search": "Your StateName here","field":"stateName","operation":"endsWith"},{"search": "Your Country here","field":"countryName","operation":"contains"}}'`
20
20
 
21
21
  #### Operation Arguments for query.siteLocation ####
22
22
  `accountID` [ID] - (required) Unique Identifier of Account.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: catocli
3
- Version: 1.0.17
3
+ Version: 1.0.19
4
4
  Summary: Cato Networks cli wrapper for the GraphQL API.
5
5
  Home-page: https://github.com/Cato-Networks/cato-cli
6
6
  Author: Cato Networks
@@ -1,7 +1,7 @@
1
- catocli/__init__.py,sha256=_yj5wq5y2XEzOQCfZYYhCLKjJFCjAtKv0AWzDz8XBfs,86
1
+ catocli/__init__.py,sha256=LDBqvXvgUXOD4mCHX3wyD7OKaVplz72nVnChCSvwwDY,86
2
2
  catocli/__main__.py,sha256=6Z0ns_k_kUcz1Qtrn1u7UyUnqB-3e85jM_nppOwFsv4,217
3
3
  catocli/Utils/clidriver.py,sha256=9ikNmH5ylNvPf70BCiJxxVHBnjW21fTyj0Sd3qZfPW4,7340
4
- catocli/parsers/parserApiClient.py,sha256=Utg8TuC6DsRDYs8cIsJcyzwFTADnEAQMQZjOSRiYbqI,13549
4
+ catocli/parsers/parserApiClient.py,sha256=14GPWyiwP1yRnAsOERU1THmnTfbi66zSZNE5z0Up6AA,13561
5
5
  catocli/parsers/custom/README.md,sha256=UvCWAtF3Yh0UsvADb0ve1qJupgYHeyGu6V3Z0O5HEvo,8180
6
6
  catocli/parsers/custom/__init__.py,sha256=KYes0LjBPyqGPjKSgwaAiVh-Rb9auwgENV6lXl4E-ng,2391
7
7
  catocli/parsers/custom/customLib.py,sha256=G8-GOekHU39PwocNEZFks5wemnJy2sT5S_M0RIgWcW4,3095
@@ -162,7 +162,7 @@ catocli/parsers/query_policy/README.md,sha256=zFn5Sceq4pK2fURtod7yllWWwcviHD4E0D
162
162
  catocli/parsers/query_policy/__init__.py,sha256=zH2tvG9WLqUmWWq4Z1lny-JOK5IXwapacgORo7VS2J4,863
163
163
  catocli/parsers/query_site/README.md,sha256=A2gEpcKPrjzqHMtrvSPAOdFaErFc_DTRPTrUu0PP0z0,1460
164
164
  catocli/parsers/query_site/__init__.py,sha256=ZhseYQx5EgfD-foyxWvxQ2Y5JHXEWfjMkVGGf1uqxbw,839
165
- catocli/parsers/query_siteLocation/README.md,sha256=pTgO_7DDHnGQzma34qKQfKPRgawwZcPIQJXWSIRDT4w,1500
165
+ catocli/parsers/query_siteLocation/README.md,sha256=fxQc4iAsx0AJ9Q7rq3IOH4713F5rra0SW6boxwq4K_w,1502
166
166
  catocli/parsers/query_siteLocation/__init__.py,sha256=sMLmzUdtwlzifHjXfYWsLvjdrCkQ3lbY9U0QGUuGbtQ,941
167
167
  catocli/parsers/query_subDomains/README.md,sha256=cYS_97fOekPlJe1PDfgkh39XdECbcgZCArcN7SOQ88E,640
168
168
  catocli/parsers/query_subDomains/__init__.py,sha256=HMAxZr_145yNx5NV2_zNzLVrocujzmhn7XaynIBJRoo,911
@@ -174,7 +174,7 @@ catocli/parsers/raw/README.md,sha256=BP0BdxHal9vgHwdJRkTjD0984NLIMHHC8U6qSAD0OxM
174
174
  catocli/parsers/raw/__init__.py,sha256=f1wRd9y_99RB3Npew1UN770Xel0_lhdLvayh5NNzpFw,558
175
175
  graphql_client/__init__.py,sha256=2nxD4YsWoOnALXi5cXbmtIN_i0NL_eyDTQRTxs52mkI,315
176
176
  graphql_client/api_client.py,sha256=2Rc1Zo1xH9Jnk1AO68kLSofTShkZwSVF-WkVtczfIc4,5786
177
- graphql_client/api_client_types.py,sha256=EyksBLag6jVq50Lq0HZuAT9Y3wGlvuGYwwGPipGM-y4,11492
177
+ graphql_client/api_client_types.py,sha256=KNzQfANuXg1afbmQjHVZy5skQQfthEYCP-d-BnpX46Q,11504
178
178
  graphql_client/configuration.py,sha256=F-WDXVjbVqeZt5bsF9D38duJmU24MlSzTQEw0kIQXHQ,7648
179
179
  graphql_client/api/__init__.py,sha256=UjpnW5LhQScrcYDQhCfk5YkA4pGpEx0JT_G0gUI23Rg,88
180
180
  graphql_client/api/call_api.py,sha256=_eeNW8_B9mcHcNwMPEsIqPURAl5jUWbTDH_Lss9nnNo,2404
@@ -304,7 +304,7 @@ models/query.siteLocation.json,sha256=KxWQN-t26XaAq0dviN2N18mSuF0AWhdbhVxMuHdhUQ
304
304
  models/query.subDomains.json,sha256=ySJ-gsBzC8EX4WrtJpasLAGkSK7-3e3orhPbIyx_B8s,7041
305
305
  models/query.xdr.stories.json,sha256=xB-6jjBzgjK60lJrVXbt7UfUlT8PZG_Mjb6LweHf2QA,3796502
306
306
  models/query.xdr.story.json,sha256=Fm2D5DNWuwQQdDQAdIQilM91wFliEUxBMHXslooYDhQ,2806519
307
- schema/catolib.py,sha256=8ZVtfFjFlOj9sGgWkoyd0DVGhTsZwfED42VyhlQOVk4,50222
307
+ schema/catolib.py,sha256=n9-7PlZN2WspOQim0pCSkbZswJV1Ml-Cb3D-8aAegqw,50224
308
308
  schema/importSchema.py,sha256=9xg9N0MjgQUiPRczOpk0sTY1Nx9K2F6MRhpUyRTNqZ4,2795
309
309
  vendor/six.py,sha256=TOOfQi7nFGfMrIvtdr6wX4wyHH8M7aknmuLfo2cBBrM,34549
310
310
  vendor/certifi/__init__.py,sha256=p_GYZrjUwPBUhpLlCZoGb0miKBKSqDAyZC5DvIuqbHQ,94
@@ -348,9 +348,9 @@ vendor/urllib3/util/timeout.py,sha256=4eT1FVeZZU7h7mYD1Jq2OXNe4fxekdNvhoWUkZusRp
348
348
  vendor/urllib3/util/url.py,sha256=wHORhp80RAXyTlAIkTqLFzSrkU7J34ZDxX-tN65MBZk,15213
349
349
  vendor/urllib3/util/util.py,sha256=j3lbZK1jPyiwD34T8IgJzdWEZVT-4E-0vYIJi9UjeNA,1146
350
350
  vendor/urllib3/util/wait.py,sha256=_ph8IrUR3sqPqi0OopQgJUlH4wzkGeM5CiyA7XGGtmI,4423
351
- catocli-1.0.17.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
352
- catocli-1.0.17.dist-info/METADATA,sha256=YuVefS5ZgciVQYbUuy2MVnwFg23w9wHntgGWQyfV--g,1265
353
- catocli-1.0.17.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
354
- catocli-1.0.17.dist-info/entry_points.txt,sha256=p4k9Orre6aWcqVrNmBbckmCs39h-1naMxRo2AjWmWZ4,50
355
- catocli-1.0.17.dist-info/top_level.txt,sha256=lH9Ok1WoqyeZsgsSyKS0ra5p53MHogpgFl6hJfT-32M,58
356
- catocli-1.0.17.dist-info/RECORD,,
351
+ catocli-1.0.19.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
352
+ catocli-1.0.19.dist-info/METADATA,sha256=2KNh4pE47R_1Eq1BvekJSm3MvwM3TCiFjhvrwteQ8pM,1265
353
+ catocli-1.0.19.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
354
+ catocli-1.0.19.dist-info/entry_points.txt,sha256=p4k9Orre6aWcqVrNmBbckmCs39h-1naMxRo2AjWmWZ4,50
355
+ catocli-1.0.19.dist-info/top_level.txt,sha256=lH9Ok1WoqyeZsgsSyKS0ra5p53MHogpgFl6hJfT-32M,58
356
+ catocli-1.0.19.dist-info/RECORD,,
@@ -104,7 +104,7 @@ class ApiClient(object):
104
104
  return_data = None
105
105
 
106
106
  if "errors" in return_data:
107
- print(return_data)
107
+ print(json.dumps(return_data))
108
108
  exit(1)
109
109
 
110
110
  if _return_http_data_only:
schema/catolib.py CHANGED
@@ -752,7 +752,7 @@ def writeReadmes(catoApiSchema):
752
752
 
753
753
  `catocli query siteLocation '{"filters":[{"search": "Your stateName here","field":"stateName","operation":"endsWith"}]}'`
754
754
 
755
- `catocli query siteLocation '{filters:[{"search": "Your City here","field":"city","operation":"startsWith"},{"search": "Your StateName here","field":"stateName","operation":"endsWith"},{"search": "Your Country here","field":"countryName","operation":"contains"}}'`
755
+ `catocli query siteLocation '{"filters":[{"search": "Your City here","field":"city","operation":"startsWith"},{"search": "Your StateName here","field":"stateName","operation":"endsWith"},{"search": "Your Country here","field":"countryName","operation":"contains"}}'`
756
756
 
757
757
  #### Operation Arguments for query.siteLocation ####
758
758
  `accountID` [ID] - (required) Unique Identifier of Account.