Skip to content

Commit ea3e104

Browse files
authored
fix: Fixed ZPA and ZIA Models and utility functions (#292)
* fix: Fixed ZPA and ZIA Models and utility functions
1 parent 1efbd78 commit ea3e104

File tree

8 files changed

+566
-191
lines changed

8 files changed

+566
-191
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Zscaler Python SDK Changelog
22

3+
## 1.4.1 (May, 27 2025)
4+
5+
### Notes
6+
7+
- Python Versions: **v3.8, v3.9, v3.10, v3.11**
8+
9+
### Bug Fixes:
10+
11+
* [PR #292](https://github.com/zscaler/zscaler-sdk-python/pull/292) - Fixed ZPA `application_segment` model missing attribute `passive_health_enabled`
12+
* [PR #292](https://github.com/zscaler/zscaler-sdk-python/pull/292) - Added missing ZIA attribute `nw_services` to `reformat_params` list
13+
314
## 1.4.0 (May, 26 2025)
415

516
### Notes

docsrc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
html_title = ""
2929

3030
# The short X.Y version
31-
version = "1.4.0"
31+
version = "1.4.1"
3232
# The full version, including alpha/beta/rc tags
33-
release = "1.4.0"
33+
release = "1.4.1"
3434

3535
# -- General configuration ---------------------------------------------------
3636

docsrc/zs/guides/release_notes.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@ Release Notes
66
Zscaler Python SDK Changelog
77
----------------------------
88

9+
1.4.1 (May, 27 2025)
10+
-------------------------
11+
12+
Notes
13+
-----
14+
15+
- Python Versions: **v3.8, v3.9, v3.10, v3.11**
16+
17+
Bug Fixes
18+
-----------
19+
20+
* (`#292 <https://github.com/zscaler/zscaler-sdk-python/pull/292>`_) - Fixed ZPA `application_segment` model missing attribute `passive_health_enabled`
21+
* (`#292 <https://github.com/zscaler/zscaler-sdk-python/pull/292>`_) - Added missing ZIA attribute `nw_services` to `reformat_params` list
22+
923
1.4.0 (May, 22 2025)
1024
-------------------------
1125

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "zscaler-sdk-python"
3-
version = "1.4.0"
3+
version = "1.4.1"
44
description = "Official Python SDK for the Zscaler Products"
55
authors = ["Zscaler, Inc. <devrel@zscaler.com>"]
66
license = "MIT"

zscaler/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
__contributors__ = [
3030
"William Guilherme",
3131
]
32-
__version__ = "1.4.0"
32+
__version__ = "1.4.1"
3333

3434

3535
from zscaler.oneapi_client import Client as ZscalerClient # noqa

zscaler/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
("excluded_departments", "excludedDepartments"),
5252
("excluded_groups", "excludedGroups"),
5353
("excluded_users", "excludedUsers"),
54-
("source_ip_groups", "source_ip_groups"),
5554
("dest_ip_groups", "destIpGroups"),
5655
("dest_ipv6_groups", "destIpv6Groups"),
5756
("groups", "groups"),
@@ -62,6 +61,9 @@
6261
("location_groups", "locationGroups"),
6362
("nw_application_groups", "nwApplicationGroups"),
6463
("nw_service_groups", "nwServiceGroups"),
64+
("nw_services", "nwServices"),
65+
("source_ip_groups", "source_ip_groups"),
66+
("source_ip_groups", "sourceIpGroups"),
6567
("src_ip_groups", "srcIpGroups"),
6668
("src_ipv6_groups", "srcIpv6Groups"),
6769
("proxy_gateway", "proxyGateway"),

zscaler/zpa/models/application_segment.py

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,31 @@ def __init__(self, config=None):
3333
self.segment_group_id = config["segmentGroupId"] if "segmentGroupId" in config else None
3434
self.segment_group_name = config["segmentGroupName"] if "segmentGroupName" in config else None
3535
self.enabled = config["enabled"] if "enabled" in config else True
36-
self.double_encrypt = config["doubleEncrypt"] if "doubleEncrypt" in config else False
37-
self.config_space = config["configSpace"] if "configSpace" in config else "DEFAULT"
38-
self.bypass_type = config["bypassType"] if "bypassType" in config else "NEVER"
39-
self.health_check_type = config["healthCheckType"] if "healthCheckType" in config else "NONE"
40-
self.icmp_access_type = config["icmpAccessType"] if "icmpAccessType" in config else "NONE"
41-
self.is_cname_enabled = config["isCnameEnabled"] if "isCnameEnabled" in config else False
42-
self.ip_anchored = config["ipAnchored"] if "ipAnchored" in config else False
43-
self.bypass_on_reauth = config["bypassOnReauth"] if "bypassOnReauth" in config else False
44-
self.inspect_traffic_with_zia = config["inspectTrafficWithZia"] if "inspectTrafficWithZia" in config else False
45-
self.health_reporting = config["healthReporting"] if "healthReporting" in config else "NONE"
46-
self.use_in_dr_mode = config["useInDrMode"] if "useInDrMode" in config else False
47-
self.tcp_keep_alive = config["tcpKeepAlive"] if "tcpKeepAlive" in config else "0"
36+
self.double_encrypt = config["doubleEncrypt"] if "doubleEncrypt" in config else None
37+
self.config_space = config["configSpace"] if "configSpace" in config else None
38+
self.bypass_type = config["bypassType"] if "bypassType" in config else None
39+
self.health_check_type = config["healthCheckType"] if "healthCheckType" in config else None
40+
self.icmp_access_type = config["icmpAccessType"] if "icmpAccessType" in config else None
41+
self.is_cname_enabled = config["isCnameEnabled"] if "isCnameEnabled" in config else None
42+
self.ip_anchored = config["ipAnchored"] if "ipAnchored" in config else None
43+
self.bypass_on_reauth = config["bypassOnReauth"] if "bypassOnReauth" in config else None
44+
self.inspect_traffic_with_zia = config["inspectTrafficWithZia"] if "inspectTrafficWithZia" in config else None
45+
self.health_reporting = config["healthReporting"] if "healthReporting" in config else None
46+
self.use_in_dr_mode = config["useInDrMode"] if "useInDrMode" in config else None
47+
self.tcp_keep_alive = config["tcpKeepAlive"] if "tcpKeepAlive" in config else None
48+
self.passive_health_enabled = config["passiveHealthEnabled"] \
49+
if "passiveHealthEnabled" in config else None
4850
self.select_connector_close_to_app = (
49-
config["selectConnectorCloseToApp"] if "selectConnectorCloseToApp" in config else False
51+
config["selectConnectorCloseToApp"] if "selectConnectorCloseToApp" in config else None
5052
)
51-
self.match_style = config["matchStyle"] if "matchStyle" in config else "EXCLUSIVE"
52-
self.is_incomplete_dr_config = config["isIncompleteDRConfig"] if "isIncompleteDRConfig" in config else False
53-
self.adp_enabled = config["adpEnabled"] if "adpEnabled" in config else False
54-
self.auto_app_protect_enabled = config["autoAppProtectEnabled"] if "autoAppProtectEnabled" in config else False
55-
self.api_protection_enabled = config["apiProtectionEnabled"] if "apiProtectionEnabled" in config else False
56-
self.fqdn_dns_check = config["fqdnDnsCheck"] if "fqdnDnsCheck" in config else False
57-
self.weighted_load_balancing = config["weightedLoadBalancing"] if "weightedLoadBalancing" in config else False
58-
self.extranet_enabled = config["extranetEnabled"] if "extranetEnabled" in config else False
53+
self.match_style = config["matchStyle"] if "matchStyle" in config else None
54+
self.is_incomplete_dr_config = config["isIncompleteDRConfig"] if "isIncompleteDRConfig" in config else None
55+
self.adp_enabled = config["adpEnabled"] if "adpEnabled" in config else None
56+
self.auto_app_protect_enabled = config["autoAppProtectEnabled"] if "autoAppProtectEnabled" in config else None
57+
self.api_protection_enabled = config["apiProtectionEnabled"] if "apiProtectionEnabled" in config else None
58+
self.fqdn_dns_check = config["fqdnDnsCheck"] if "fqdnDnsCheck" in config else None
59+
self.weighted_load_balancing = config["weightedLoadBalancing"] if "weightedLoadBalancing" in config else None
60+
self.extranet_enabled = config["extranetEnabled"] if "extranetEnabled" in config else None
5961
self.microtenant_name = config["microtenantName"]\
6062
if "microtenantName" in config else None
6163
self.microtenant_id = config["microtenantId"] if "microtenantId" in config else None
@@ -159,6 +161,7 @@ def __init__(self, config=None):
159161
self.udp_port_range = []
160162
self.enabled = None
161163
self.double_encrypt = None
164+
self.passive_health_enabled = None
162165
self.config_space = None
163166
self.bypass_type = None
164167
self.health_check_type = None
@@ -207,6 +210,7 @@ def request_format(self):
207210
"configSpace": self.config_space,
208211
"bypassType": self.bypass_type,
209212
"healthCheckType": self.health_check_type,
213+
"passiveHealthEnabled": self.passive_health_enabled,
210214
"icmpAccessType": self.icmp_access_type,
211215
"isCnameEnabled": self.is_cname_enabled,
212216
"ipAnchored": self.ip_anchored,

0 commit comments

Comments
 (0)