catocli 1.0.13__py3-none-any.whl → 1.0.15__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.

Files changed (253) hide show
  1. catocli/Utils/clidriver.py +15 -2
  2. catocli/__init__.py +1 -1
  3. catocli/parsers/custom/customLib.py +3 -1
  4. catocli/parsers/mutation_accountManagement/README.md +7 -0
  5. catocli/parsers/mutation_accountManagement/__init__.py +51 -0
  6. catocli/parsers/mutation_accountManagement_addAccount/README.md +17 -0
  7. catocli/parsers/mutation_accountManagement_removeAccount/README.md +16 -0
  8. catocli/parsers/mutation_accountManagement_updateAccount/README.md +17 -0
  9. catocli/parsers/mutation_admin_addAdmin/README.md +2 -2
  10. catocli/parsers/mutation_admin_updateAdmin/README.md +2 -2
  11. catocli/parsers/mutation_container_delete/README.md +2 -2
  12. catocli/parsers/mutation_policy_internetFirewall_addRule/README.md +3 -3
  13. catocli/parsers/mutation_policy_internetFirewall_addSection/README.md +3 -3
  14. catocli/parsers/mutation_policy_internetFirewall_createPolicyRevision/README.md +3 -3
  15. catocli/parsers/mutation_policy_internetFirewall_discardPolicyRevision/README.md +3 -3
  16. catocli/parsers/mutation_policy_internetFirewall_moveRule/README.md +3 -3
  17. catocli/parsers/mutation_policy_internetFirewall_moveSection/README.md +3 -3
  18. catocli/parsers/mutation_policy_internetFirewall_publishPolicyRevision/README.md +3 -3
  19. catocli/parsers/mutation_policy_internetFirewall_removeRule/README.md +3 -3
  20. catocli/parsers/mutation_policy_internetFirewall_removeSection/README.md +3 -3
  21. catocli/parsers/mutation_policy_internetFirewall_updatePolicy/README.md +3 -3
  22. catocli/parsers/mutation_policy_internetFirewall_updateRule/README.md +3 -3
  23. catocli/parsers/mutation_policy_internetFirewall_updateSection/README.md +3 -3
  24. catocli/parsers/mutation_policy_wanFirewall_addRule/README.md +3 -3
  25. catocli/parsers/mutation_policy_wanFirewall_addSection/README.md +3 -3
  26. catocli/parsers/mutation_policy_wanFirewall_createPolicyRevision/README.md +3 -3
  27. catocli/parsers/mutation_policy_wanFirewall_discardPolicyRevision/README.md +3 -3
  28. catocli/parsers/mutation_policy_wanFirewall_moveRule/README.md +3 -3
  29. catocli/parsers/mutation_policy_wanFirewall_moveSection/README.md +3 -3
  30. catocli/parsers/mutation_policy_wanFirewall_publishPolicyRevision/README.md +3 -3
  31. catocli/parsers/mutation_policy_wanFirewall_removeRule/README.md +3 -3
  32. catocli/parsers/mutation_policy_wanFirewall_removeSection/README.md +3 -3
  33. catocli/parsers/mutation_policy_wanFirewall_updatePolicy/README.md +3 -3
  34. catocli/parsers/mutation_policy_wanFirewall_updateRule/README.md +3 -3
  35. catocli/parsers/mutation_policy_wanFirewall_updateSection/README.md +3 -3
  36. catocli/parsers/mutation_site/__init__.py +14 -0
  37. catocli/parsers/mutation_site_addIpsecIkeV2Site/README.md +2 -2
  38. catocli/parsers/mutation_site_addIpsecIkeV2SiteTunnels/README.md +2 -2
  39. catocli/parsers/mutation_site_addNetworkRange/README.md +2 -2
  40. catocli/parsers/mutation_site_addSocketSite/README.md +2 -2
  41. catocli/parsers/mutation_site_addStaticHost/README.md +2 -2
  42. catocli/parsers/mutation_site_removeIpsecIkeV2SiteTunnels/README.md +18 -0
  43. catocli/parsers/mutation_site_updateHa/README.md +2 -2
  44. catocli/parsers/mutation_site_updateIpsecIkeV2SiteGeneralDetails/README.md +2 -2
  45. catocli/parsers/mutation_site_updateIpsecIkeV2SiteTunnels/README.md +2 -2
  46. catocli/parsers/mutation_site_updateNetworkRange/README.md +2 -2
  47. catocli/parsers/mutation_site_updateSiteGeneralDetails/README.md +2 -2
  48. catocli/parsers/mutation_site_updateSocketInterface/README.md +2 -2
  49. catocli/parsers/mutation_site_updateStaticHost/README.md +2 -2
  50. catocli/parsers/mutation_sites/__init__.py +14 -0
  51. catocli/parsers/mutation_sites_addIpsecIkeV2Site/README.md +2 -2
  52. catocli/parsers/mutation_sites_addIpsecIkeV2SiteTunnels/README.md +2 -2
  53. catocli/parsers/mutation_sites_addNetworkRange/README.md +2 -2
  54. catocli/parsers/mutation_sites_addSocketSite/README.md +2 -2
  55. catocli/parsers/mutation_sites_addStaticHost/README.md +2 -2
  56. catocli/parsers/mutation_sites_removeIpsecIkeV2SiteTunnels/README.md +18 -0
  57. catocli/parsers/mutation_sites_updateHa/README.md +2 -2
  58. catocli/parsers/mutation_sites_updateIpsecIkeV2SiteGeneralDetails/README.md +2 -2
  59. catocli/parsers/mutation_sites_updateIpsecIkeV2SiteTunnels/README.md +2 -2
  60. catocli/parsers/mutation_sites_updateNetworkRange/README.md +2 -2
  61. catocli/parsers/mutation_sites_updateSiteGeneralDetails/README.md +2 -2
  62. catocli/parsers/mutation_sites_updateSocketInterface/README.md +2 -2
  63. catocli/parsers/mutation_sites_updateStaticHost/README.md +2 -2
  64. catocli/parsers/parserApiClient.py +7 -4
  65. catocli/parsers/query_accountManagement/README.md +16 -0
  66. catocli/parsers/query_accountManagement/__init__.py +17 -0
  67. catocli/parsers/query_admins/README.md +2 -2
  68. catocli/parsers/query_appStats/README.md +5 -5
  69. catocli/parsers/query_appStatsTimeSeries/README.md +4 -4
  70. catocli/parsers/query_auditFeed/README.md +2 -2
  71. catocli/parsers/query_container/README.md +8 -8
  72. catocli/parsers/query_entityLookup/README.md +6 -6
  73. catocli/parsers/query_events/README.md +5 -5
  74. catocli/parsers/query_eventsFeed/README.md +2 -2
  75. catocli/parsers/query_eventsTimeSeries/README.md +4 -4
  76. catocli/parsers/query_hardwareManagement/README.md +2 -2
  77. catocli/parsers/query_policy/README.md +3 -3
  78. catocli/parsers/query_xdr_stories/README.md +2 -2
  79. {catocli-1.0.13.dist-info → catocli-1.0.15.dist-info}/METADATA +1 -1
  80. catocli-1.0.15.dist-info/RECORD +275 -0
  81. {catocli-1.0.13.dist-info → catocli-1.0.15.dist-info}/top_level.txt +0 -2
  82. graphql_client/api_client_types.py +4 -0
  83. models/mutation.accountManagement.addAccount.json +908 -0
  84. models/mutation.accountManagement.removeAccount.json +446 -0
  85. models/mutation.accountManagement.updateAccount.json +524 -0
  86. models/mutation.admin.addAdmin.json +103 -103
  87. models/mutation.admin.removeAdmin.json +3 -3
  88. models/mutation.admin.updateAdmin.json +121 -121
  89. models/mutation.container.delete.json +67 -67
  90. models/mutation.policy.internetFirewall.addRule.json +2497 -1889
  91. models/mutation.policy.internetFirewall.addSection.json +92 -92
  92. models/mutation.policy.internetFirewall.createPolicyRevision.json +734 -546
  93. models/mutation.policy.internetFirewall.discardPolicyRevision.json +734 -546
  94. models/mutation.policy.internetFirewall.moveRule.json +723 -535
  95. models/mutation.policy.internetFirewall.moveSection.json +85 -85
  96. models/mutation.policy.internetFirewall.publishPolicyRevision.json +734 -546
  97. models/mutation.policy.internetFirewall.removeRule.json +710 -522
  98. models/mutation.policy.internetFirewall.removeSection.json +72 -72
  99. models/mutation.policy.internetFirewall.updatePolicy.json +734 -546
  100. models/mutation.policy.internetFirewall.updateRule.json +2476 -1885
  101. models/mutation.policy.internetFirewall.updateSection.json +85 -85
  102. models/mutation.policy.wanFirewall.addRule.json +2577 -1225
  103. models/mutation.policy.wanFirewall.addSection.json +92 -92
  104. models/mutation.policy.wanFirewall.createPolicyRevision.json +800 -455
  105. models/mutation.policy.wanFirewall.discardPolicyRevision.json +800 -455
  106. models/mutation.policy.wanFirewall.moveRule.json +789 -444
  107. models/mutation.policy.wanFirewall.moveSection.json +85 -85
  108. models/mutation.policy.wanFirewall.publishPolicyRevision.json +800 -455
  109. models/mutation.policy.wanFirewall.removeRule.json +776 -431
  110. models/mutation.policy.wanFirewall.removeSection.json +72 -72
  111. models/mutation.policy.wanFirewall.updatePolicy.json +800 -455
  112. models/mutation.policy.wanFirewall.updateRule.json +2597 -1265
  113. models/mutation.policy.wanFirewall.updateSection.json +85 -85
  114. models/mutation.site.addIpsecIkeV2Site.json +43 -43
  115. models/mutation.site.addIpsecIkeV2SiteTunnels.json +505 -102
  116. models/mutation.site.addNetworkRange.json +53 -53
  117. models/mutation.site.addSocketSite.json +43 -43
  118. models/mutation.site.addStaticHost.json +33 -33
  119. models/mutation.site.removeIpsecIkeV2SiteTunnels.json +861 -0
  120. models/mutation.site.removeNetworkRange.json +3 -3
  121. models/mutation.site.removeSite.json +3 -3
  122. models/mutation.site.removeStaticHost.json +3 -3
  123. models/mutation.site.updateHa.json +54 -54
  124. models/mutation.site.updateIpsecIkeV2SiteGeneralDetails.json +79 -79
  125. models/mutation.site.updateIpsecIkeV2SiteTunnels.json +123 -123
  126. models/mutation.site.updateNetworkRange.json +74 -74
  127. models/mutation.site.updateSiteGeneralDetails.json +73 -73
  128. models/mutation.site.updateSocketInterface.json +282 -282
  129. models/mutation.site.updateStaticHost.json +54 -54
  130. models/mutation.sites.addIpsecIkeV2Site.json +43 -43
  131. models/mutation.sites.addIpsecIkeV2SiteTunnels.json +505 -102
  132. models/mutation.sites.addNetworkRange.json +53 -53
  133. models/mutation.sites.addSocketSite.json +43 -43
  134. models/mutation.sites.addStaticHost.json +33 -33
  135. models/mutation.sites.removeIpsecIkeV2SiteTunnels.json +861 -0
  136. models/mutation.sites.removeNetworkRange.json +3 -3
  137. models/mutation.sites.removeSite.json +3 -3
  138. models/mutation.sites.removeStaticHost.json +3 -3
  139. models/mutation.sites.updateHa.json +54 -54
  140. models/mutation.sites.updateIpsecIkeV2SiteGeneralDetails.json +79 -79
  141. models/mutation.sites.updateIpsecIkeV2SiteTunnels.json +123 -123
  142. models/mutation.sites.updateNetworkRange.json +74 -74
  143. models/mutation.sites.updateSiteGeneralDetails.json +73 -73
  144. models/mutation.sites.updateSocketInterface.json +282 -282
  145. models/mutation.sites.updateStaticHost.json +54 -54
  146. models/query.accountManagement.json +355 -0
  147. models/query.accountMetrics.json +235 -235
  148. models/query.accountRoles.json +3 -3
  149. models/query.accountSnapshot.json +278 -118
  150. models/query.admin.json +24 -24
  151. models/query.admins.json +138 -138
  152. models/query.appStats.json +92 -92
  153. models/query.appStatsTimeSeries.json +78 -78
  154. models/query.auditFeed.json +77 -77
  155. models/query.container.json +192 -192
  156. models/query.entityLookup.json +154 -154
  157. models/query.events.json +54 -54
  158. models/query.eventsFeed.json +38 -38
  159. models/query.eventsTimeSeries.json +78 -78
  160. models/query.hardwareManagement.json +125 -125
  161. models/query.licensing.json +933 -249
  162. models/query.policy.json +1502 -970
  163. models/query.xdr.stories.json +842 -842
  164. models/query.xdr.story.json +610 -610
  165. schema/catolib.py +12 -13
  166. build/lib/catocli/Utils/clidriver.py +0 -117
  167. build/lib/catocli/__init__.py +0 -2
  168. build/lib/catocli/__main__.py +0 -12
  169. build/lib/catocli/parsers/custom/__init__.py +0 -47
  170. build/lib/catocli/parsers/custom/customLib.py +0 -70
  171. build/lib/catocli/parsers/mutation_admin/__init__.py +0 -51
  172. build/lib/catocli/parsers/mutation_container/__init__.py +0 -23
  173. build/lib/catocli/parsers/mutation_policy/__init__.py +0 -357
  174. build/lib/catocli/parsers/mutation_site/__init__.py +0 -219
  175. build/lib/catocli/parsers/mutation_sites/__init__.py +0 -219
  176. build/lib/catocli/parsers/parserApiClient.py +0 -309
  177. build/lib/catocli/parsers/query_accountBySubdomain/__init__.py +0 -17
  178. build/lib/catocli/parsers/query_accountMetrics/__init__.py +0 -17
  179. build/lib/catocli/parsers/query_accountRoles/__init__.py +0 -17
  180. build/lib/catocli/parsers/query_accountSnapshot/__init__.py +0 -17
  181. build/lib/catocli/parsers/query_admin/__init__.py +0 -17
  182. build/lib/catocli/parsers/query_admins/__init__.py +0 -17
  183. build/lib/catocli/parsers/query_appStats/__init__.py +0 -17
  184. build/lib/catocli/parsers/query_appStatsTimeSeries/__init__.py +0 -17
  185. build/lib/catocli/parsers/query_auditFeed/__init__.py +0 -17
  186. build/lib/catocli/parsers/query_container/__init__.py +0 -17
  187. build/lib/catocli/parsers/query_entityLookup/__init__.py +0 -17
  188. build/lib/catocli/parsers/query_events/__init__.py +0 -17
  189. build/lib/catocli/parsers/query_eventsFeed/__init__.py +0 -17
  190. build/lib/catocli/parsers/query_eventsTimeSeries/__init__.py +0 -17
  191. build/lib/catocli/parsers/query_hardwareManagement/__init__.py +0 -17
  192. build/lib/catocli/parsers/query_licensing/__init__.py +0 -17
  193. build/lib/catocli/parsers/query_policy/__init__.py +0 -17
  194. build/lib/catocli/parsers/query_siteLocation/__init__.py +0 -17
  195. build/lib/catocli/parsers/query_subDomains/__init__.py +0 -17
  196. build/lib/catocli/parsers/query_xdr/__init__.py +0 -37
  197. build/lib/catocli/parsers/raw/__init__.py +0 -9
  198. build/lib/graphql_client/__init__.py +0 -11
  199. build/lib/graphql_client/api/__init__.py +0 -3
  200. build/lib/graphql_client/api/call_api.py +0 -73
  201. build/lib/graphql_client/api_client.py +0 -192
  202. build/lib/graphql_client/api_client_types.py +0 -404
  203. build/lib/graphql_client/configuration.py +0 -230
  204. build/lib/graphql_client/models/__init__.py +0 -13
  205. build/lib/graphql_client/models/no_schema.py +0 -71
  206. build/lib/schema/catolib.py +0 -1016
  207. build/lib/schema/importSchema.py +0 -60
  208. build/lib/vendor/certifi/__init__.py +0 -4
  209. build/lib/vendor/certifi/__main__.py +0 -12
  210. build/lib/vendor/certifi/core.py +0 -114
  211. build/lib/vendor/certifi/py.typed +0 -0
  212. build/lib/vendor/six.py +0 -998
  213. build/lib/vendor/urllib3/__init__.py +0 -211
  214. build/lib/vendor/urllib3/_base_connection.py +0 -172
  215. build/lib/vendor/urllib3/_collections.py +0 -483
  216. build/lib/vendor/urllib3/_request_methods.py +0 -278
  217. build/lib/vendor/urllib3/_version.py +0 -16
  218. build/lib/vendor/urllib3/connection.py +0 -1033
  219. build/lib/vendor/urllib3/connectionpool.py +0 -1182
  220. build/lib/vendor/urllib3/contrib/__init__.py +0 -0
  221. build/lib/vendor/urllib3/contrib/emscripten/__init__.py +0 -18
  222. build/lib/vendor/urllib3/contrib/emscripten/connection.py +0 -254
  223. build/lib/vendor/urllib3/contrib/emscripten/fetch.py +0 -418
  224. build/lib/vendor/urllib3/contrib/emscripten/request.py +0 -22
  225. build/lib/vendor/urllib3/contrib/emscripten/response.py +0 -285
  226. build/lib/vendor/urllib3/contrib/pyopenssl.py +0 -552
  227. build/lib/vendor/urllib3/contrib/socks.py +0 -228
  228. build/lib/vendor/urllib3/exceptions.py +0 -321
  229. build/lib/vendor/urllib3/fields.py +0 -341
  230. build/lib/vendor/urllib3/filepost.py +0 -89
  231. build/lib/vendor/urllib3/http2/__init__.py +0 -53
  232. build/lib/vendor/urllib3/http2/connection.py +0 -356
  233. build/lib/vendor/urllib3/http2/probe.py +0 -87
  234. build/lib/vendor/urllib3/poolmanager.py +0 -637
  235. build/lib/vendor/urllib3/py.typed +0 -2
  236. build/lib/vendor/urllib3/response.py +0 -1265
  237. build/lib/vendor/urllib3/util/__init__.py +0 -42
  238. build/lib/vendor/urllib3/util/connection.py +0 -137
  239. build/lib/vendor/urllib3/util/proxy.py +0 -43
  240. build/lib/vendor/urllib3/util/request.py +0 -256
  241. build/lib/vendor/urllib3/util/response.py +0 -101
  242. build/lib/vendor/urllib3/util/retry.py +0 -533
  243. build/lib/vendor/urllib3/util/ssl_.py +0 -513
  244. build/lib/vendor/urllib3/util/ssl_match_hostname.py +0 -159
  245. build/lib/vendor/urllib3/util/ssltransport.py +0 -276
  246. build/lib/vendor/urllib3/util/timeout.py +0 -275
  247. build/lib/vendor/urllib3/util/url.py +0 -471
  248. build/lib/vendor/urllib3/util/util.py +0 -42
  249. build/lib/vendor/urllib3/util/wait.py +0 -124
  250. catocli-1.0.13.dist-info/RECORD +0 -344
  251. {catocli-1.0.13.dist-info → catocli-1.0.15.dist-info}/LICENSE +0 -0
  252. {catocli-1.0.13.dist-info → catocli-1.0.15.dist-info}/WHEEL +0 -0
  253. {catocli-1.0.13.dist-info → catocli-1.0.15.dist-info}/entry_points.txt +0 -0
@@ -1,17 +0,0 @@
1
-
2
- from ..parserApiClient import createRequest, get_help
3
-
4
- def query_appStats_parse(query_subparsers):
5
- query_appStats_parser = query_subparsers.add_parser('appStats',
6
- help='appStats() query operation',
7
- usage=get_help("query_appStats"))
8
-
9
- query_appStats_parser.add_argument('json', help='Variables in JSON format.')
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='?',
12
- help='Print test request preview without sending api call')
13
- query_appStats_parser.add_argument('-v', const=True, default=False, nargs='?',
14
- help='Verbose output')
15
- query_appStats_parser.add_argument('-p', const=True, default=False, nargs='?',
16
- help='Pretty print')
17
- query_appStats_parser.set_defaults(func=createRequest,operation_name='query.appStats')
@@ -1,17 +0,0 @@
1
-
2
- from ..parserApiClient import createRequest, get_help
3
-
4
- def query_appStatsTimeSeries_parse(query_subparsers):
5
- query_appStatsTimeSeries_parser = query_subparsers.add_parser('appStatsTimeSeries',
6
- help='appStatsTimeSeries() query operation',
7
- usage=get_help("query_appStatsTimeSeries"))
8
-
9
- query_appStatsTimeSeries_parser.add_argument('json', help='Variables in JSON format.')
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='?',
12
- help='Print test request preview without sending api call')
13
- query_appStatsTimeSeries_parser.add_argument('-v', const=True, default=False, nargs='?',
14
- help='Verbose output')
15
- query_appStatsTimeSeries_parser.add_argument('-p', const=True, default=False, nargs='?',
16
- help='Pretty print')
17
- query_appStatsTimeSeries_parser.set_defaults(func=createRequest,operation_name='query.appStatsTimeSeries')
@@ -1,17 +0,0 @@
1
-
2
- from ..parserApiClient import createRequest, get_help
3
-
4
- def query_auditFeed_parse(query_subparsers):
5
- query_auditFeed_parser = query_subparsers.add_parser('auditFeed',
6
- help='auditFeed() query operation',
7
- usage=get_help("query_auditFeed"))
8
-
9
- query_auditFeed_parser.add_argument('json', help='Variables in JSON format.')
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='?',
12
- help='Print test request preview without sending api call')
13
- query_auditFeed_parser.add_argument('-v', const=True, default=False, nargs='?',
14
- help='Verbose output')
15
- query_auditFeed_parser.add_argument('-p', const=True, default=False, nargs='?',
16
- help='Pretty print')
17
- query_auditFeed_parser.set_defaults(func=createRequest,operation_name='query.auditFeed')
@@ -1,17 +0,0 @@
1
-
2
- from ..parserApiClient import createRequest, get_help
3
-
4
- def query_container_parse(query_subparsers):
5
- query_container_parser = query_subparsers.add_parser('container',
6
- help='container() query operation',
7
- usage=get_help("query_container"))
8
-
9
- query_container_parser.add_argument('json', help='Variables in JSON format.')
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='?',
12
- help='Print test request preview without sending api call')
13
- query_container_parser.add_argument('-v', const=True, default=False, nargs='?',
14
- help='Verbose output')
15
- query_container_parser.add_argument('-p', const=True, default=False, nargs='?',
16
- help='Pretty print')
17
- query_container_parser.set_defaults(func=createRequest,operation_name='query.container')
@@ -1,17 +0,0 @@
1
-
2
- from ..parserApiClient import createRequest, get_help
3
-
4
- def query_entityLookup_parse(query_subparsers):
5
- query_entityLookup_parser = query_subparsers.add_parser('entityLookup',
6
- help='entityLookup() query operation',
7
- usage=get_help("query_entityLookup"))
8
-
9
- query_entityLookup_parser.add_argument('json', help='Variables in JSON format.')
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='?',
12
- help='Print test request preview without sending api call')
13
- query_entityLookup_parser.add_argument('-v', const=True, default=False, nargs='?',
14
- help='Verbose output')
15
- query_entityLookup_parser.add_argument('-p', const=True, default=False, nargs='?',
16
- help='Pretty print')
17
- query_entityLookup_parser.set_defaults(func=createRequest,operation_name='query.entityLookup')
@@ -1,17 +0,0 @@
1
-
2
- from ..parserApiClient import createRequest, get_help
3
-
4
- def query_events_parse(query_subparsers):
5
- query_events_parser = query_subparsers.add_parser('events',
6
- help='events() query operation',
7
- usage=get_help("query_events"))
8
-
9
- query_events_parser.add_argument('json', help='Variables in JSON format.')
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='?',
12
- help='Print test request preview without sending api call')
13
- query_events_parser.add_argument('-v', const=True, default=False, nargs='?',
14
- help='Verbose output')
15
- query_events_parser.add_argument('-p', const=True, default=False, nargs='?',
16
- help='Pretty print')
17
- query_events_parser.set_defaults(func=createRequest,operation_name='query.events')
@@ -1,17 +0,0 @@
1
-
2
- from ..parserApiClient import createRequest, get_help
3
-
4
- def query_eventsFeed_parse(query_subparsers):
5
- query_eventsFeed_parser = query_subparsers.add_parser('eventsFeed',
6
- help='eventsFeed() query operation',
7
- usage=get_help("query_eventsFeed"))
8
-
9
- query_eventsFeed_parser.add_argument('json', help='Variables in JSON format.')
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='?',
12
- help='Print test request preview without sending api call')
13
- query_eventsFeed_parser.add_argument('-v', const=True, default=False, nargs='?',
14
- help='Verbose output')
15
- query_eventsFeed_parser.add_argument('-p', const=True, default=False, nargs='?',
16
- help='Pretty print')
17
- query_eventsFeed_parser.set_defaults(func=createRequest,operation_name='query.eventsFeed')
@@ -1,17 +0,0 @@
1
-
2
- from ..parserApiClient import createRequest, get_help
3
-
4
- def query_eventsTimeSeries_parse(query_subparsers):
5
- query_eventsTimeSeries_parser = query_subparsers.add_parser('eventsTimeSeries',
6
- help='eventsTimeSeries() query operation',
7
- usage=get_help("query_eventsTimeSeries"))
8
-
9
- query_eventsTimeSeries_parser.add_argument('json', help='Variables in JSON format.')
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='?',
12
- help='Print test request preview without sending api call')
13
- query_eventsTimeSeries_parser.add_argument('-v', const=True, default=False, nargs='?',
14
- help='Verbose output')
15
- query_eventsTimeSeries_parser.add_argument('-p', const=True, default=False, nargs='?',
16
- help='Pretty print')
17
- query_eventsTimeSeries_parser.set_defaults(func=createRequest,operation_name='query.eventsTimeSeries')
@@ -1,17 +0,0 @@
1
-
2
- from ..parserApiClient import createRequest, get_help
3
-
4
- def query_hardwareManagement_parse(query_subparsers):
5
- query_hardwareManagement_parser = query_subparsers.add_parser('hardwareManagement',
6
- help='hardwareManagement() query operation',
7
- usage=get_help("query_hardwareManagement"))
8
-
9
- query_hardwareManagement_parser.add_argument('json', help='Variables in JSON format.')
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='?',
12
- help='Print test request preview without sending api call')
13
- query_hardwareManagement_parser.add_argument('-v', const=True, default=False, nargs='?',
14
- help='Verbose output')
15
- query_hardwareManagement_parser.add_argument('-p', const=True, default=False, nargs='?',
16
- help='Pretty print')
17
- query_hardwareManagement_parser.set_defaults(func=createRequest,operation_name='query.hardwareManagement')
@@ -1,17 +0,0 @@
1
-
2
- from ..parserApiClient import createRequest, get_help
3
-
4
- def query_licensing_parse(query_subparsers):
5
- query_licensing_parser = query_subparsers.add_parser('licensing',
6
- help='licensing() query operation',
7
- usage=get_help("query_licensing"))
8
-
9
- query_licensing_parser.add_argument('json', help='Variables in JSON format.')
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='?',
12
- help='Print test request preview without sending api call')
13
- query_licensing_parser.add_argument('-v', const=True, default=False, nargs='?',
14
- help='Verbose output')
15
- query_licensing_parser.add_argument('-p', const=True, default=False, nargs='?',
16
- help='Pretty print')
17
- query_licensing_parser.set_defaults(func=createRequest,operation_name='query.licensing')
@@ -1,17 +0,0 @@
1
-
2
- from ..parserApiClient import createRequest, get_help
3
-
4
- def query_policy_parse(query_subparsers):
5
- query_policy_parser = query_subparsers.add_parser('policy',
6
- help='policy() query operation',
7
- usage=get_help("query_policy"))
8
-
9
- query_policy_parser.add_argument('json', help='Variables in JSON format.')
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='?',
12
- help='Print test request preview without sending api call')
13
- query_policy_parser.add_argument('-v', const=True, default=False, nargs='?',
14
- help='Verbose output')
15
- query_policy_parser.add_argument('-p', const=True, default=False, nargs='?',
16
- help='Pretty print')
17
- query_policy_parser.set_defaults(func=createRequest,operation_name='query.policy')
@@ -1,17 +0,0 @@
1
-
2
- from ..parserApiClient import querySiteLocation, get_help
3
-
4
- def query_siteLocation_parse(query_subparsers):
5
- query_siteLocation_parser = query_subparsers.add_parser('siteLocation',
6
- help='siteLocation local cli query',
7
- usage=get_help("query_siteLocation"))
8
-
9
- query_siteLocation_parser.add_argument('json', help='Variables in JSON format.')
10
- query_siteLocation_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
11
- query_siteLocation_parser.add_argument('-t', const=True, default=False, nargs='?',
12
- help='Print test request preview without sending api call')
13
- query_siteLocation_parser.add_argument('-v', const=True, default=False, nargs='?',
14
- help='Verbose output')
15
- query_siteLocation_parser.add_argument('-p', const=True, default=False, nargs='?',
16
- help='Pretty print')
17
- query_siteLocation_parser.set_defaults(func=querySiteLocation,operation_name='query.siteLocation')
@@ -1,17 +0,0 @@
1
-
2
- from ..parserApiClient import createRequest, get_help
3
-
4
- def query_subDomains_parse(query_subparsers):
5
- query_subDomains_parser = query_subparsers.add_parser('subDomains',
6
- help='subDomains() query operation',
7
- usage=get_help("query_subDomains"))
8
-
9
- query_subDomains_parser.add_argument('json', help='Variables in JSON format.')
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='?',
12
- help='Print test request preview without sending api call')
13
- query_subDomains_parser.add_argument('-v', const=True, default=False, nargs='?',
14
- help='Verbose output')
15
- query_subDomains_parser.add_argument('-p', const=True, default=False, nargs='?',
16
- help='Pretty print')
17
- query_subDomains_parser.set_defaults(func=createRequest,operation_name='query.subDomains')
@@ -1,37 +0,0 @@
1
-
2
- from ..parserApiClient import createRequest, get_help
3
-
4
- def query_xdr_parse(query_subparsers):
5
- query_xdr_parser = query_subparsers.add_parser('xdr',
6
- help='xdr() query operation',
7
- usage=get_help("query_xdr"))
8
-
9
- query_xdr_subparsers = query_xdr_parser.add_subparsers()
10
-
11
- query_xdr_stories_parser = query_xdr_subparsers.add_parser('stories',
12
- help='stories() xdr operation',
13
- usage=get_help("query_xdr_stories"))
14
-
15
- query_xdr_stories_parser.add_argument('json', help='Variables in JSON format.')
16
- query_xdr_stories_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
17
- query_xdr_stories_parser.add_argument('-t', const=True, default=False, nargs='?',
18
- help='Print test request preview without sending api call')
19
- query_xdr_stories_parser.add_argument('-v', const=True, default=False, nargs='?',
20
- help='Verbose output')
21
- query_xdr_stories_parser.add_argument('-p', const=True, default=False, nargs='?',
22
- help='Pretty print')
23
- query_xdr_stories_parser.set_defaults(func=createRequest,operation_name='query.xdr.stories')
24
-
25
- query_xdr_story_parser = query_xdr_subparsers.add_parser('story',
26
- help='story() xdr operation',
27
- usage=get_help("query_xdr_story"))
28
-
29
- query_xdr_story_parser.add_argument('json', help='Variables in JSON format.')
30
- query_xdr_story_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
31
- query_xdr_story_parser.add_argument('-t', const=True, default=False, nargs='?',
32
- help='Print test request preview without sending api call')
33
- query_xdr_story_parser.add_argument('-v', const=True, default=False, nargs='?',
34
- help='Verbose output')
35
- query_xdr_story_parser.add_argument('-p', const=True, default=False, nargs='?',
36
- help='Pretty print')
37
- query_xdr_story_parser.set_defaults(func=createRequest,operation_name='query.xdr.story')
@@ -1,9 +0,0 @@
1
-
2
- from ..parserApiClient import createRawRequest, get_help
3
-
4
- def raw_parse(raw_parser):
5
- raw_parser.add_argument('json', help='Query, Variables and opertaionName in JSON format.')
6
- raw_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print test request preview without sending api call')
7
- raw_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
8
- raw_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
9
- raw_parser.set_defaults(func=createRawRequest,operation_name='raw')
@@ -1,11 +0,0 @@
1
- # coding: utf-8
2
-
3
- from __future__ import absolute_import
4
-
5
- # # import api into package
6
- from graphql_client.api.call_api import CallApi
7
-
8
- # import ApiClient
9
- from graphql_client.api_client_types import ApiClient
10
- from graphql_client.configuration import Configuration
11
- from graphql_client.models.no_schema import NoSchema
@@ -1,3 +0,0 @@
1
- from __future__ import absolute_import
2
-
3
- from graphql_client.api.call_api import CallApi
@@ -1,73 +0,0 @@
1
- # coding: utf-8
2
-
3
- from __future__ import absolute_import
4
- import re
5
- import json
6
-
7
- # python 2 and python 3 compatibility library
8
- import sys
9
- sys.path.insert(0, 'vendor')
10
- import six
11
- from graphql_client.api_client_types import ApiClient
12
-
13
- class CallApi(object):
14
- def __init__(self, api_client=None):
15
- if api_client is None:
16
- api_client = ApiClient()
17
- self.api_client = api_client
18
-
19
- def call_api(self, body, args, **kwargs): # noqa: E501
20
- (data) = self.call_api_with_http_info(body, args, **kwargs) # noqa: E501
21
- return data
22
-
23
- def call_api_with_http_info(self, body, args, **kwargs): # noqa: E501
24
- all_params = ['body', 'sync_type'] # noqa: E501
25
- all_params.append('async_req')
26
- if args.get("v")==True:
27
- all_params.append('_return_http_data_only')
28
- all_params.append('_preload_content')
29
- all_params.append('_request_timeout')
30
-
31
- params = locals()
32
- for key, val in six.iteritems(params['kwargs']):
33
- if key not in all_params:
34
- raise TypeError(
35
- "Got an unexpected keyword argument '%s'"
36
- " to method create_asset4" % key
37
- )
38
- params[key] = val
39
- del params['kwargs']
40
-
41
- if ('body' not in params or params['body'] is None):
42
- raise ValueError("Missing the required parameter `body` when calling `create_asset4`")
43
-
44
- collection_formats = {}
45
-
46
- header_params = {}
47
-
48
- form_params = []
49
- local_var_files = {}
50
-
51
- body_params = None
52
- if 'body' in params:
53
- body_params = params['body']
54
- header_params['Accept'] = self.api_client.select_header_accept(['application/json'])
55
- header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json'])
56
- header_params['x-api-key'] = self.api_client.configuration.api_key['x-api-key']
57
- header_params['User-Agent'] = "Cato-CLI-v"+self.api_client.configuration.version
58
-
59
- if args.get("v")==True:
60
- print("Host: ",self.api_client.configuration.host)
61
- print("Request Headers:",json.dumps(header_params,indent=4,sort_keys=True))
62
- print("Request Data:",json.dumps(body_params,indent=4,sort_keys=True),"\n\n")
63
-
64
- return self.api_client.call_api(
65
- header_params,
66
- body=body_params,
67
- files=local_var_files,
68
- response_type="NoSchema", # noqa: E501
69
- async_req=params.get('async_req'),
70
- _return_http_data_only=params.get('_return_http_data_only'),
71
- _preload_content=params.get('_preload_content', True),
72
- _request_timeout=params.get('_request_timeout'),
73
- collection_formats=collection_formats)
@@ -1,192 +0,0 @@
1
- # coding: utf-8
2
-
3
- from __future__ import absolute_import
4
-
5
- import io
6
- import json
7
- import logging
8
- import re
9
- import ssl
10
-
11
- # python 2 and python 3 compatibility library
12
- import sys
13
- sys.path.insert(0, 'vendor')
14
- import certifi
15
- import six
16
- from six.moves.urllib.parse import urlencode
17
-
18
- try:
19
- import urllib3
20
- except ImportError:
21
- raise ImportError('GraphQL python client requires urllib3.')
22
-
23
- logger = logging.getLogger(__name__)
24
-
25
- class QUERYResponse(io.IOBase):
26
-
27
- def __init__(self, resp):
28
- self.urllib3_response = resp
29
- self.status = resp.status
30
- self.reason = resp.reason
31
- self.data = resp.data
32
-
33
- def getheaders(self):
34
- """Returns a dictionary of the response headers."""
35
- return self.urllib3_response.getheaders()
36
-
37
- def getheader(self, name, default=None):
38
- """Returns a given response header."""
39
- return self.urllib3_response.getheader(name, default)
40
-
41
- class QUERYClientObject(object):
42
-
43
- def __init__(self, configuration, pools_size=4, maxsize=None):
44
- # urllib3.PoolManager will pass all kw parameters to connectionpool
45
- # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
46
- # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
47
- # maxsize is the number of requests to host that are allowed in parallel # noqa: E501
48
- # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501
49
-
50
- # cert_reqs
51
- if configuration.verify_ssl:
52
- cert_reqs = ssl.CERT_REQUIRED
53
- else:
54
- cert_reqs = ssl.CERT_NONE
55
-
56
- # ca_certs
57
- if configuration.ssl_ca_cert:
58
- ca_certs = configuration.ssl_ca_cert
59
- else:
60
- # if not set certificate file, use Mozilla's root certificates.
61
- ca_certs = certifi.where()
62
-
63
- addition_pool_args = {}
64
- if configuration.assert_hostname is not None:
65
- addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501
66
-
67
- if maxsize is None:
68
- if configuration.connection_pool_maxsize is not None:
69
- maxsize = configuration.connection_pool_maxsize
70
- else:
71
- maxsize = 4
72
-
73
- # https pool manager
74
- if configuration.proxy:
75
- self.pool_manager = urllib3.ProxyManager(
76
- num_pools=pools_size,
77
- maxsize=maxsize,
78
- cert_reqs=cert_reqs,
79
- ca_certs=ca_certs,
80
- cert_file=configuration.cert_file,
81
- key_file=configuration.key_file,
82
- proxy_url=configuration.proxy,
83
- **addition_pool_args
84
- )
85
- else:
86
- self.pool_manager = urllib3.PoolManager(
87
- num_pools=pools_size,
88
- maxsize=maxsize,
89
- cert_reqs=cert_reqs,
90
- ca_certs=ca_certs,
91
- cert_file=configuration.cert_file,
92
- key_file=configuration.key_file,
93
- **addition_pool_args
94
- )
95
-
96
- def request(self, method, url, headers=None,
97
- body=None, _preload_content=True,
98
- _request_timeout=None):
99
- """Perform requests.
100
- :param headers: http request headers
101
- :param body: request json body, for `application/json`
102
- :param _preload_content: if False, the urllib3.HTTPResponse object will
103
- be returned without reading/decoding response
104
- data. Default is True.
105
- :param _request_timeout: timeout setting for this request. If one
106
- number provided, it will be total request
107
- timeout. It can also be a pair (tuple) of
108
- (connection, read) timeouts.
109
- """
110
- method = method.upper()
111
- assert method in ['POST']
112
- headers = headers or {}
113
-
114
- timeout = None
115
- if _request_timeout:
116
- if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821
117
- timeout = urllib3.Timeout(total=_request_timeout)
118
- elif (isinstance(_request_timeout, tuple) and
119
- len(_request_timeout) == 2):
120
- timeout = urllib3.Timeout(
121
- connect=_request_timeout[0], read=_request_timeout[1])
122
-
123
- if 'Content-Type' not in headers:
124
- headers['Content-Type'] = 'application/json'
125
-
126
- try:
127
- if re.search('json', headers['Content-Type'], re.IGNORECASE):
128
- try:
129
- r = self.pool_manager.request( method=method, url=url,
130
- body=json.dumps(body),
131
- preload_content=_preload_content,
132
- timeout=timeout,
133
- headers=headers)
134
- except Exception as e:
135
- # remove the restriction for raw
136
- print("ERROR: ",e)
137
- exit()
138
-
139
- else:
140
- # Cannot generate the request from given parameters
141
- msg = """Cannot prepare a request message for provided
142
- arguments. Please check that your arguments match
143
- declared content type."""
144
- raise ApiException(status=0, reason=msg)
145
-
146
- except urllib3.exceptions.SSLError as e:
147
- msg = "{0}\n{1}".format(type(e).__name__, str(e))
148
- raise ApiException(status=0, reason=msg)
149
-
150
- if _preload_content:
151
- r = QUERYResponse(r)
152
-
153
- # log response body
154
- logger.debug("response body: %s", r.data)
155
-
156
- if not 200 <= r.status <= 299:
157
- raise ApiException(http_resp=r)
158
-
159
- return r
160
-
161
- def POST(self, url, headers=None, body=None, _preload_content=True, _request_timeout=None):
162
- return self.request("POST", url, headers=headers,
163
- _preload_content=_preload_content,
164
- _request_timeout=_request_timeout,
165
- body=body)
166
-
167
- class ApiException(Exception):
168
-
169
- def __init__(self, status=None, reason=None, http_resp=None):
170
- if http_resp:
171
- self.status = http_resp.status
172
- self.reason = http_resp.reason
173
- self.body = http_resp.data
174
- self.headers = http_resp.getheaders()
175
- else:
176
- self.status = status
177
- self.reason = reason
178
- self.body = None
179
- self.headers = None
180
-
181
- def __str__(self):
182
- """Custom error messages for exception"""
183
- if self.body:
184
- # error_message += "HTTP response body:\n{}".format(self.body.decode('utf8'))
185
- return self.body.decode('utf8')
186
- else:
187
- error_message = "({0})\n"\
188
- "Reason: {1}\n".format(self.status, self.reason)
189
- if self.headers:
190
- error_message += "HTTP response headers: {0}\n".format(
191
- self.headers)
192
-