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

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

Merged
merged 14 commits into from
Oct 4, 2023

Conversation

Didainius
Copy link
Collaborator

@Didainius Didainius commented Aug 24, 2023

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:

  • New internal function *NsxtEdgeGateway.reorderUplinks() that will order NSX-T Edge Gateway uplinks. There are two major types of uplinks
    • NSXT_TIER0 or NSXT_VRF_TIER0 - Tier 0 gateway backed external network (mandatory and is required during creation)
    • IMPORTED_T_LOGICAL_SWITCH NSX-T segment backed external network (this is optional, attached post creation in "External networks" tab)
  • New method NsxtEdgeGateway.GetAllocatedIpCountByUplinkType complementing existing
    NsxtEdgeGateway.GetAllocatedIpCount. It will return allocated IP counts by uplink types (requires VCD 10.4.1+)
  • New method NsxtEdgeGateway.GetPrimaryNetworkAllocatedIpCount that will return total allocated IP
    count for primary uplink (T0 or T0 VRF)
  • New field types.EdgeGatewayUplinks.BackingType that defines backing type of NSX-T Edge Gateway
    Uplink (available in VCD 10.4.1+)

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:

  • 10.5.0
  • 10.4.1
  • 10.4.0
  • 10.4.2

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

Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
.
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
…10.4.0

Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
@Didainius Didainius marked this pull request as ready for review August 31, 2023 06:28
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Didainius Didainius merged commit 4475e45 into vmware:main Oct 4, 2023
@Didainius Didainius deleted the edge-uplinks branch October 4, 2023 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants