Skip to content

Commit

Permalink
fix: Enhanced filtering capabilities for ZPA app segment pra (#262)
Browse files Browse the repository at this point in the history
* fix: Enhanced filtering capabilities for ZPA app segment pra

* fix: Fixed appConnectorGroups attribute in policysetcontrollerv2 and v1
  • Loading branch information
willguibr authored Jun 25, 2024
1 parent d99f535 commit 019f8bf
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 9 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

# 2.61.3 (June 24, 2024)

## Notes
- Golang: **v1.21**

### Enhancement

- [PR #262](https://github.com/zscaler/zscaler-sdk-go/pull/262) - Enhanced filtering capability for the ZPA GetAll functions in the following packages:
- `applicationsegmentinspection`
- `applicationsegmentpra`

# 2.61.2 (June 21, 2024)

## Notes
Expand Down
13 changes: 12 additions & 1 deletion docs/guides/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,21 @@ Track all Zscaler SDK GO releases. New resources, features, and bug fixes will b

---

``Last updated: v2.61.2``
``Last updated: v2.61.3``

---

# 2.61.3 (June 24, 2024)

## Notes
- Golang: **v1.21**

### Enhancement

- [PR #262](https://github.com/zscaler/zscaler-sdk-go/pull/262) - Enhanced filtering capability for the ZPA GetAll functions in the following packages:
- `applicationsegmentinspection`
- `applicationsegmentpra`

# 2.61.2 (June 21, 2024)

## Notes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ func GetAll(service *services.Service) ([]AppSegmentInspection, *http.Response,
return nil, nil, err
}
result := []AppSegmentInspection{}
// filter inspection apps
// filter pra apps
for _, item := range list {
if len(item.CommonAppsDto.AppsConfig) > 0 && common.InList(item.CommonAppsDto.AppsConfig[0].AppTypes, "INSPECT") {
if len(item.InspectionAppDto) > 0 {
result = append(result, item)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func GetAll(service *services.Service) ([]AppSegmentPRA, *http.Response, error)
result := []AppSegmentPRA{}
// filter pra apps
for _, item := range list {
if len(item.CommonAppsDto.AppsConfig) == 0 || (!common.InList(item.CommonAppsDto.AppsConfig[0].AppTypes, "SECURE_REMOTE_ACCESS") && !common.InList(item.CommonAppsDto.AppsConfig[0].AppTypes, "INSPECT")) {
if len(item.PRAApps) > 0 {
result = append(result, item)
}
}
Expand Down
1 change: 0 additions & 1 deletion zpa/services/policysetcontroller/policysetcontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ type PolicyRule struct {
DefaultRuleName string `json:"defaultRuleName,omitempty"`
Description string `json:"description,omitempty"`
ID string `json:"id,omitempty"`
IsolationDefaultRule bool `json:"isolationDefaultRule"`
ModifiedBy string `json:"modifiedBy,omitempty"`
ModifiedTime string `json:"modifiedTime,omitempty"`
Name string `json:"name,omitempty"`
Expand Down
8 changes: 4 additions & 4 deletions zpa/services/policysetcontrollerv2/policysetcontrollerv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,22 @@ type PolicyRuleResource struct {
ModifiedTime string `json:"modifiedTime,omitempty"`
AuditMessage string `json:"auditMessage,omitempty"`
CustomMsg string `json:"customMsg,omitempty"`
DefaultRule bool `json:"defaultRule,omitempty"`
DefaultRuleName string `json:"defaultRuleName,omitempty"`
Operator string `json:"operator,omitempty"`
PolicySetID string `json:"policySetId,omitempty"`
PolicyType string `json:"policyType,omitempty"`
Priority string `json:"priority,omitempty"`
ReauthIdleTimeout string `json:"reauthIdleTimeout,omitempty"`
ReauthTimeout string `json:"reauthTimeout,omitempty"`
RuleOrder string `json:"ruleOrder,omitempty"`
ZpnCbiProfileID string `json:"zpnCbiProfileId,omitempty"`
ZpnIsolationProfileID string `json:"zpnIsolationProfileId,omitempty"`
ZpnInspectionProfileID string `json:"zpnInspectionProfileId,omitempty"`
ZpnInspectionProfileName string `json:"zpnInspectionProfileName,omitempty"`
MicroTenantID string `json:"microtenantId,omitempty"`
MicroTenantName string `json:"microtenantName,omitempty"`
Conditions []PolicyRuleResourceConditions `json:"conditions,omitempty"`
AppConnectorGroups []AppConnectorGroups `json:"connectorGroups,omitempty"`
AppConnectorGroups []AppConnectorGroups `json:"appConnectorGroups,omitempty"`
AppServerGroups []AppServerGroups `json:"appServerGroups,omitempty"`
ServiceEdgeGroups []ServiceEdgeGroups `json:"serviceEdgeGroups,omitempty"`
Credential *Credential `json:"credential,omitempty"`
Expand Down Expand Up @@ -117,8 +118,7 @@ type PolicyRule struct {
ZpnInspectionProfileName string `json:"zpnInspectionProfileName,omitempty"`
MicroTenantID string `json:"microtenantId,omitempty"`
MicroTenantName string `json:"microtenantName,omitempty"`
Version string `json:"version,omitempty"`
AppConnectorGroups []AppConnectorGroups `json:"connectorGroups,omitempty"`
AppConnectorGroups []AppConnectorGroups `json:"appConnectorGroups,omitempty"`
AppServerGroups []AppServerGroups `json:"appServerGroups,omitempty"`
ServiceEdgeGroups []ServiceEdgeGroups `json:"serviceEdgeGroups,omitempty"`
Conditions []PolicyRuleResourceConditions `json:"conditions,omitempty"`
Expand Down

0 comments on commit 019f8bf

Please sign in to comment.