Skip to content

Commit

Permalink
Merge pull request #2126 from josip-stanic/feat/use_zt_virtual_ip-CGNAT
Browse files Browse the repository at this point in the history
Enhancement - teams_accounts: Support 'UseZtVirtualIP'
  • Loading branch information
jacobbednarz committed May 24, 2024
2 parents 61f9e34 + fab7000 commit 4426ca8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .changelog/2126.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
teams_accounts: Add `use_zt_virtual_ip` attribute
```
7 changes: 4 additions & 3 deletions teams_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,10 @@ type TeamsLoggingSettings struct {
}

type TeamsDeviceSettings struct {
GatewayProxyEnabled bool `json:"gateway_proxy_enabled"`
GatewayProxyUDPEnabled bool `json:"gateway_udp_proxy_enabled"`
RootCertificateInstallationEnabled bool `json:"root_certificate_installation_enabled"`
GatewayProxyEnabled bool `json:"gateway_proxy_enabled"`
GatewayProxyUDPEnabled bool `json:"gateway_udp_proxy_enabled"`
RootCertificateInstallationEnabled bool `json:"root_certificate_installation_enabled"`
UseZTVirtualIP *bool `json:"use_zt_virtual_ip"`
}

type TeamsDeviceSettingsResponse struct {
Expand Down
7 changes: 5 additions & 2 deletions teams_accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func TestTeamsAccountGetDeviceConfiguration(t *testing.T) {
"success": true,
"errors": [],
"messages": [],
"result": {"gateway_proxy_enabled": true,"gateway_udp_proxy_enabled":false, "root_certificate_installation_enabled":true}
"result": {"gateway_proxy_enabled": true,"gateway_udp_proxy_enabled":false, "root_certificate_installation_enabled":true, "use_zt_virtual_ip":false}
}`)
}

Expand All @@ -302,6 +302,7 @@ func TestTeamsAccountGetDeviceConfiguration(t *testing.T) {
GatewayProxyEnabled: true,
GatewayProxyUDPEnabled: false,
RootCertificateInstallationEnabled: true,
UseZTVirtualIP: BoolPtr(false),
})
}
}
Expand All @@ -317,7 +318,7 @@ func TestTeamsAccountUpdateDeviceConfiguration(t *testing.T) {
"success": true,
"errors": [],
"messages": [],
"result": {"gateway_proxy_enabled": true,"gateway_udp_proxy_enabled":true, "root_certificate_installation_enabled":true}
"result": {"gateway_proxy_enabled": true,"gateway_udp_proxy_enabled":true, "root_certificate_installation_enabled":true, "use_zt_virtual_ip":true}
}`)
}

Expand All @@ -327,13 +328,15 @@ func TestTeamsAccountUpdateDeviceConfiguration(t *testing.T) {
GatewayProxyUDPEnabled: true,
GatewayProxyEnabled: true,
RootCertificateInstallationEnabled: true,
UseZTVirtualIP: BoolPtr(true),
})

if assert.NoError(t, err) {
assert.Equal(t, actual, TeamsDeviceSettings{
GatewayProxyEnabled: true,
GatewayProxyUDPEnabled: true,
RootCertificateInstallationEnabled: true,
UseZTVirtualIP: BoolPtr(true),
})
}
}

0 comments on commit 4426ca8

Please sign in to comment.