zscaler-sdk-python 0.5.1__tar.gz → 0.5.2__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.5.1 → zscaler_sdk_python-0.5.2}/PKG-INFO +1 -1
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/pyproject.toml +1 -1
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/__init__.py +1 -1
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/firewall.py +29 -12
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/LICENSE.md +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/README.md +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/cache/__init__.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/cache/cache.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/cache/no_op_cache.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/cache/zscaler_cache.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/constants.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/errors/__init__.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/errors/error.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/errors/http_error.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/errors/zscaler_api_error.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/exceptions/__init__.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/exceptions/exceptions.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/logger.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/ratelimiter/__init__.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/ratelimiter/ratelimiter.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/user_agent.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/utils.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/__init__.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/activate.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/admin_and_role_management.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/apptotal.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/audit_logs.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/authentication_settings.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/client.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/cloud_apps.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/device_management.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/dlp.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/errors.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/forwarding_control.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/isolation_profile.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/labels.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/locations.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/sandbox.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/security.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/ssl_inspection.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/traffic.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/url_categories.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/url_filtering.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/users.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/web_dlp.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/workload_groups.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/zpa_gateway.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/README.md +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/__init__.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/app_segments.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/app_segments_inspection.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/app_segments_pra.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/authdomains.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/certificates.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/client.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/cloud_connector_groups.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/connectors.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/emergency_access.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/errors.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/idp.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/inspection.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/isolation.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/lss.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/machine_groups.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/microtenants.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/policies.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/posture_profiles.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/privileged_remote_access.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/provisioning.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/saml_attributes.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/scim_attributes.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/scim_groups.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/segment_groups.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/server_groups.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/servers.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/service_edges.py +0 -0
- {zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zpa/trusted_networks.py +0 -0
|
@@ -920,13 +920,11 @@ class FirewallPolicyAPI:
|
|
|
920
920
|
|
|
921
921
|
response = self.rest.post("networkServices", json=payload)
|
|
922
922
|
if isinstance(response, Response):
|
|
923
|
-
# this is only true when the creation failed (status code is not 2xx)
|
|
924
923
|
status_code = response.status_code
|
|
925
|
-
# Handle error response
|
|
926
924
|
raise Exception(f"API call failed with status {status_code}: {response.json()}")
|
|
927
925
|
return response
|
|
928
926
|
|
|
929
|
-
def update_network_service(self, service_id: str, ports: list = None, **kwargs) ->
|
|
927
|
+
def update_network_service(self, service_id: str, ports: list = None, **kwargs) -> dict:
|
|
930
928
|
"""
|
|
931
929
|
Updates the specified Network Service.
|
|
932
930
|
|
|
@@ -952,7 +950,7 @@ class FirewallPolicyAPI:
|
|
|
952
950
|
description (str): Additional information on the Network Service.
|
|
953
951
|
|
|
954
952
|
Returns:
|
|
955
|
-
:obj:`
|
|
953
|
+
:obj:`dict`: The updated Network Service resource record.
|
|
956
954
|
|
|
957
955
|
Examples:
|
|
958
956
|
Update the name and description for a Network Service:
|
|
@@ -963,28 +961,47 @@ class FirewallPolicyAPI:
|
|
|
963
961
|
|
|
964
962
|
Updates the ports for a Network Service, leaving other fields intact:
|
|
965
963
|
|
|
966
|
-
>>> zia.firewall.
|
|
964
|
+
>>> zia.firewall.update_network_service('959093',
|
|
967
965
|
... ports=[
|
|
968
966
|
... ('dest', 'tcp', '500', '510')])
|
|
969
967
|
|
|
970
968
|
"""
|
|
971
|
-
|
|
969
|
+
# Fetch the existing network service details
|
|
970
|
+
existing_service = self.get_network_service(service_id).to_dict()
|
|
971
|
+
|
|
972
|
+
# Build the payload
|
|
973
|
+
payload = {
|
|
974
|
+
"id": service_id,
|
|
975
|
+
"name": existing_service["name"],
|
|
976
|
+
"description": existing_service.get("description", ""),
|
|
977
|
+
"type": existing_service.get("type", "CUSTOM"),
|
|
978
|
+
}
|
|
972
979
|
|
|
973
980
|
# Convert tuple list to dict and add to payload
|
|
974
981
|
if ports is not None:
|
|
975
|
-
# Clear existing ports and set new values
|
|
976
982
|
for items in ports:
|
|
977
|
-
|
|
978
|
-
payload[port_key] = []
|
|
979
|
-
payload[port_key].append({"start": items[2]})
|
|
983
|
+
port_dict = {"start": int(items[2])}
|
|
980
984
|
if len(items) == 4:
|
|
981
|
-
|
|
985
|
+
port_dict["end"] = int(items[3])
|
|
986
|
+
payload.setdefault(f"{items[0]}{items[1].title()}Ports", []).append(port_dict)
|
|
987
|
+
else:
|
|
988
|
+
# Use existing ports if not provided
|
|
989
|
+
for key in ["src_tcp_ports", "dest_tcp_ports", "src_udp_ports", "dest_udp_ports"]:
|
|
990
|
+
if key in existing_service:
|
|
991
|
+
payload[snake_to_camel(key)] = existing_service[key]
|
|
982
992
|
|
|
983
993
|
# Add optional parameters to payload
|
|
984
994
|
for key, value in kwargs.items():
|
|
985
995
|
payload[snake_to_camel(key)] = value
|
|
986
996
|
|
|
987
|
-
|
|
997
|
+
# Remove invalid attributes from the payload
|
|
998
|
+
payload.pop("creator_context", None)
|
|
999
|
+
payload.pop("is_name_l10n_tag", None)
|
|
1000
|
+
|
|
1001
|
+
response = self.rest.put(f"networkServices/{service_id}", json=payload)
|
|
1002
|
+
if isinstance(response, Response) and not response.ok:
|
|
1003
|
+
raise Exception(f"API call failed with status {response.status_code}: {response.json()}")
|
|
1004
|
+
return self.get_network_service(service_id)
|
|
988
1005
|
|
|
989
1006
|
def list_time_windows(self) -> Box:
|
|
990
1007
|
"""
|
|
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.5.1 → zscaler_sdk_python-0.5.2}/zscaler/zia/admin_and_role_management.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/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
|
|
File without changes
|
|
File without changes
|
{zscaler_sdk_python-0.5.1 → zscaler_sdk_python-0.5.2}/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.5.1 → zscaler_sdk_python-0.5.2}/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
|