zscaler-sdk-python 0.4.0__tar.gz → 0.5.0__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.
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/PKG-INFO +3 -3
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/pyproject.toml +3 -3
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/__init__.py +1 -1
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/utils.py +35 -3
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/firewall.py +0 -3
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/forwarding_control.py +11 -14
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/zpa_gateway.py +21 -26
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/LICENSE.md +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/README.md +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/cache/__init__.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/cache/cache.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/cache/no_op_cache.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/cache/zscaler_cache.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/constants.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/errors/__init__.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/errors/error.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/errors/http_error.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/errors/zscaler_api_error.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/exceptions/__init__.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/exceptions/exceptions.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/logger.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/ratelimiter/__init__.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/ratelimiter/ratelimiter.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/user_agent.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/__init__.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/activate.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/admin_and_role_management.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/apptotal.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/audit_logs.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/authentication_settings.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/client.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/cloud_apps.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/device_management.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/dlp.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/errors.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/isolation_profile.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/labels.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/locations.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/sandbox.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/security.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/ssl_inspection.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/traffic.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/url_categories.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/url_filtering.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/users.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/web_dlp.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/workload_groups.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/README.md +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/__init__.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/app_segments.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/app_segments_inspection.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/app_segments_pra.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/authdomains.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/certificates.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/client.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/cloud_connector_groups.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/connectors.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/emergency_access.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/errors.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/idp.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/inspection.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/isolation.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/lss.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/machine_groups.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/microtenants.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/policies.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/posture_profiles.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/privileged_remote_access.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/provisioning.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/saml_attributes.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/scim_attributes.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/scim_groups.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/segment_groups.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/server_groups.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/servers.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/service_edges.py +0 -0
- {zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/trusted_networks.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: zscaler-sdk-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Official Python SDK for the Zscaler Products (Beta)
|
|
5
5
|
Home-page: https://github.com/zscaler/zscaler-sdk-python
|
|
6
6
|
License: MIT
|
|
@@ -33,12 +33,12 @@ Requires-Dist: idna
|
|
|
33
33
|
Requires-Dist: okta (>=2.9.7)
|
|
34
34
|
Requires-Dist: pycryptodomex
|
|
35
35
|
Requires-Dist: pydash ; extra == "dev"
|
|
36
|
-
Requires-Dist: python-box (>=7.
|
|
36
|
+
Requires-Dist: python-box (>=7.2.0,<8.0.0)
|
|
37
37
|
Requires-Dist: python-dateutil
|
|
38
38
|
Requires-Dist: pytz
|
|
39
39
|
Requires-Dist: pyyaml
|
|
40
40
|
Requires-Dist: requests (>=2.32.0)
|
|
41
|
-
Requires-Dist: responses (>=0.25.
|
|
41
|
+
Requires-Dist: responses (>=0.25.3)
|
|
42
42
|
Requires-Dist: restfly
|
|
43
43
|
Requires-Dist: six
|
|
44
44
|
Requires-Dist: xmltodict
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "zscaler-sdk-python"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.5.0"
|
|
4
4
|
description = "Official Python SDK for the Zscaler Products (Beta)"
|
|
5
5
|
authors = ["Zscaler, Inc. <devrel@zscaler.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -33,10 +33,10 @@ arrow = "*"
|
|
|
33
33
|
certifi = ">=2024.2.2"
|
|
34
34
|
charset-normalizer = "*"
|
|
35
35
|
idna = "*"
|
|
36
|
-
python-box = "^7.
|
|
36
|
+
python-box = "^7.2.0"
|
|
37
37
|
python-dateutil = "*"
|
|
38
38
|
requests = ">=2.32.0"
|
|
39
|
-
responses = ">=0.25.
|
|
39
|
+
responses = ">=0.25.3"
|
|
40
40
|
restfly = "*"
|
|
41
41
|
six = "*"
|
|
42
42
|
flatdict = "*"
|
|
@@ -147,11 +147,42 @@ def add_id_groups(id_groups: list, kwargs: dict, payload: dict):
|
|
|
147
147
|
return
|
|
148
148
|
|
|
149
149
|
|
|
150
|
+
# def transform_common_id_fields(id_groups: list, kwargs: dict, payload: dict):
|
|
151
|
+
# for entry in id_groups:
|
|
152
|
+
# if kwargs.get(entry[0]):
|
|
153
|
+
# # Ensure each ID is treated as an integer before adding it to the payload
|
|
154
|
+
# payload[entry[1]] = [{"id": int(param_id)} for param_id in kwargs.pop(entry[0])]
|
|
155
|
+
# return
|
|
156
|
+
|
|
157
|
+
# ####### Function used in the ZIA Forwarding Control Rule #######
|
|
158
|
+
# def transform_fwd_id_fields(id_groups: list, kwargs: dict, payload: dict):
|
|
159
|
+
# for entry in id_groups:
|
|
160
|
+
# key, payload_key = entry
|
|
161
|
+
# if key in kwargs:
|
|
162
|
+
# value = kwargs.pop(key)
|
|
163
|
+
# if isinstance(value, dict):
|
|
164
|
+
# payload[payload_key] = {k: v for k, v in value.items() if k in ['id', 'name']}
|
|
165
|
+
# elif isinstance(value, list):
|
|
166
|
+
# payload[payload_key] = [{"id": int(item)} if isinstance(item, str) and item.isdigit() else item for item in value]
|
|
167
|
+
# return
|
|
168
|
+
|
|
150
169
|
def transform_common_id_fields(id_groups: list, kwargs: dict, payload: dict):
|
|
151
170
|
for entry in id_groups:
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
171
|
+
key, payload_key = entry
|
|
172
|
+
if key in kwargs:
|
|
173
|
+
value = kwargs.pop(key)
|
|
174
|
+
if key in ["zpa_gateway", "proxy_gateway", "zpa_server_group"]:
|
|
175
|
+
# Handle zpa_gateway, proxy_gateway, and zpa_server_group
|
|
176
|
+
if isinstance(value, dict):
|
|
177
|
+
payload[payload_key] = {snake_to_camel(k): v for k, v in value.items() if k in ['id', 'name', 'external_id']}
|
|
178
|
+
elif key in ["zpa_app_segments", "zpa_application_segments", "zpa_application_segment_groups"]:
|
|
179
|
+
# Handle zpa_app_segments, zpa_application_segments, and zpa_application_segment_groups
|
|
180
|
+
if isinstance(value, list):
|
|
181
|
+
payload[payload_key] = [{"externalId": item["external_id"], "name": item["name"]} for item in value]
|
|
182
|
+
else:
|
|
183
|
+
# General case for ID transformations
|
|
184
|
+
if isinstance(value, list):
|
|
185
|
+
payload[payload_key] = [{"id": int(item)} if isinstance(item, (str, int)) else item for item in value]
|
|
155
186
|
return
|
|
156
187
|
|
|
157
188
|
|
|
@@ -544,3 +575,4 @@ def dump_response(
|
|
|
544
575
|
log_lines.append(f"\n{response_body}")
|
|
545
576
|
log_lines.append("-" * 68)
|
|
546
577
|
logger.info("\n".join(log_lines))
|
|
578
|
+
|
|
@@ -233,10 +233,7 @@ class FirewallPolicyAPI:
|
|
|
233
233
|
|
|
234
234
|
response = self.rest.put(f"firewallFilteringRules/{rule_id}", json=payload)
|
|
235
235
|
if isinstance(response, Response) and not response.ok:
|
|
236
|
-
# Handle error response
|
|
237
236
|
raise Exception(f"API call failed with status {response.status_code}: {response.json()}")
|
|
238
|
-
|
|
239
|
-
# Return the updated object
|
|
240
237
|
return self.get_rule(rule_id)
|
|
241
238
|
|
|
242
239
|
def delete_rule(self, rule_id: str) -> int:
|
|
@@ -68,10 +68,7 @@ class ForwardingControlAPI:
|
|
|
68
68
|
... pprint(rule)
|
|
69
69
|
|
|
70
70
|
"""
|
|
71
|
-
|
|
72
|
-
if isinstance(response, Response):
|
|
73
|
-
return None
|
|
74
|
-
return response
|
|
71
|
+
return self.rest.get("forwardingRules")
|
|
75
72
|
|
|
76
73
|
def get_rule(self, rule_id: str) -> Box:
|
|
77
74
|
"""
|
|
@@ -158,18 +155,19 @@ class ForwardingControlAPI:
|
|
|
158
155
|
|
|
159
156
|
# Transform ID fields in kwargs
|
|
160
157
|
transform_common_id_fields(self.reformat_params, kwargs, payload)
|
|
158
|
+
|
|
161
159
|
for key, value in kwargs.items():
|
|
162
160
|
if value is not None:
|
|
163
|
-
|
|
161
|
+
if key == "state" and isinstance(value, bool):
|
|
162
|
+
payload[key] = "ENABLED" if value else "DISABLED"
|
|
163
|
+
else:
|
|
164
|
+
payload[key] = value
|
|
164
165
|
|
|
165
166
|
# Convert the entire payload's keys to camelCase before sending
|
|
166
167
|
camel_payload = recursive_snake_to_camel(payload)
|
|
167
|
-
for key, value in kwargs.items():
|
|
168
|
-
if value is not None:
|
|
169
|
-
camel_payload[snake_to_camel(key)] = value
|
|
170
168
|
|
|
171
169
|
# Send POST request to create the rule
|
|
172
|
-
response = self.rest.post("forwardingRules", json=
|
|
170
|
+
response = self.rest.post("forwardingRules", json=camel_payload)
|
|
173
171
|
if isinstance(response, Response):
|
|
174
172
|
# Handle error response
|
|
175
173
|
status_code = response.status_code
|
|
@@ -227,7 +225,6 @@ class ForwardingControlAPI:
|
|
|
227
225
|
... description="TT#1965232866")
|
|
228
226
|
|
|
229
227
|
"""
|
|
230
|
-
|
|
231
228
|
# Set payload to value of existing record and convert nested dict keys.
|
|
232
229
|
payload = convert_keys(self.get_rule(rule_id))
|
|
233
230
|
|
|
@@ -240,14 +237,14 @@ class ForwardingControlAPI:
|
|
|
240
237
|
|
|
241
238
|
# Add remaining optional parameters to payload
|
|
242
239
|
for key, value in kwargs.items():
|
|
243
|
-
|
|
240
|
+
if key == "state" and isinstance(value, bool):
|
|
241
|
+
payload[snake_to_camel(key)] = "ENABLED" if value else "DISABLED"
|
|
242
|
+
else:
|
|
243
|
+
payload[snake_to_camel(key)] = value
|
|
244
244
|
|
|
245
245
|
response = self.rest.put(f"forwardingRules/{rule_id}", json=payload)
|
|
246
246
|
if isinstance(response, Response) and not response.ok:
|
|
247
|
-
# Handle error response
|
|
248
247
|
raise Exception(f"API call failed with status {response.status_code}: {response.json()}")
|
|
249
|
-
|
|
250
|
-
# Return the updated object
|
|
251
248
|
return self.get_rule(rule_id)
|
|
252
249
|
|
|
253
250
|
def delete_rule(self, rule_id: str) -> int:
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
from box import Box, BoxList
|
|
18
18
|
from requests import Response
|
|
19
19
|
|
|
20
|
-
from zscaler.utils import convert_keys, snake_to_camel
|
|
20
|
+
from zscaler.utils import convert_keys, snake_to_camel, transform_common_id_fields
|
|
21
21
|
from zscaler.zia import ZIAClient
|
|
22
22
|
|
|
23
23
|
|
|
@@ -68,7 +68,6 @@ class ZPAGatewayAPI:
|
|
|
68
68
|
self,
|
|
69
69
|
name: str,
|
|
70
70
|
zpa_server_group: dict = None,
|
|
71
|
-
zpa_app_segments: list = None,
|
|
72
71
|
**kwargs,
|
|
73
72
|
) -> Box:
|
|
74
73
|
"""
|
|
@@ -95,24 +94,21 @@ class ZPAGatewayAPI:
|
|
|
95
94
|
"""
|
|
96
95
|
payload = {"name": name, "type": "ZPA"}
|
|
97
96
|
|
|
97
|
+
# Add zpa_server_group to kwargs
|
|
98
98
|
if zpa_server_group:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
kwargs["zpa_server_group"] = zpa_server_group
|
|
100
|
+
|
|
101
|
+
# Define the id groups specific to this function
|
|
102
|
+
zpa_gateway_id_groups = [
|
|
103
|
+
("zpa_server_group", "zpaServerGroup"),
|
|
104
|
+
]
|
|
105
|
+
transform_common_id_fields(zpa_gateway_id_groups, kwargs, payload)
|
|
103
106
|
|
|
104
|
-
if zpa_app_segments:
|
|
105
|
-
payload["zpaAppSegments"] = [
|
|
106
|
-
{"externalId": segment.get("external_id"), "name": segment.get("name")} for segment in zpa_app_segments
|
|
107
|
-
]
|
|
108
|
-
|
|
109
|
-
# Add other optional parameters to payload
|
|
110
107
|
for key, value in kwargs.items():
|
|
111
108
|
payload[snake_to_camel(key)] = value
|
|
112
109
|
|
|
113
110
|
response = self.rest.post("zpaGateways", json=payload)
|
|
114
111
|
if isinstance(response, Response):
|
|
115
|
-
# Handle error response
|
|
116
112
|
status_code = response.status_code
|
|
117
113
|
raise Exception(f"API call failed with status {status_code}: {response.json()}")
|
|
118
114
|
return response
|
|
@@ -143,25 +139,24 @@ class ZPAGatewayAPI:
|
|
|
143
139
|
"""
|
|
144
140
|
payload = convert_keys(self.get_gateway(gateway_id))
|
|
145
141
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
value = [{snake_to_camel(k): v for k, v in item.items()} for item in value]
|
|
142
|
+
if "zpa_server_group" in kwargs:
|
|
143
|
+
kwargs["zpa_server_group"] = kwargs["zpa_server_group"]
|
|
144
|
+
|
|
145
|
+
# Define the id groups specific to this function
|
|
146
|
+
zpa_gateway_id_groups = [
|
|
147
|
+
("zpa_server_group", "zpaServerGroup"),
|
|
148
|
+
]
|
|
154
149
|
|
|
150
|
+
transform_common_id_fields(zpa_gateway_id_groups, kwargs, payload)
|
|
151
|
+
|
|
152
|
+
for key, value in kwargs.items():
|
|
155
153
|
payload[snake_to_camel(key)] = value
|
|
156
154
|
|
|
157
155
|
response = self.rest.put(f"zpaGateways/{gateway_id}", json=payload)
|
|
158
156
|
if isinstance(response, Response) and not response.ok:
|
|
159
|
-
|
|
160
|
-
raise Exception(f"API call failed with status {response.status_code}: " f"{response.json()}")
|
|
161
|
-
|
|
162
|
-
# Return the updated object
|
|
157
|
+
raise Exception(f"API call failed with status {response.status_code}: {response.json()}")
|
|
163
158
|
return self.get_gateway(gateway_id)
|
|
164
|
-
|
|
159
|
+
|
|
165
160
|
def delete_gateway(self, gateway_id):
|
|
166
161
|
"""
|
|
167
162
|
Deletes the specified ZPA Gateway.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/admin_and_role_management.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zia/authentication_settings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/app_segments_inspection.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zscaler_sdk_python-0.4.0 → zscaler_sdk_python-0.5.0}/zscaler/zpa/privileged_remote_access.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|