vmware / go-vcloud-director

Golang SDK for VMware Cloud Director
Other
80 stars 79 forks source link

Add support for NSX-T Edge Gateway External Uplink configuration #610

Closed Didainius closed 10 months ago

Didainius commented 1 year ago

This PR adds missing pieces to support NSX-T Edge Gateway External Network uplinks (only for external networks backed by NSX-T Segments) (VCD 10.4.1+)

List of things added:

Note on uplink ordering. API usually returns the mandatory network as element 0 in the resulting slice, but there have been cases where VCD sometimes shuffles these responses (don't have a proof for this particular endpoint). As a result - the reorderUplinks function is here to ensure that NSXT_TIER0 or NSXT_VRF_TIER0uplink is always at position 0. It is also used in all functions related to NSX-T Edge Gateway.

Tested with tags nsxt gateway network:

Tests are for admin mode only, skip directive for Org tests is in place. The test requires 10.4.1+.