catocli 1.0.5__py3-none-any.whl → 1.0.7__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 +2 -2
- catocli/__init__.py +1 -1
- catocli/parsers/custom/README.md +288 -8
- catocli/parsers/custom/__init__.py +24 -19
- catocli/parsers/custom/customLib.py +1 -1
- {catocli-1.0.5.dist-info → catocli-1.0.7.dist-info}/METADATA +1 -1
- {catocli-1.0.5.dist-info → catocli-1.0.7.dist-info}/RECORD +12 -96
- {catocli-1.0.5.dist-info → catocli-1.0.7.dist-info}/top_level.txt +0 -1
- schema/catolib.py +2 -2
- build/lib/catocli/Utils/clidriver.py +0 -103
- build/lib/catocli/__init__.py +0 -2
- build/lib/catocli/__main__.py +0 -12
- build/lib/catocli/parsers/custom/__init__.py +0 -42
- build/lib/catocli/parsers/custom/customLib.py +0 -71
- build/lib/catocli/parsers/mutation_admin/__init__.py +0 -51
- build/lib/catocli/parsers/mutation_container/__init__.py +0 -23
- build/lib/catocli/parsers/mutation_policy/__init__.py +0 -357
- build/lib/catocli/parsers/mutation_site/__init__.py +0 -219
- build/lib/catocli/parsers/mutation_sites/__init__.py +0 -219
- build/lib/catocli/parsers/parserApiClient.py +0 -312
- build/lib/catocli/parsers/query_accountBySubdomain/__init__.py +0 -17
- build/lib/catocli/parsers/query_accountMetrics/__init__.py +0 -17
- build/lib/catocli/parsers/query_accountRoles/__init__.py +0 -17
- build/lib/catocli/parsers/query_accountSnapshot/__init__.py +0 -17
- build/lib/catocli/parsers/query_admin/__init__.py +0 -17
- build/lib/catocli/parsers/query_admins/__init__.py +0 -17
- build/lib/catocli/parsers/query_appStats/__init__.py +0 -17
- build/lib/catocli/parsers/query_appStatsTimeSeries/__init__.py +0 -17
- build/lib/catocli/parsers/query_auditFeed/__init__.py +0 -17
- build/lib/catocli/parsers/query_container/__init__.py +0 -17
- build/lib/catocli/parsers/query_entityLookup/__init__.py +0 -17
- build/lib/catocli/parsers/query_events/__init__.py +0 -17
- build/lib/catocli/parsers/query_eventsFeed/__init__.py +0 -17
- build/lib/catocli/parsers/query_eventsTimeSeries/__init__.py +0 -17
- build/lib/catocli/parsers/query_hardwareManagement/__init__.py +0 -17
- build/lib/catocli/parsers/query_licensing/__init__.py +0 -17
- build/lib/catocli/parsers/query_policy/__init__.py +0 -17
- build/lib/catocli/parsers/query_siteLocation/__init__.py +0 -17
- build/lib/catocli/parsers/query_subDomains/__init__.py +0 -17
- build/lib/catocli/parsers/query_xdr/__init__.py +0 -37
- build/lib/catocli/parsers/raw/__init__.py +0 -9
- build/lib/graphql_client/__init__.py +0 -11
- build/lib/graphql_client/api/__init__.py +0 -3
- build/lib/graphql_client/api/call_api.py +0 -73
- build/lib/graphql_client/api_client.py +0 -192
- build/lib/graphql_client/api_client_types.py +0 -404
- build/lib/graphql_client/configuration.py +0 -230
- build/lib/graphql_client/models/__init__.py +0 -13
- build/lib/graphql_client/models/no_schema.py +0 -71
- build/lib/schema/catolib.py +0 -1002
- build/lib/schema/importSchema.py +0 -60
- build/lib/vendor/certifi/__init__.py +0 -4
- build/lib/vendor/certifi/__main__.py +0 -12
- build/lib/vendor/certifi/core.py +0 -114
- build/lib/vendor/certifi/py.typed +0 -0
- build/lib/vendor/six.py +0 -998
- build/lib/vendor/urllib3/__init__.py +0 -211
- build/lib/vendor/urllib3/_base_connection.py +0 -172
- build/lib/vendor/urllib3/_collections.py +0 -483
- build/lib/vendor/urllib3/_request_methods.py +0 -278
- build/lib/vendor/urllib3/_version.py +0 -16
- build/lib/vendor/urllib3/connection.py +0 -1033
- build/lib/vendor/urllib3/connectionpool.py +0 -1182
- build/lib/vendor/urllib3/contrib/__init__.py +0 -0
- build/lib/vendor/urllib3/contrib/emscripten/__init__.py +0 -18
- build/lib/vendor/urllib3/contrib/emscripten/connection.py +0 -254
- build/lib/vendor/urllib3/contrib/emscripten/fetch.py +0 -418
- build/lib/vendor/urllib3/contrib/emscripten/request.py +0 -22
- build/lib/vendor/urllib3/contrib/emscripten/response.py +0 -285
- build/lib/vendor/urllib3/contrib/pyopenssl.py +0 -552
- build/lib/vendor/urllib3/contrib/socks.py +0 -228
- build/lib/vendor/urllib3/exceptions.py +0 -321
- build/lib/vendor/urllib3/fields.py +0 -341
- build/lib/vendor/urllib3/filepost.py +0 -89
- build/lib/vendor/urllib3/http2/__init__.py +0 -53
- build/lib/vendor/urllib3/http2/connection.py +0 -356
- build/lib/vendor/urllib3/http2/probe.py +0 -87
- build/lib/vendor/urllib3/poolmanager.py +0 -637
- build/lib/vendor/urllib3/py.typed +0 -2
- build/lib/vendor/urllib3/response.py +0 -1265
- build/lib/vendor/urllib3/util/__init__.py +0 -42
- build/lib/vendor/urllib3/util/connection.py +0 -137
- build/lib/vendor/urllib3/util/proxy.py +0 -43
- build/lib/vendor/urllib3/util/request.py +0 -256
- build/lib/vendor/urllib3/util/response.py +0 -101
- build/lib/vendor/urllib3/util/retry.py +0 -533
- build/lib/vendor/urllib3/util/ssl_.py +0 -513
- build/lib/vendor/urllib3/util/ssl_match_hostname.py +0 -159
- build/lib/vendor/urllib3/util/ssltransport.py +0 -276
- build/lib/vendor/urllib3/util/timeout.py +0 -275
- build/lib/vendor/urllib3/util/url.py +0 -471
- build/lib/vendor/urllib3/util/util.py +0 -42
- build/lib/vendor/urllib3/util/wait.py +0 -124
- {catocli-1.0.5.dist-info → catocli-1.0.7.dist-info}/LICENSE +0 -0
- {catocli-1.0.5.dist-info → catocli-1.0.7.dist-info}/WHEEL +0 -0
- {catocli-1.0.5.dist-info → catocli-1.0.7.dist-info}/entry_points.txt +0 -0
build/lib/schema/importSchema.py
DELETED
|
@@ -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()
|
build/lib/vendor/certifi/core.py
DELETED
|
@@ -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
|