catocli 1.0.13__py3-none-any.whl → 1.0.14__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 (107) hide show
  1. catocli/Utils/clidriver.py +11 -2
  2. catocli/__init__.py +1 -1
  3. catocli/parsers/custom/customLib.py +3 -1
  4. catocli/parsers/mutation_site/__init__.py +14 -0
  5. catocli/parsers/mutation_site_addIpsecIkeV2SiteTunnels/README.md +1 -1
  6. catocli/parsers/mutation_site_removeIpsecIkeV2SiteTunnels/README.md +18 -0
  7. catocli/parsers/mutation_sites/__init__.py +14 -0
  8. catocli/parsers/mutation_sites_addIpsecIkeV2SiteTunnels/README.md +1 -1
  9. catocli/parsers/mutation_sites_removeIpsecIkeV2SiteTunnels/README.md +18 -0
  10. {catocli-1.0.13.dist-info → catocli-1.0.14.dist-info}/METADATA +1 -1
  11. {catocli-1.0.13.dist-info → catocli-1.0.14.dist-info}/RECORD +23 -103
  12. {catocli-1.0.13.dist-info → catocli-1.0.14.dist-info}/top_level.txt +0 -2
  13. graphql_client/api_client_types.py +4 -0
  14. models/mutation.site.addIpsecIkeV2SiteTunnels.json +403 -0
  15. models/mutation.site.removeIpsecIkeV2SiteTunnels.json +861 -0
  16. models/mutation.sites.addIpsecIkeV2SiteTunnels.json +403 -0
  17. models/mutation.sites.removeIpsecIkeV2SiteTunnels.json +861 -0
  18. models/query.accountSnapshot.json +162 -2
  19. models/query.licensing.json +126 -0
  20. schema/catolib.py +11 -2
  21. build/lib/catocli/Utils/clidriver.py +0 -117
  22. build/lib/catocli/__init__.py +0 -2
  23. build/lib/catocli/__main__.py +0 -12
  24. build/lib/catocli/parsers/custom/__init__.py +0 -47
  25. build/lib/catocli/parsers/custom/customLib.py +0 -70
  26. build/lib/catocli/parsers/mutation_admin/__init__.py +0 -51
  27. build/lib/catocli/parsers/mutation_container/__init__.py +0 -23
  28. build/lib/catocli/parsers/mutation_policy/__init__.py +0 -357
  29. build/lib/catocli/parsers/mutation_site/__init__.py +0 -219
  30. build/lib/catocli/parsers/mutation_sites/__init__.py +0 -219
  31. build/lib/catocli/parsers/parserApiClient.py +0 -309
  32. build/lib/catocli/parsers/query_accountBySubdomain/__init__.py +0 -17
  33. build/lib/catocli/parsers/query_accountMetrics/__init__.py +0 -17
  34. build/lib/catocli/parsers/query_accountRoles/__init__.py +0 -17
  35. build/lib/catocli/parsers/query_accountSnapshot/__init__.py +0 -17
  36. build/lib/catocli/parsers/query_admin/__init__.py +0 -17
  37. build/lib/catocli/parsers/query_admins/__init__.py +0 -17
  38. build/lib/catocli/parsers/query_appStats/__init__.py +0 -17
  39. build/lib/catocli/parsers/query_appStatsTimeSeries/__init__.py +0 -17
  40. build/lib/catocli/parsers/query_auditFeed/__init__.py +0 -17
  41. build/lib/catocli/parsers/query_container/__init__.py +0 -17
  42. build/lib/catocli/parsers/query_entityLookup/__init__.py +0 -17
  43. build/lib/catocli/parsers/query_events/__init__.py +0 -17
  44. build/lib/catocli/parsers/query_eventsFeed/__init__.py +0 -17
  45. build/lib/catocli/parsers/query_eventsTimeSeries/__init__.py +0 -17
  46. build/lib/catocli/parsers/query_hardwareManagement/__init__.py +0 -17
  47. build/lib/catocli/parsers/query_licensing/__init__.py +0 -17
  48. build/lib/catocli/parsers/query_policy/__init__.py +0 -17
  49. build/lib/catocli/parsers/query_siteLocation/__init__.py +0 -17
  50. build/lib/catocli/parsers/query_subDomains/__init__.py +0 -17
  51. build/lib/catocli/parsers/query_xdr/__init__.py +0 -37
  52. build/lib/catocli/parsers/raw/__init__.py +0 -9
  53. build/lib/graphql_client/__init__.py +0 -11
  54. build/lib/graphql_client/api/__init__.py +0 -3
  55. build/lib/graphql_client/api/call_api.py +0 -73
  56. build/lib/graphql_client/api_client.py +0 -192
  57. build/lib/graphql_client/api_client_types.py +0 -404
  58. build/lib/graphql_client/configuration.py +0 -230
  59. build/lib/graphql_client/models/__init__.py +0 -13
  60. build/lib/graphql_client/models/no_schema.py +0 -71
  61. build/lib/schema/catolib.py +0 -1016
  62. build/lib/schema/importSchema.py +0 -60
  63. build/lib/vendor/certifi/__init__.py +0 -4
  64. build/lib/vendor/certifi/__main__.py +0 -12
  65. build/lib/vendor/certifi/core.py +0 -114
  66. build/lib/vendor/certifi/py.typed +0 -0
  67. build/lib/vendor/six.py +0 -998
  68. build/lib/vendor/urllib3/__init__.py +0 -211
  69. build/lib/vendor/urllib3/_base_connection.py +0 -172
  70. build/lib/vendor/urllib3/_collections.py +0 -483
  71. build/lib/vendor/urllib3/_request_methods.py +0 -278
  72. build/lib/vendor/urllib3/_version.py +0 -16
  73. build/lib/vendor/urllib3/connection.py +0 -1033
  74. build/lib/vendor/urllib3/connectionpool.py +0 -1182
  75. build/lib/vendor/urllib3/contrib/__init__.py +0 -0
  76. build/lib/vendor/urllib3/contrib/emscripten/__init__.py +0 -18
  77. build/lib/vendor/urllib3/contrib/emscripten/connection.py +0 -254
  78. build/lib/vendor/urllib3/contrib/emscripten/fetch.py +0 -418
  79. build/lib/vendor/urllib3/contrib/emscripten/request.py +0 -22
  80. build/lib/vendor/urllib3/contrib/emscripten/response.py +0 -285
  81. build/lib/vendor/urllib3/contrib/pyopenssl.py +0 -552
  82. build/lib/vendor/urllib3/contrib/socks.py +0 -228
  83. build/lib/vendor/urllib3/exceptions.py +0 -321
  84. build/lib/vendor/urllib3/fields.py +0 -341
  85. build/lib/vendor/urllib3/filepost.py +0 -89
  86. build/lib/vendor/urllib3/http2/__init__.py +0 -53
  87. build/lib/vendor/urllib3/http2/connection.py +0 -356
  88. build/lib/vendor/urllib3/http2/probe.py +0 -87
  89. build/lib/vendor/urllib3/poolmanager.py +0 -637
  90. build/lib/vendor/urllib3/py.typed +0 -2
  91. build/lib/vendor/urllib3/response.py +0 -1265
  92. build/lib/vendor/urllib3/util/__init__.py +0 -42
  93. build/lib/vendor/urllib3/util/connection.py +0 -137
  94. build/lib/vendor/urllib3/util/proxy.py +0 -43
  95. build/lib/vendor/urllib3/util/request.py +0 -256
  96. build/lib/vendor/urllib3/util/response.py +0 -101
  97. build/lib/vendor/urllib3/util/retry.py +0 -533
  98. build/lib/vendor/urllib3/util/ssl_.py +0 -513
  99. build/lib/vendor/urllib3/util/ssl_match_hostname.py +0 -159
  100. build/lib/vendor/urllib3/util/ssltransport.py +0 -276
  101. build/lib/vendor/urllib3/util/timeout.py +0 -275
  102. build/lib/vendor/urllib3/util/url.py +0 -471
  103. build/lib/vendor/urllib3/util/util.py +0 -42
  104. build/lib/vendor/urllib3/util/wait.py +0 -124
  105. {catocli-1.0.13.dist-info → catocli-1.0.14.dist-info}/LICENSE +0 -0
  106. {catocli-1.0.13.dist-info → catocli-1.0.14.dist-info}/WHEEL +0 -0
  107. {catocli-1.0.13.dist-info → catocli-1.0.14.dist-info}/entry_points.txt +0 -0
@@ -1,60 +0,0 @@
1
- #!/usr/bin/python
2
- import catolib
3
- import logging
4
- import json
5
-
6
- ############ ENV Settings ############
7
- logging.basicConfig(filename="download-schema.log", filemode='w', format='%(name)s - %(levelname)s - %(message)s')
8
- options = catolib.initParser()
9
-
10
- def run():
11
- # ########################## OPTION 1 ##############################
12
- # ## Uncomment this secion to build cli as one continuous job
13
- # ##################################################################
14
- # query = {
15
- # 'query':'query IntrospectionQuery { __schema { description } }',
16
- # 'operationName':'IntrospectionQuery'
17
- # }
18
- # success,introspection = catolib.send(options.api_key,query)
19
- # catolib.parseSchema(introspection)
20
- # catolib.writeCliDriver(catolib.catoApiSchema)
21
- # catolib.writeOperationParsers(catolib.catoApiSchema)
22
- # catolib.writeReadmes(catolib.catoApiSchema)
23
- # ##################################################################
24
-
25
- ######################### OPTION 2 ##############################
26
- ## Uncomment to manually run each step manually writing files locally
27
- ######################### Step 1 ################################
28
- ## Run intrpsection to pull down schema and write locally
29
- #################################################################
30
- query = {
31
- 'query':'query IntrospectionQuery { __schema { description } }',
32
- 'operationName':'IntrospectionQuery'
33
- }
34
- success,resp = catolib.send(options.api_key,query)
35
- catolib.writeFile("introspection.json",json.dumps(resp, indent=4, sort_keys=True))
36
- # #################################################################
37
-
38
- ######################### Step 2 ################################
39
- ## Load from introsspeection from local file, and
40
- ## use catolib to parse the schema, write locally
41
- ## to catoApiIntrospection.json and catoApiSchema.json
42
- #################################################################
43
- introspection = catolib.loadJSON("introspection.json")
44
- catolib.parseSchema(introspection)
45
- catolib.writeFile("catoApiIntrospection.json",json.dumps(catolib.catoApiIntrospection, indent=4, sort_keys=True))
46
- catolib.writeFile("catoApiSchema.json",json.dumps(catolib.catoApiSchema, indent=4, sort_keys=True))
47
- #################################################################
48
-
49
- ####################### Step 3 ################################
50
- ## Load catoApiSchema from local file, and write cliDriver
51
- ## operation parsers, and readmes locally
52
- #############################################################
53
- catolib.catoApiSchema = catolib.loadJSON("catoApiSchema.json")
54
- catolib.writeCliDriver(catolib.catoApiSchema)
55
- catolib.writeOperationParsers(catolib.catoApiSchema)
56
- catolib.writeReadmes(catolib.catoApiSchema)
57
- ###############################################################
58
-
59
- if __name__ == '__main__':
60
- run()
@@ -1,4 +0,0 @@
1
- from .core import contents, where
2
-
3
- __all__ = ["contents", "where"]
4
- __version__ = "2024.08.30"
@@ -1,12 +0,0 @@
1
- import argparse
2
-
3
- from certifi import contents, where
4
-
5
- parser = argparse.ArgumentParser()
6
- parser.add_argument("-c", "--contents", action="store_true")
7
- args = parser.parse_args()
8
-
9
- if args.contents:
10
- print(contents())
11
- else:
12
- print(where())
@@ -1,114 +0,0 @@
1
- """
2
- certifi.py
3
- ~~~~~~~~~~
4
-
5
- This module returns the installation location of cacert.pem or its contents.
6
- """
7
- import sys
8
- import atexit
9
-
10
- def exit_cacert_ctx() -> None:
11
- _CACERT_CTX.__exit__(None, None, None) # type: ignore[union-attr]
12
-
13
-
14
- if sys.version_info >= (3, 11):
15
-
16
- from importlib.resources import as_file, files
17
-
18
- _CACERT_CTX = None
19
- _CACERT_PATH = None
20
-
21
- def where() -> str:
22
- # This is slightly terrible, but we want to delay extracting the file
23
- # in cases where we're inside of a zipimport situation until someone
24
- # actually calls where(), but we don't want to re-extract the file
25
- # on every call of where(), so we'll do it once then store it in a
26
- # global variable.
27
- global _CACERT_CTX
28
- global _CACERT_PATH
29
- if _CACERT_PATH is None:
30
- # This is slightly janky, the importlib.resources API wants you to
31
- # manage the cleanup of this file, so it doesn't actually return a
32
- # path, it returns a context manager that will give you the path
33
- # when you enter it and will do any cleanup when you leave it. In
34
- # the common case of not needing a temporary file, it will just
35
- # return the file system location and the __exit__() is a no-op.
36
- #
37
- # We also have to hold onto the actual context manager, because
38
- # it will do the cleanup whenever it gets garbage collected, so
39
- # we will also store that at the global level as well.
40
- _CACERT_CTX = as_file(files("certifi").joinpath("cacert.pem"))
41
- _CACERT_PATH = str(_CACERT_CTX.__enter__())
42
- atexit.register(exit_cacert_ctx)
43
-
44
- return _CACERT_PATH
45
-
46
- def contents() -> str:
47
- return files("certifi").joinpath("cacert.pem").read_text(encoding="ascii")
48
-
49
- elif sys.version_info >= (3, 7):
50
-
51
- from importlib.resources import path as get_path, read_text
52
-
53
- _CACERT_CTX = None
54
- _CACERT_PATH = None
55
-
56
- def where() -> str:
57
- # This is slightly terrible, but we want to delay extracting the
58
- # file in cases where we're inside of a zipimport situation until
59
- # someone actually calls where(), but we don't want to re-extract
60
- # the file on every call of where(), so we'll do it once then store
61
- # it in a global variable.
62
- global _CACERT_CTX
63
- global _CACERT_PATH
64
- if _CACERT_PATH is None:
65
- # This is slightly janky, the importlib.resources API wants you
66
- # to manage the cleanup of this file, so it doesn't actually
67
- # return a path, it returns a context manager that will give
68
- # you the path when you enter it and will do any cleanup when
69
- # you leave it. In the common case of not needing a temporary
70
- # file, it will just return the file system location and the
71
- # __exit__() is a no-op.
72
- #
73
- # We also have to hold onto the actual context manager, because
74
- # it will do the cleanup whenever it gets garbage collected, so
75
- # we will also store that at the global level as well.
76
- _CACERT_CTX = get_path("certifi", "cacert.pem")
77
- _CACERT_PATH = str(_CACERT_CTX.__enter__())
78
- atexit.register(exit_cacert_ctx)
79
-
80
- return _CACERT_PATH
81
-
82
- def contents() -> str:
83
- return read_text("certifi", "cacert.pem", encoding="ascii")
84
-
85
- else:
86
- import os
87
- import types
88
- from typing import Union
89
-
90
- Package = Union[types.ModuleType, str]
91
- Resource = Union[str, "os.PathLike"]
92
-
93
- # This fallback will work for Python versions prior to 3.7 that lack the
94
- # importlib.resources module but relies on the existing `where` function
95
- # so won't address issues with environments like PyOxidizer that don't set
96
- # __file__ on modules.
97
- def read_text(
98
- package: Package,
99
- resource: Resource,
100
- encoding: str = 'utf-8',
101
- errors: str = 'strict'
102
- ) -> str:
103
- with open(where(), encoding=encoding) as data:
104
- return data.read()
105
-
106
- # If we don't have importlib.resources, then we will just do the old logic
107
- # of assuming we're on the filesystem and munge the path directly.
108
- def where() -> str:
109
- f = os.path.dirname(__file__)
110
-
111
- return os.path.join(f, "cacert.pem")
112
-
113
- def contents() -> str:
114
- return read_text("certifi", "cacert.pem", encoding="ascii")
File without changes