Skip to content

Commit edf562c

Browse files
authored
NSX-T ALB Virtual Service Transparent mode and Pool Firewall Group membership (VCD 10.4.1+) (#560)
1 parent 3002930 commit edf562c

14 files changed

+209
-17
lines changed

.changes/v2.20.0/560-improvements.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
* Add new field `TransparentModeEnabled` to `types.NsxtAlbVirtualService` which allows to preserve
2+
client IP for NSX-T ALB Virtual Service (VCD 10.4.1+) [GH-560]
3+
* Add new field `MemberGroupRef` to `types.NsxtAlbPool` which allows to define NSX-T ALB Pool
4+
membership by using Edge Firewall Group (`NsxtFirewallGroup`) instead of plain IPs (VCD 10.4.1+)
5+
[GH-560]

govcd/api.go

+7
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,13 @@ func combinedTaskErrorMessage(task *types.Task, err error) string {
687687
return extendedError
688688
}
689689

690+
// addrOf is a generic function to return the address of a variable
691+
// Note. It is mainly meant for converting literal values to pointers (e.g. `addrOf(true)`)
692+
// and not getting the address of a variable (e.g. `addrOf(variable)`)
693+
func addrOf[T any](variable T) *T {
694+
return &variable
695+
}
696+
690697
func takeBoolPointer(value bool) *bool {
691698
return &value
692699
}

govcd/api_vcd_test.go

+19-6
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ type TestConfig struct {
193193
NsxtAlbControllerUser string `yaml:"nsxtAlbControllerUser"`
194194
NsxtAlbControllerPassword string `yaml:"nsxtAlbControllerPassword"`
195195
NsxtAlbImportableCloud string `yaml:"nsxtAlbImportableCloud"`
196+
NsxtAlbServiceEngineGroup string `yaml:"nsxtAlbServiceEngineGroup"`
196197
} `yaml:"nsxt"`
197198
} `yaml:"vcd"`
198199
Logging struct {
@@ -1880,6 +1881,9 @@ func skipNoNsxtAlbConfiguration(vcd *TestVCD, check *C) {
18801881
if vcd.config.VCD.Nsxt.NsxtAlbImportableCloud == "" {
18811882
check.Skip(generalMessage + "No NSX-T ALB Controller Importable Cloud Name")
18821883
}
1884+
if vcd.config.VCD.Nsxt.NsxtAlbServiceEngineGroup == "" {
1885+
check.Skip(generalMessage + "No NSX-T ALB Service Engine Group name specified in configuration")
1886+
}
18831887
}
18841888

18851889
// skipOpenApiEndpointTest is a helper to skip tests for particular unsupported OpenAPI endpoints
@@ -1901,16 +1905,16 @@ func skipOpenApiEndpointTest(vcd *TestVCD, check *C, endpoint string) {
19011905
// newOrgUserConnection creates a new Org User and returns a connection to it.
19021906
// Attention: Set the user to use only lowercase letters. If you put upper case letters the function fails on waiting
19031907
// because VCD creates the user with lowercase letters.
1904-
func newOrgUserConnection(adminOrg *AdminOrg, userName, password, href string, insecure bool) (*VCDClient, error) {
1908+
func newOrgUserConnection(adminOrg *AdminOrg, userName, password, href string, insecure bool) (*VCDClient, *OrgUser, error) {
19051909
u, err := url.ParseRequestURI(href)
19061910
if err != nil {
1907-
return nil, fmt.Errorf("[newOrgUserConnection] unable to pass url: %s", err)
1911+
return nil, nil, fmt.Errorf("[newOrgUserConnection] unable to pass url: %s", err)
19081912
}
19091913

19101914
_, err = adminOrg.GetUserByName(userName, false)
19111915
if err == nil {
19121916
// user exists
1913-
return nil, fmt.Errorf("user %s already exists", userName)
1917+
return nil, nil, fmt.Errorf("user %s already exists", userName)
19141918
}
19151919
_, err = adminOrg.CreateUserSimple(OrgUserConfiguration{
19161920
Name: userName,
@@ -1924,14 +1928,23 @@ func newOrgUserConnection(adminOrg *AdminOrg, userName, password, href string, i
19241928
Description: "Test user created by newOrgUserConnection",
19251929
})
19261930
if err != nil {
1927-
return nil, err
1931+
return nil, nil, err
19281932
}
1933+
19291934
AddToCleanupList(userName, "user", adminOrg.AdminOrg.Name, "newOrgUserConnection")
1935+
19301936
_ = adminOrg.Refresh()
19311937
vcdClient := NewVCDClient(*u, insecure)
19321938
err = vcdClient.Authenticate(userName, password, adminOrg.AdminOrg.Name)
19331939
if err != nil {
1934-
return nil, fmt.Errorf("[newOrgUserConnection] unable to authenticate: %s", err)
1940+
return nil, nil, fmt.Errorf("[newOrgUserConnection] unable to authenticate: %s", err)
19351941
}
1936-
return vcdClient, nil
1942+
1943+
// return newUser
1944+
newUser, err := adminOrg.GetUserByName(userName, false)
1945+
if err != nil {
1946+
return nil, nil, fmt.Errorf("[newOrgUserConnection] unable to retrieve newly created user: %s", err)
1947+
}
1948+
1949+
return vcdClient, newUser, nil
19371950
}

govcd/catalog_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ func (vcd *TestVCD) Test_GetCatalogByXSharedCatalogOrgUser(check *C) {
855855
// Create an Org Admin user and test that it can find catalog as well
856856
adminOrg, err := vcd.client.GetAdminOrgByName(vcd.config.VCD.Org)
857857
check.Assert(err, IsNil)
858-
orgAdminClient, err := newOrgUserConnection(adminOrg, "test-user", "CHANGE-ME", vcd.config.Provider.Url, true)
858+
orgAdminClient, _, err := newOrgUserConnection(adminOrg, "test-user", "CHANGE-ME", vcd.config.Provider.Url, true)
859859
check.Assert(err, IsNil)
860860
orgAsOrgUser, err := orgAdminClient.GetOrgByName(vcd.config.VCD.Org)
861861
check.Assert(err, IsNil)

govcd/nsxt_alb_pool_test.go

+11-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func (vcd *TestVCD) Test_AlbPool(check *C) {
2323
// Setup Org user and connection
2424
adminOrg, err := vcd.client.GetAdminOrgByName(vcd.config.VCD.Org)
2525
check.Assert(err, IsNil)
26-
orgUserVcdClient, err := newOrgUserConnection(adminOrg, "alb-pool-testing", "CHANGE-ME", vcd.config.Provider.Url, true)
26+
orgUserVcdClient, orgUser, err := newOrgUserConnection(adminOrg, "alb-pool-testing", "CHANGE-ME", vcd.config.Provider.Url, true)
2727
check.Assert(err, IsNil)
2828

2929
// defer prerequisite teardown
@@ -40,6 +40,10 @@ func (vcd *TestVCD) Test_AlbPool(check *C) {
4040
testAdvancedPoolConfig(check, edge, vcd, orgUserVcdClient)
4141
testPoolWithCertNoPrivateKey(check, vcd, edge.EdgeGateway.ID, orgUserVcdClient)
4242
testPoolWithCertAndPrivateKey(check, vcd, edge.EdgeGateway.ID, orgUserVcdClient)
43+
44+
// Cleanup Org user
45+
err = orgUser.Delete(true)
46+
check.Assert(err, IsNil)
4347
}
4448

4549
func testMinimalPoolConfig(check *C, edge *NsxtEdgeGateway, vcd *TestVCD, client *VCDClient) {
@@ -255,6 +259,12 @@ func setupAlbPoolPrerequisites(check *C, vcd *TestVCD) (*NsxtAlbController, *Nsx
255259
albSettingsConfig.SupportedFeatureSet = "PREMIUM"
256260
}
257261

262+
// Enable Transparent mode on VCD >= 10.4.1
263+
if vcd.client.Client.APIVCDMaxVersionIs(">= 37.1") {
264+
printVerbose("# Enabling Transparent mode on Edge Gateway (VCD 10.4.1+)\n")
265+
albSettingsConfig.TransparentModeEnabled = addrOf(true)
266+
}
267+
258268
enabledSettings, err := edge.UpdateAlbSettings(albSettingsConfig)
259269
if err != nil {
260270
fmt.Printf("# error occured while enabling ALB on Edge Gateway. Cleaning up Service Engine Group, ALB Cloud and ALB Controller: %s", err)

govcd/nsxt_alb_service_engine_groups_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ func spawnAlbControllerCloudServiceEngineGroup(vcd *TestVCD, check *C, seGroupRe
102102

103103
albController, createdAlbCloud := spawnAlbControllerAndCloud(vcd, check)
104104

105-
importableSeGroups, err := vcd.client.GetAllAlbImportableServiceEngineGroups(createdAlbCloud.NsxtAlbCloud.ID, nil)
105+
importableSeGroup, err := vcd.client.GetAlbImportableServiceEngineGroupByName(createdAlbCloud.NsxtAlbCloud.ID, vcd.config.VCD.Nsxt.NsxtAlbServiceEngineGroup)
106106
check.Assert(err, IsNil)
107-
check.Assert(len(importableSeGroups) > 0, Equals, true)
107+
108108
albSeGroup := &types.NsxtAlbServiceEngineGroup{
109109
Name: check.TestName() + "SE-group",
110110
Description: "Service Engine Group created by " + check.TestName(),
111111
ReservationType: seGroupReservationType,
112112
ServiceEngineGroupBacking: types.ServiceEngineGroupBacking{
113-
BackingId: importableSeGroups[0].NsxtAlbImportableServiceEngineGroups.ID,
113+
BackingId: importableSeGroup.NsxtAlbImportableServiceEngineGroups.ID,
114114
LoadBalancerCloudRef: &types.OpenApiReference{
115115
ID: createdAlbCloud.NsxtAlbCloud.ID,
116116
},

govcd/nsxt_alb_virtual_service_test.go

+123-1
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,53 @@ func (vcd *TestVCD) Test_AlbVirtualService(check *C) {
2323
// Setup Org user and connection
2424
adminOrg, err := vcd.client.GetAdminOrgByName(vcd.config.VCD.Org)
2525
check.Assert(err, IsNil)
26-
orgUserVcdClient, err := newOrgUserConnection(adminOrg, "alb-virtual-service-testing", "CHANGE-ME", vcd.config.Provider.Url, true)
26+
orgUserVcdClient, orgUser, err := newOrgUserConnection(adminOrg, "alb-virtual-service-testing", "CHANGE-ME", vcd.config.Provider.Url, true)
2727
check.Assert(err, IsNil)
2828

29+
printVerbose("# Running tests as Sysadmin user\n")
2930
// Run tests with System user
3031
testMinimalVirtualServiceConfigHTTP(check, edge, albPool, seGroup, vcd, vcd.client)
3132
testVirtualServiceConfigWithCertHTTPS(check, edge, albPool, seGroup, vcd, vcd.client)
3233
testMinimalVirtualServiceConfigL4(check, edge, albPool, seGroup, vcd, vcd.client)
3334
testMinimalVirtualServiceConfigL4TLS(check, edge, albPool, seGroup, vcd, vcd.client)
3435

36+
printVerbose("# Running tests as Org user\n")
3537
// Run tests with Org admin user
3638
testMinimalVirtualServiceConfigHTTP(check, edge, albPool, seGroup, vcd, orgUserVcdClient)
3739
testVirtualServiceConfigWithCertHTTPS(check, edge, albPool, seGroup, vcd, orgUserVcdClient)
3840
testMinimalVirtualServiceConfigL4(check, edge, albPool, seGroup, vcd, orgUserVcdClient)
3941
testMinimalVirtualServiceConfigL4TLS(check, edge, albPool, seGroup, vcd, orgUserVcdClient)
4042

43+
// Test 10.4.1 Transparent mode on VCD >= 10.4.1
44+
if vcd.client.Client.APIVCDMaxVersionIs(">= 37.1") {
45+
printVerbose("# Running 10.4.1+ tests as Sysadmin user\n")
46+
47+
printVerbose("## Creating ALB Pool with Member Group (VCD 10.4.1+) as Sysadmin\n")
48+
ipSet, poolWithMemberGroup := setupAlbPoolFirewallGroupMembers(check, vcd, edge)
49+
50+
testMinimalVirtualServiceConfigHTTPTransparent(check, edge, poolWithMemberGroup, seGroup, vcd, vcd.client, true)
51+
testMinimalVirtualServiceConfigHTTPTransparent(check, edge, poolWithMemberGroup, seGroup, vcd, vcd.client, false)
52+
53+
printVerbose("# Running 10.4.1+ tests as Org user\n")
54+
55+
printVerbose("## Creating ALB Pool with Member Group (VCD 10.4.1+) as Org user\n")
56+
testMinimalVirtualServiceConfigHTTPTransparent(check, edge, poolWithMemberGroup, seGroup, vcd, orgUserVcdClient, true)
57+
testMinimalVirtualServiceConfigHTTPTransparent(check, edge, poolWithMemberGroup, seGroup, vcd, orgUserVcdClient, false)
58+
59+
// cleanup ipset and pool membership
60+
err = poolWithMemberGroup.Delete()
61+
check.Assert(err, IsNil)
62+
63+
err = ipSet.Delete()
64+
check.Assert(err, IsNil)
65+
}
66+
4167
// teardown prerequisites
4268
tearDownAlbVirtualServicePrerequisites(check, albPool, seGroupAssignment, edge, seGroup, cloud, controller)
69+
70+
// cleanup Org user
71+
err = orgUser.Delete(true)
72+
check.Assert(err, IsNil)
4373
}
4474

4575
func testMinimalVirtualServiceConfigHTTP(check *C, edge *NsxtEdgeGateway, pool *NsxtAlbPool, seGroup *NsxtAlbServiceEngineGroup, vcd *TestVCD, client *VCDClient) {
@@ -94,6 +124,63 @@ func testMinimalVirtualServiceConfigHTTP(check *C, edge *NsxtEdgeGateway, pool *
94124
testAlbVirtualServiceConfig(check, vcd, "MinimalHTTP", virtualServiceConfig, virtualServiceConfigUpdated, client)
95125
}
96126

127+
func testMinimalVirtualServiceConfigHTTPTransparent(check *C, edge *NsxtEdgeGateway, poolWithMemberGroup *NsxtAlbPool, seGroup *NsxtAlbServiceEngineGroup, vcd *TestVCD, client *VCDClient, trueOnCreate bool) {
128+
createTransparentMode := trueOnCreate
129+
updateTransparentMode := !createTransparentMode
130+
131+
virtualServiceConfig := &types.NsxtAlbVirtualService{
132+
Name: check.TestName(),
133+
Enabled: addrOf(true),
134+
TransparentModeEnabled: &createTransparentMode,
135+
ApplicationProfile: types.NsxtAlbVirtualServiceApplicationProfile{
136+
SystemDefined: true,
137+
Type: "HTTP",
138+
},
139+
GatewayRef: types.OpenApiReference{ID: edge.EdgeGateway.ID},
140+
LoadBalancerPoolRef: types.OpenApiReference{ID: poolWithMemberGroup.NsxtAlbPool.ID},
141+
ServiceEngineGroupRef: types.OpenApiReference{ID: seGroup.NsxtAlbServiceEngineGroup.ID},
142+
ServicePorts: []types.NsxtAlbVirtualServicePort{
143+
{
144+
PortStart: addrOf(80),
145+
},
146+
},
147+
VirtualIpAddress: edge.EdgeGateway.EdgeGatewayUplinks[0].Subnets.Values[0].PrimaryIP,
148+
}
149+
150+
virtualServiceConfigUpdated := &types.NsxtAlbVirtualService{
151+
Name: check.TestName(),
152+
Description: "Updated",
153+
Enabled: addrOf(true),
154+
TransparentModeEnabled: &updateTransparentMode,
155+
ApplicationProfile: types.NsxtAlbVirtualServiceApplicationProfile{
156+
SystemDefined: true,
157+
Type: "HTTP",
158+
},
159+
GatewayRef: types.OpenApiReference{ID: edge.EdgeGateway.ID},
160+
LoadBalancerPoolRef: types.OpenApiReference{ID: poolWithMemberGroup.NsxtAlbPool.ID},
161+
ServiceEngineGroupRef: types.OpenApiReference{ID: seGroup.NsxtAlbServiceEngineGroup.ID},
162+
ServicePorts: []types.NsxtAlbVirtualServicePort{
163+
{
164+
PortStart: addrOf(443),
165+
PortEnd: addrOf(449),
166+
SslEnabled: addrOf(false),
167+
},
168+
{
169+
PortStart: addrOf(2000),
170+
PortEnd: addrOf(2010),
171+
SslEnabled: addrOf(false),
172+
},
173+
},
174+
// Use Primary IP of Edge Gateway as virtual service IP
175+
VirtualIpAddress: edge.EdgeGateway.EdgeGatewayUplinks[0].Subnets.Values[0].PrimaryIP,
176+
//HealthStatus: "",
177+
//HealthMessage: "",
178+
//DetailedHealthMessage: "",
179+
}
180+
181+
testAlbVirtualServiceConfig(check, vcd, fmt.Sprintf("MinimalHTTPWithTransparentModeOnCreate%t", createTransparentMode), virtualServiceConfig, virtualServiceConfigUpdated, client)
182+
}
183+
97184
func testMinimalVirtualServiceConfigL4(check *C, edge *NsxtEdgeGateway, pool *NsxtAlbPool, seGroup *NsxtAlbServiceEngineGroup, vcd *TestVCD, client *VCDClient) {
98185
virtualServiceConfig := &types.NsxtAlbVirtualService{
99186
Name: check.TestName(),
@@ -363,6 +450,41 @@ func setupAlbVirtualServicePrerequisites(check *C, vcd *TestVCD) (*NsxtAlbContro
363450
return controller, cloud, seGroup, edge, assignedSeGroup, albPool
364451
}
365452

453+
func setupAlbPoolFirewallGroupMembers(check *C, vcd *TestVCD, edge *NsxtEdgeGateway) (*NsxtFirewallGroup, *NsxtAlbPool) {
454+
// creates ip set
455+
ipSetConfig := &types.NsxtFirewallGroup{
456+
Name: check.TestName(),
457+
OwnerRef: &types.OpenApiReference{ID: edge.EdgeGateway.ID},
458+
Description: "Test IP Set",
459+
Type: "IP_SET",
460+
IpAddresses: []string{"1.1.1.1"},
461+
}
462+
463+
ipSet, err := vcd.nsxtVdc.CreateNsxtFirewallGroup(ipSetConfig)
464+
check.Assert(err, IsNil)
465+
466+
// add ip set to cleanup list
467+
openApiEndpoint := types.OpenApiPathVersion1_0_0 + types.OpenApiEndpointFirewallGroups + ipSet.NsxtFirewallGroup.ID
468+
PrependToCleanupListOpenApi(ipSet.NsxtFirewallGroup.Name, check.TestName(), openApiEndpoint)
469+
470+
poolConfig := &types.NsxtAlbPool{
471+
Name: check.TestName() + "-member-group",
472+
Enabled: takeBoolPointer(true),
473+
GatewayRef: types.OpenApiReference{ID: edge.EdgeGateway.ID},
474+
MemberGroupRef: &types.OpenApiReference{
475+
ID: ipSet.NsxtFirewallGroup.ID,
476+
},
477+
}
478+
479+
albPool, err := vcd.client.CreateNsxtAlbPool(poolConfig)
480+
check.Assert(err, IsNil)
481+
482+
openApiEndpoint = types.OpenApiPathVersion1_0_0 + types.OpenApiEndpointAlbPools + albPool.NsxtAlbPool.ID
483+
PrependToCleanupListOpenApi(albPool.NsxtAlbPool.Name, check.TestName(), openApiEndpoint)
484+
485+
return ipSet, albPool
486+
}
487+
366488
func tearDownAlbVirtualServicePrerequisites(check *C, albPool *NsxtAlbPool, assignment *NsxtAlbServiceEngineGroupAssignment, edge *NsxtEdgeGateway, seGroup *NsxtAlbServiceEngineGroup, cloud *NsxtAlbCloud, controller *NsxtAlbController) {
367489
err := albPool.Delete()
368490
check.Assert(err, IsNil)

govcd/nsxt_distributed_firewall_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ package govcd
44

55
import (
66
"fmt"
7-
"github.com/vmware/go-vcloud-director/v2/util"
87
"os"
98
"strconv"
109
"strings"
1110
"text/tabwriter"
1211

12+
"github.com/vmware/go-vcloud-director/v2/util"
13+
1314
"github.com/vmware/go-vcloud-director/v2/types/v56"
1415
. "gopkg.in/check.v1"
1516
)
@@ -41,7 +42,7 @@ func (vcd *TestVCD) Test_NsxtDistributedFirewallRules(check *C) {
4142
// Prep Org admin user and run firewall tests
4243
userName := strings.ToLower(check.TestName())
4344
fmt.Printf("# Running Distributed Firewall tests as Org Admin user '%s'\n", userName)
44-
orgUserVcdClient, err := newOrgUserConnection(adminOrg, userName, "CHANGE-ME", vcd.config.Provider.Url, true)
45+
orgUserVcdClient, _, err := newOrgUserConnection(adminOrg, userName, "CHANGE-ME", vcd.config.Provider.Url, true)
4546
check.Assert(err, IsNil)
4647
orgUserOrgAdmin, err := orgUserVcdClient.GetAdminOrgById(adminOrg.AdminOrg.ID)
4748
check.Assert(err, IsNil)

govcd/nsxt_edgegateway.go

+8
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ func (vdcGroup *VdcGroup) GetNsxtEdgeGatewayByName(name string) (*NsxtEdgeGatewa
126126
return returnSingleNsxtEdgeGateway(name, allEdges)
127127
}
128128

129+
// GetAllNsxtEdgeGateways allows to retrieve all NSX-T Edge Gateways
130+
func (vcdClient *VCDClient) GetAllNsxtEdgeGateways(queryParameters url.Values) ([]*NsxtEdgeGateway, error) {
131+
if vcdClient == nil {
132+
return nil, fmt.Errorf("vcdClient is empty")
133+
}
134+
return getAllNsxtEdgeGateways(&vcdClient.Client, queryParameters)
135+
}
136+
129137
// GetAllNsxtEdgeGateways allows to retrieve all NSX-T edge gateways for Org Admins
130138
func (adminOrg *AdminOrg) GetAllNsxtEdgeGateways(queryParameters url.Values) ([]*NsxtEdgeGateway, error) {
131139
return getAllNsxtEdgeGateways(adminOrg.client, queryParameters)

govcd/sample_govcd_test_config.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,16 @@ vcd:
9494
nsxtImportSegment: vcd-org-vdc-imported-network-backing
9595
# Existing NSX-T Edge Cluster name
9696
nsxtEdgeCluster: existing-nsxt-edge-cluster
97+
# AVI Controller URL
98+
nsxtAlbControllerUrl: https://unknown-hostname.com
99+
# AVI Controller username
100+
nsxtAlbControllerUser: admin
101+
# AVI Controller password
102+
nsxtAlbControllerPassword: CHANGE-ME
103+
# AVI Controller importable Cloud name
104+
nsxtAlbImportableCloud: NSXT AVI Cloud
105+
# Service Engine Group name within (Should be configured in Active Standby mode)
106+
nsxtAlbServiceEngineGroup: active-standby-service-engine-group
97107
# An Org catalog, possibly containing at least one item
98108
catalog:
99109
name: mycat

govcd/security_tags_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func (vcd *TestVCD) Test_SecurityTags(check *C) {
9595

9696
userName := strings.ToLower(check.TestName())
9797
fmt.Printf("# Running Get Security Tag Values test as Org Admin user '%s'\n", userName)
98-
orgUserVcdClient, err := newOrgUserConnection(adminOrg, userName, "CHANGE-ME", vcd.config.Provider.Url, true)
98+
orgUserVcdClient, _, err := newOrgUserConnection(adminOrg, userName, "CHANGE-ME", vcd.config.Provider.Url, true)
9999
check.Assert(err, IsNil)
100100
check.Assert(orgUserVcdClient, NotNil)
101101

govcd/system_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ func (vcd *TestVCD) Test_QueryOrgVdcStorageProfileByID(check *C) {
609609
adminOrg, err := vcd.client.GetAdminOrgByName(vcd.config.VCD.Org)
610610
check.Assert(err, IsNil)
611611

612-
orgUserVcdClient, err := newOrgUserConnection(adminOrg, "query-org-vdc-storage-profile-by-id", "CHANGE-ME", vcd.config.Provider.Url, true)
612+
orgUserVcdClient, _, err := newOrgUserConnection(adminOrg, "query-org-vdc-storage-profile-by-id", "CHANGE-ME", vcd.config.Provider.Url, true)
613613
check.Assert(err, IsNil)
614614

615615
ref, err := vcd.vdc.FindStorageProfileReference(vcd.config.VCD.StorageProfile.SP1)

govcd/vdc_group_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func (vcd *TestVCD) Test_NsxtVdcGroupWithOrgAdmin(check *C) {
212212
check.Assert(adminOrg, NotNil)
213213

214214
skipIfNeededRightsMissing(check, adminOrg)
215-
orgAdminClient, err := newOrgUserConnection(adminOrg, "test-user2", "CHANGE-ME", vcd.config.Provider.Url, true)
215+
orgAdminClient, _, err := newOrgUserConnection(adminOrg, "test-user2", "CHANGE-ME", vcd.config.Provider.Url, true)
216216
check.Assert(err, IsNil)
217217
check.Assert(orgAdminClient, NotNil)
218218

0 commit comments

Comments
 (0)