Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

site_path is not supported for NSX < 3.0.0 #468

Merged
merged 1 commit into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nsxt/policy_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func nsxtPolicyWaitForRealizationStateConf(connector *client.RestConnector, d *s
Target: targetStates,
Refresh: func() (interface{}, string, error) {

realizationResult, realizationError := client.List(realizedEntityPath, &policySite)
realizationResult, realizationError := client.List(realizedEntityPath, nil)
if realizationError == nil {
// Find the right entry
for _, objInList := range realizationResult.Results {
Expand Down
3 changes: 0 additions & 3 deletions nsxt/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
)

var defaultRetryOnStatusCodes = []int{429, 503}
var policySite = "default"

// Provider configuration that is shared for policy and MP
type commonProviderConfig struct {
Expand All @@ -45,7 +44,6 @@ type nsxtClients struct {
PolicyHTTPClient *http.Client
Host string
PolicyEnforcementPoint string
PolicySite string
PolicyGlobalManager bool
}

Expand Down Expand Up @@ -529,7 +527,6 @@ func configurePolicyConnectorData(d *schema.ResourceData, clients *nsxtClients)
}
clients.Host = host
clients.PolicyEnforcementPoint = policyEnforcementPoint
clients.PolicySite = policySite
clients.PolicyGlobalManager = policyGlobalManager

return nil
Expand Down
2 changes: 1 addition & 1 deletion nsxt/resource_nsxt_policy_ip_pool_block_subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func resourceNsxtPolicyIPPoolBlockSubnetVerifyDelete(d *schema.ResourceData, con
Target: targetStates,
Refresh: func() (interface{}, string, error) {

_, realizationError := client.List(path, &policySite)
_, realizationError := client.List(path, nil)
if realizationError != nil {
if isNotFoundError(realizationError) {
return 0, "DELETED", nil
Expand Down