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 CHANGED
@@ -29,7 +29,7 @@ __license__ = "MIT"
29
29
  __contributors__ = [
30
30
  "William Guilherme",
31
31
  ]
32
- __version__ = "1.2.2"
32
+ __version__ = "1.2.4"
33
33
 
34
34
 
35
35
  from zscaler.oneapi_client import Client as ZscalerClient # noqa
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 "os_types" in query_params:
794
- os_raw = query_params["os_types"]
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 `os_types` provided.")
805
- mapped_params["osTypes"] = ",".join(mapped)
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
- >>> for role in zcc.admin_user.list_admin_roles():
143
- ... print(role)
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 = response.get_results()
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)