CPI didn't support Datacenter Group networks because the method GetNsxtEdgeGatewayByName can't handle datacenter group networks. In this PR we have replaced the method with GetNsxtEdgeGatewayById to avoid the issue.
Additionally, added support for Proxy in SwaggerClient.
Testing done:
on a fresh VCD 10.5.1 setup
Created an IP space
Created IP space uplink in the PVDC
Created two OrgVDC that are being powered by this PVDC
Created a data center group from these two Org VDCs
Created a stretched edge gateway and a data center org vdc network
Ran the IP space test : TestGatewayUsingIpSpaces
=== RUN TestGatewayUsingIpSpaces
I0724 14:39:24.036255 58260 auth.go:50] Using VCD OpenAPI version [37.2]
I0724 14:39:25.270434 58260 auth.go:74] Running module as sysadmin [false]
I0724 14:39:25.676547 58260 client.go:201] Client is sysadmin: [false]
I0724 14:39:26.703796 58260 gateway.go:70] Obtained Gateway [provider_vdc_edge] for Network Name [provider_orgvdc_net] of type [NSXT_FLEXIBLE_SEGMENT]
I0724 14:39:28.110271 58260 gateway.go:70] Obtained Gateway [provider_org_edge_no_ipspace] for Network Name [provider_orgvdc_net_no_ipspace] of type [NSXT_FLEXIBLE_SEGMENT]
--- PASS: TestGatewayUsingIpSpaces (4.34s)
PASS
The test passing proves that now CPI can handle Data center group networks.
Note : The VCD testbed is deployed in a private VLAN and can be accessed only via a proxy, hence the modification to SwaggerClient. Govcd client is already proxy aware.
CPI didn't support Datacenter Group networks because the method GetNsxtEdgeGatewayByName can't handle datacenter group networks. In this PR we have replaced the method with GetNsxtEdgeGatewayById to avoid the issue.
Additionally, added support for Proxy in SwaggerClient.
Testing done: on a fresh VCD 10.5.1 setup
The test passing proves that now CPI can handle Data center group networks.
Note : The VCD testbed is deployed in a private VLAN and can be accessed only via a proxy, hence the modification to SwaggerClient. Govcd client is already proxy aware.
Fixes : https://bugzilla.eng.vmware.com/show_bug.cgi?id=3397729