zscaler-sdk-python 1.2.2__py3-none-any.whl → 1.2.4__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.
- zscaler/__init__.py +1 -1
- zscaler/helpers.py +26 -1
- zscaler/utils.py +19 -4
- zscaler/zcc/admin_user.py +7 -3
- zscaler/zcc/company.py +5 -4
- zscaler/zcc/devices.py +241 -127
- zscaler/zcc/fail_open_policy.py +29 -8
- zscaler/zcc/forwarding_profile.py +31 -9
- zscaler/zcc/models/admin_user.py +1 -1
- zscaler/zcc/models/devices.py +10 -2
- zscaler/zcc/models/getcompanyinfo.py +39 -23
- zscaler/zcc/models/webpolicy.py +528 -26
- zscaler/zcc/secrets.py +55 -31
- zscaler/zcc/trusted_networks.py +57 -6
- zscaler/zcc/web_app_service.py +0 -2
- zscaler/zcc/web_policy.py +41 -24
- zscaler/zcc/web_privacy.py +22 -3
- zscaler/zcc/zcc_service.py +0 -9
- zscaler/zia/legacy.py +10 -0
- zscaler/zia/{cloud_apps.py → shadow_it_report.py} +28 -21
- zscaler/zia/zia_service.py +9 -0
- {zscaler_sdk_python-1.2.2.dist-info → zscaler_sdk_python-1.2.4.dist-info}/METADATA +1 -1
- {zscaler_sdk_python-1.2.2.dist-info → zscaler_sdk_python-1.2.4.dist-info}/RECORD +25 -26
- zscaler/zcc/manage_pass.py +0 -65
- {zscaler_sdk_python-1.2.2.dist-info → zscaler_sdk_python-1.2.4.dist-info}/LICENSE.md +0 -0
- {zscaler_sdk_python-1.2.2.dist-info → zscaler_sdk_python-1.2.4.dist-info}/WHEEL +0 -0
zscaler/__init__.py
CHANGED
zscaler/helpers.py
CHANGED
|
@@ -73,6 +73,7 @@ def to_snake_case(string):
|
|
|
73
73
|
"computeDeviceGroupsForZAD": "compute_device_groups_for_zad",
|
|
74
74
|
"computeDeviceGroupsForZAD": "compute_device_groups_for_zad",
|
|
75
75
|
"deleteDHCPOption121RoutesVisibility": "delete_dhcp_option121_routes_visibility",
|
|
76
|
+
"deleteDHCPOption121Routes": "delete_dhcp_option121_routes",
|
|
76
77
|
"enableOneIDAdminMigrationChanges": "enable_one_id_admin_migration_changes",
|
|
77
78
|
"purgeKerberosPreferredDCCacheVisibility": "purge_kerberos_preferred_dc_cache_visibility",
|
|
78
79
|
"slowRolloutZCC": "slow_rollout_zcc",
|
|
@@ -105,6 +106,18 @@ def to_snake_case(string):
|
|
|
105
106
|
"defaultProtocolForZPA": "default_protocol_for_zpa",
|
|
106
107
|
"tunnelTwoForiOSDevices": "tunnel_two_fori_os_devices",
|
|
107
108
|
"prioritizeIPv4OverIpv6": "prioritize_ipv4_over_ipv6",
|
|
109
|
+
"disableParallelIpv4AndIPv6": "disable_parallel_ipv4_and_ipv6",
|
|
110
|
+
"computeDeviceGroupsForZDX ": "compute_device_groups_for_zdx",
|
|
111
|
+
"logoutZCCForZDXService": "logout_zcc_for_zdx_service",
|
|
112
|
+
"enableZpaDR": "enable_zpa_dr",
|
|
113
|
+
"ziaRSAPubKeyName": "zia_rsa_pub_key_name",
|
|
114
|
+
"ziaRSAPubKey": "zia_rsa_pub_key",
|
|
115
|
+
"zpaRSAPubKeyName": "zpa_rsa_pub_key_name",
|
|
116
|
+
"zpaRSAPubKey": "zpa_rsa_pub_key",
|
|
117
|
+
"truncate_large_udpdns_response": "truncateLargeUDPDNSResponse",
|
|
118
|
+
"enableZCCRevert": "enable_zcc_revert",
|
|
119
|
+
"enableZiaDR": "enable_zia_dr",
|
|
120
|
+
"purge_kerberos_preferred_dc_cache": "purgeKerberosPreferredDCCache"
|
|
108
121
|
}
|
|
109
122
|
|
|
110
123
|
if string in FIELD_EXCEPTIONS:
|
|
@@ -217,7 +230,19 @@ def to_lower_camel_case(string):
|
|
|
217
230
|
"default_protocol_for_zpa": "defaultProtocolForZPA",
|
|
218
231
|
"tunnelTwoForiOSDevices": "tunnel_two_fori_os_devices",
|
|
219
232
|
"prioritize_ipv4_over_ipv6": "prioritizeIPv4OverIpv6",
|
|
220
|
-
|
|
233
|
+
"disable_parallel_ipv4_and_ipv6": "disableParallelIpv4AndIPv6",
|
|
234
|
+
"compute_device_groups_for_zdx": "computeDeviceGroupsForZDX",
|
|
235
|
+
"logout_zcc_for_zdx_service ": "logoutZCCForZDXService",
|
|
236
|
+
"enable_zpa_dr": "enableZpaDR",
|
|
237
|
+
"zia_rsa_pub_key_name": "ziaRSAPubKeyName",
|
|
238
|
+
"zia_rsa_pub_key": "ziaRSAPubKey",
|
|
239
|
+
"zpa_rsa_pub_key_name": "zpaRSAPubKeyName",
|
|
240
|
+
"zpa_rsa_pub_key": "zpaRSAPubKey",
|
|
241
|
+
"truncateLargeUDPDNSResponse": "truncate_large_udpdns_response",
|
|
242
|
+
"enable_zcc_revert": "enableZCCRevert",
|
|
243
|
+
"delete_dhcp_option121_routes": "deleteDHCPOption121Routes",
|
|
244
|
+
"enableZiaDR": "enable_zia_dr",
|
|
245
|
+
"purgeKerberosPreferredDCCache": "purge_kerberos_preferred_dc_cache"
|
|
221
246
|
}
|
|
222
247
|
|
|
223
248
|
if string in FIELD_EXCEPTIONS:
|
zscaler/utils.py
CHANGED
|
@@ -790,8 +790,8 @@ def zcc_param_mapper(func):
|
|
|
790
790
|
mapped_params = {}
|
|
791
791
|
|
|
792
792
|
# Normalize and map os_types
|
|
793
|
-
if "
|
|
794
|
-
os_raw = query_params["
|
|
793
|
+
if "os_type" in query_params:
|
|
794
|
+
os_raw = query_params["os_type"]
|
|
795
795
|
if isinstance(os_raw, str):
|
|
796
796
|
os_raw = [os_raw] # ✅ support single string value
|
|
797
797
|
|
|
@@ -801,8 +801,23 @@ def zcc_param_mapper(func):
|
|
|
801
801
|
if zcc_param_map["os"].get(os_type.lower())
|
|
802
802
|
]
|
|
803
803
|
if not mapped:
|
|
804
|
-
raise ValueError("Invalid `
|
|
805
|
-
mapped_params["
|
|
804
|
+
raise ValueError("Invalid `os_type` provided.")
|
|
805
|
+
mapped_params["osType"] = ",".join(mapped)
|
|
806
|
+
|
|
807
|
+
# Normalize and map os_types
|
|
808
|
+
if "device_type" in query_params:
|
|
809
|
+
os_raw = query_params["device_type"]
|
|
810
|
+
if isinstance(os_raw, str):
|
|
811
|
+
os_raw = [os_raw] # ✅ support single string value
|
|
812
|
+
|
|
813
|
+
mapped = [
|
|
814
|
+
str(zcc_param_map["os"].get(os_type.lower()))
|
|
815
|
+
for os_type in os_raw
|
|
816
|
+
if zcc_param_map["os"].get(os_type.lower())
|
|
817
|
+
]
|
|
818
|
+
if not mapped:
|
|
819
|
+
raise ValueError("Invalid `device_type` provided.")
|
|
820
|
+
mapped_params["deviceType"] = ",".join(mapped)
|
|
806
821
|
|
|
807
822
|
# Normalize and map registration_types
|
|
808
823
|
if "registration_types" in query_params:
|
zscaler/zcc/admin_user.py
CHANGED
|
@@ -139,9 +139,13 @@ class AdminUserAPI(APIClient):
|
|
|
139
139
|
Examples:
|
|
140
140
|
Prints all admin roles in the Client Connector Portal to the console:
|
|
141
141
|
|
|
142
|
-
>>>
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
>>> role_list, _, err = client.zcc.admin_user.list_admin_roles()
|
|
143
|
+
>>> if err:
|
|
144
|
+
... print(f"Error listing admin roles: {err}")
|
|
145
|
+
... return
|
|
146
|
+
... print(f"Total admin roles found: {len(role_list)}")
|
|
147
|
+
... for role in role_list:
|
|
148
|
+
... print(role.as_dict())
|
|
145
149
|
"""
|
|
146
150
|
http_method = "get".upper()
|
|
147
151
|
api_url = format_url(
|
zscaler/zcc/company.py
CHANGED
|
@@ -69,8 +69,9 @@ class CompanyInfoAPI(APIClient):
|
|
|
69
69
|
return (None, response, error)
|
|
70
70
|
|
|
71
71
|
try:
|
|
72
|
-
result =
|
|
72
|
+
result = []
|
|
73
|
+
for item in response.get_results():
|
|
74
|
+
result.append(GetCompanyInfo(self.form_response_body(item)))
|
|
73
75
|
except Exception as error:
|
|
74
|
-
return None, response, error
|
|
75
|
-
|
|
76
|
-
return result, response, None
|
|
76
|
+
return (None, response, error)
|
|
77
|
+
return (result, response, None)
|