Skip to content

Commit

Permalink
Merge pull request #862 from ksamoray/upgrade_sdk
Browse files Browse the repository at this point in the history
Upgrade vSphere golang SDK
  • Loading branch information
ksamoray committed Apr 4, 2023
2 parents d65c3a3 + b2c11e8 commit d1796a8
Show file tree
Hide file tree
Showing 1,229 changed files with 199,733 additions and 164,295 deletions.
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ require (
github.com/hashicorp/go-version v1.4.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.14.0
github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f
github.com/vmware/vsphere-automation-sdk-go/lib v0.4.0
github.com/vmware/vsphere-automation-sdk-go/runtime v0.4.0
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.9.0
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-gm v0.6.0
github.com/vmware/vsphere-automation-sdk-go/lib v0.6.0
github.com/vmware/vsphere-automation-sdk-go/runtime v0.6.0
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.10.0
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-gm v0.7.0
)

require (
Expand All @@ -21,6 +21,7 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/gibson042/canonicaljson-go v1.0.3 // indirect
github.com/golang-jwt/jwt/v4 v4.3.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.7 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
Expand Down
22 changes: 10 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68=
github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog=
github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
Expand Down Expand Up @@ -156,7 +158,6 @@ github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
Expand Down Expand Up @@ -284,14 +285,14 @@ github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37w
github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=
github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f h1:NbC9yOr5At92seXK+kOr2TzU3mIWzcJOVzZasGSuwoU=
github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f/go.mod h1:VEqcmf4Sp7gPB7z05QGyKVmn6xWppr7Nz8cVNvyC80o=
github.com/vmware/vsphere-automation-sdk-go/lib v0.4.0 h1:H341o+0k6BfcehXvCK9w+G/Yx8GgjrWam91ANlsVrE4=
github.com/vmware/vsphere-automation-sdk-go/lib v0.4.0/go.mod h1:o0p10EpvLFXbws63s9vV66+OQwalnXJPNgl+BvPz5PY=
github.com/vmware/vsphere-automation-sdk-go/runtime v0.4.0 h1:SJI34JDj28bZyTI93kCTdklXHaxJUnR+ebkMQ8eWfgA=
github.com/vmware/vsphere-automation-sdk-go/runtime v0.4.0/go.mod h1:GqC85noyNzapJN4vIAO9jJ1EKVo3+jCW4/2VTaMvuSg=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.9.0 h1:P3d7ha+DggRzmg8mDRLxHFvG+9fv7Pz8CfVq02EsOMQ=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.9.0/go.mod h1:bRwsoZpMvmP4GZXWvNDEuvlNe1xLfTtGT+pig2vuH38=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-gm v0.6.0 h1:g+xWuzVFCOUWQIbRs1wF96ZAKtub3VyYM/iXVRWk/w4=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-gm v0.6.0/go.mod h1:ZDc42igMDRrowGWVHSJUSdsM9lDYxoDIXSUguKICHPY=
github.com/vmware/vsphere-automation-sdk-go/lib v0.6.0 h1:CMV5pgZ9r8Brt6LJk3FkCnDi1ceKt0z4nXurp0PlCWY=
github.com/vmware/vsphere-automation-sdk-go/lib v0.6.0/go.mod h1:lVLVxyDgbB3lReG1yzTyJ+XPGJQqpgmoGXtRnAEiy88=
github.com/vmware/vsphere-automation-sdk-go/runtime v0.6.0 h1:BrK3v1N5HCqvFeV+hkGVhvBHLEal9rs3PpcGJynZzt8=
github.com/vmware/vsphere-automation-sdk-go/runtime v0.6.0/go.mod h1:qdzEFm2iK3dvlmm99EYYNxs70HbzuiHyENFD24Ps8fQ=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.10.0 h1:kQX7iAatgdZQ5yLfW2raQrf3oJHPFFTpoyBogL+Davw=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.10.0/go.mod h1:eQ0lZcenQXjbBelgjv0G9MB9ROnrrAna/rQtVunx32k=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-gm v0.7.0 h1:RV2JxhSlpx28rPdOFPSjjaMdIvTcecVS0lG+huYlrIw=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-gm v0.7.0/go.mod h1:EWgcQlI/mn97gwVVhO/ZybwFOsSxXeMrLTyvDFk5k64=
github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down Expand Up @@ -384,7 +385,6 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k=
golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
Expand Down Expand Up @@ -436,7 +436,6 @@ golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand All @@ -450,7 +449,6 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
Expand Down
1 change: 0 additions & 1 deletion nsxt/data_source_nsxt_policy_gateway_locale_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ func dataSourceNsxtPolicyGatewayLocaleServiceRead(d *schema.ResourceData, m inte
}

converter := bindings.NewTypeConverter()
converter.SetMode(bindings.REST)
dataValue, errors := converter.ConvertToGolang(obj, model.LocaleServicesBindingType())
if len(errors) > 0 {
return errors[0]
Expand Down
3 changes: 1 addition & 2 deletions nsxt/data_source_nsxt_policy_gateway_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func dataSourceNsxtPolicyGatewayPolicy() *schema.Resource {
}

// Local Manager Only
func listGatewayPolicies(domain string, connector *client.RestConnector) ([]model.GatewayPolicy, error) {
func listGatewayPolicies(domain string, connector client.Connector) ([]model.GatewayPolicy, error) {
client := domains.NewGatewayPoliciesClient(connector)

var results []model.GatewayPolicy
Expand Down Expand Up @@ -81,7 +81,6 @@ func dataSourceNsxtPolicyGatewayPolicyRead(d *schema.ResourceData, m interface{}
}

converter := bindings.NewTypeConverter()
converter.SetMode(bindings.REST)
dataValue, errors := converter.ConvertToGolang(obj, gm_model.GatewayPolicyBindingType())
if len(errors) > 0 {
return errors[0]
Expand Down
2 changes: 1 addition & 1 deletion nsxt/data_source_nsxt_policy_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func dataSourceNsxtPolicyGroup() *schema.Resource {
}
}

func listPolicyGroups(domain string, connector *client.RestConnector) ([]model.Group, error) {
func listPolicyGroups(domain string, connector client.Connector) ([]model.Group, error) {
// Local Manager only
client := domains.NewGroupsClient(connector)

Expand Down
1 change: 0 additions & 1 deletion nsxt/data_source_nsxt_policy_ipsec_vpn_local_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ func dataSourceNsxtPolicyIPSecVpnLocalEndpointRead(d *schema.ResourceData, m int
}

converter := bindings.NewTypeConverter()
converter.SetMode(bindings.REST)
dataValue, errors := converter.ConvertToGolang(objInt, model.IPSecVpnLocalEndpointBindingType())
if len(errors) > 0 {
return fmt.Errorf("Failed to convert type for Local Endpoint: %v", errors[0])
Expand Down
1 change: 0 additions & 1 deletion nsxt/data_source_nsxt_policy_lb_app_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ func dataSourceNsxtPolicyLBAppProfile() *schema.Resource {

func policyLbAppProfileConvert(obj *data.StructValue, requestedType string) (*model.LBAppProfile, error) {
converter := bindings.NewTypeConverter()
converter.SetMode(bindings.REST)

data, errs := converter.ConvertToGolang(obj, model.LBAppProfileBindingType())
if errs != nil {
Expand Down
1 change: 0 additions & 1 deletion nsxt/data_source_nsxt_policy_lb_app_profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ func testAccDataSourceNsxtPolicyLBAppProfileCreate(name string) error {
}
client := infra.NewLbAppProfilesClient(connector)
converter := bindings.NewTypeConverter()
converter.SetMode(bindings.REST)

displayName := name
description := name
Expand Down
1 change: 0 additions & 1 deletion nsxt/data_source_nsxt_policy_lb_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func dataSourceNsxtPolicyLBMonitor() *schema.Resource {

func policyLbMonitorConvert(obj *data.StructValue, requestedType string) (*model.LBMonitorProfile, error) {
converter := bindings.NewTypeConverter()
converter.SetMode(bindings.REST)

data, errs := converter.ConvertToGolang(obj, model.LBMonitorProfileBindingType())
if errs != nil {
Expand Down
1 change: 0 additions & 1 deletion nsxt/data_source_nsxt_policy_lb_monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ func testAccDataSourceNsxtPolicyLBMonitorCreate(name string) error {
}
client := infra.NewLbMonitorProfilesClient(connector)
converter := bindings.NewTypeConverter()
converter.SetMode(bindings.REST)

displayName := name
description := name
Expand Down
1 change: 0 additions & 1 deletion nsxt/data_source_nsxt_policy_lb_persistence_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ func dataSourceNsxtPolicyLbPersistenceProfileRead(d *schema.ResourceData, m inte
connector := getPolicyConnector(m)
client := infra.NewLbPersistenceProfilesClient(connector)
converter := bindings.NewTypeConverter()
converter.SetMode(bindings.REST)

objID := d.Get("id").(string)
objName := d.Get("display_name").(string)
Expand Down
3 changes: 1 addition & 2 deletions nsxt/data_source_nsxt_policy_security_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func dataSourceNsxtPolicySecurityPolicy() *schema.Resource {
}

// Local Manager Only
func listSecurityPolicies(domain string, connector *client.RestConnector) ([]model.SecurityPolicy, error) {
func listSecurityPolicies(domain string, connector client.Connector) ([]model.SecurityPolicy, error) {
client := domains.NewSecurityPoliciesClient(connector)

var results []model.SecurityPolicy
Expand Down Expand Up @@ -89,7 +89,6 @@ func dataSourceNsxtPolicySecurityPolicyRead(d *schema.ResourceData, m interface{
}

converter := bindings.NewTypeConverter()
converter.SetMode(bindings.REST)
dataValue, errors := converter.ConvertToGolang(obj, gm_model.SecurityPolicyBindingType())
if len(errors) > 0 {
return errors[0]
Expand Down
2 changes: 1 addition & 1 deletion nsxt/data_source_nsxt_policy_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func dataSourceNsxtPolicyService() *schema.Resource {
}
}

func dataSourceNsxtPolicyServiceReadAllServices(connector *client.RestConnector) ([]model.Service, error) {
func dataSourceNsxtPolicyServiceReadAllServices(connector client.Connector) ([]model.Service, error) {
var results []model.Service
client := infra.NewServicesClient(connector)
boolFalse := false
Expand Down
2 changes: 1 addition & 1 deletion nsxt/data_source_nsxt_policy_tier1_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func dataSourceNsxtPolicyTier1Gateway() *schema.Resource {
}
}

func dataSourceNsxtPolicyTier1GatewayReadAllTier1(connector *client.RestConnector) ([]model.Tier1, error) {
func dataSourceNsxtPolicyTier1GatewayReadAllTier1(connector client.Connector) ([]model.Tier1, error) {
var results []model.Tier1
client := infra.NewTier1sClient(connector)
boolFalse := false
Expand Down
1 change: 0 additions & 1 deletion nsxt/data_source_nsxt_policy_transport_zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ func dataSourceNsxtPolicyTransportZoneRead(d *schema.ResourceData, m interface{}
return err
}
converter := bindings.NewTypeConverter()
converter.SetMode(bindings.REST)
dataValue, errors := converter.ConvertToGolang(obj, gm_model.PolicyTransportZoneBindingType())
if len(errors) > 0 {
return errors[0]
Expand Down
11 changes: 5 additions & 6 deletions nsxt/gateway_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func getGatewayIntersiteConfigSchema() *schema.Schema {
}
}

func listPolicyGatewayLocaleServices(connector *client.RestConnector, gwID string, listLocaleServicesFunc func(*client.RestConnector, string, *string) (model.LocaleServicesListResult, error)) ([]model.LocaleServices, error) {
func listPolicyGatewayLocaleServices(connector client.Connector, gwID string, listLocaleServicesFunc func(client.Connector, string, *string) (model.LocaleServicesListResult, error)) ([]model.LocaleServices, error) {
var results []model.LocaleServices
var cursor *string
var count int64
Expand Down Expand Up @@ -269,7 +269,6 @@ func initChildLocaleService(serviceStruct *model.LocaleServices, markForDelete b
}

converter := bindings.NewTypeConverter()
converter.SetMode(bindings.REST)
dataValue, err := converter.ConvertToVapi(childService, model.ChildLocaleServicesBindingType())

if err != nil {
Expand All @@ -279,7 +278,7 @@ func initChildLocaleService(serviceStruct *model.LocaleServices, markForDelete b
return dataValue.(*data.StructValue), nil
}

func initGatewayLocaleServices(d *schema.ResourceData, connector *client.RestConnector, isGlobalManager bool, listLocaleServicesFunc func(*client.RestConnector, string, bool) ([]model.LocaleServices, error)) ([]*data.StructValue, error) {
func initGatewayLocaleServices(d *schema.ResourceData, connector client.Connector, isGlobalManager bool, listLocaleServicesFunc func(client.Connector, string, bool) ([]model.LocaleServices, error)) ([]*data.StructValue, error) {
var localeServices []*data.StructValue

services := d.Get("locale_service").(*schema.Set).List()
Expand Down Expand Up @@ -410,7 +409,7 @@ func setPolicyGatewayIntersiteConfigInSchema(d *schema.ResourceData, config *mod
return d.Set("intersite_config", result)
}

func policyInfraPatch(obj model.Infra, isGlobalManager bool, connector *client.RestConnector, enforceRevision bool) error {
func policyInfraPatch(obj model.Infra, isGlobalManager bool, connector client.Connector, enforceRevision bool) error {
if isGlobalManager {
infraClient := global_policy.NewGlobalInfraClient(connector)
gmObj, err := convertModelBindingType(obj, model.InfraBindingType(), gm_model.InfraBindingType())
Expand Down Expand Up @@ -600,7 +599,7 @@ func getLocaleServiceRedistributionConfig(serviceStruct *model.LocaleServices) [
return redistributionConfigs
}

func findTier0LocaleServiceForSite(connector *client.RestConnector, gwID string, sitePath string) (string, error) {
func findTier0LocaleServiceForSite(connector client.Connector, gwID string, sitePath string) (string, error) {
localeServices, err := listPolicyTier0GatewayLocaleServices(connector, gwID, true)
if err != nil {
return "", err
Expand Down Expand Up @@ -644,7 +643,7 @@ func getComputedGatewayIDSchema() *schema.Schema {
}
}

func policyTier0GetLocaleService(gwID string, localeServiceID string, connector *client.RestConnector, isGlobalManager bool) *model.LocaleServices {
func policyTier0GetLocaleService(gwID string, localeServiceID string, connector client.Connector, isGlobalManager bool) *model.LocaleServices {
if isGlobalManager {
nsxClient := gm_tier0s.NewLocaleServicesClient(connector)
gmObj, err := nsxClient.Get(gwID, localeServiceID)
Expand Down
1 change: 0 additions & 1 deletion nsxt/policy_errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func logVapiErrorData(message string, vapiMessages []std.LocalizableMessage, vap
}

var typeConverter = bindings.NewTypeConverter()
typeConverter.SetMode(bindings.REST)
data, err := typeConverter.ConvertToGolang(apiErrorDataValue, model.ApiErrorBindingType())

// As of today, we cannot trust converter to return error in case target type doesn't
Expand Down
Loading

0 comments on commit d1796a8

Please sign in to comment.