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 VDC Network Profile configuration #512

Merged
merged 14 commits into from
Nov 15, 2022

Conversation

Didainius
Copy link
Collaborator

@Didainius Didainius commented Oct 20, 2022

This PR adds support for VCD Network Profile configuration. It is a prerequisite of vmware/terraform-provider-vcd#921. VDC Network Profile configuration is required so that one can assign NSX-T Edge Cluster to VDC. This, in turn, gives the chance to configure DHCP service for NSX-T Isolated Org VDC networks.

The configuration itself is applied for VDC. It has a few rudimentary settings for NSX-V, which are not the scope of this PR and not tested (still should be working for those who can benefit from them in NSX-V world).

The code itself contains API elevation for API 36.2+ (VCD 10.3.2+) where two new configurations appeared - vApp and VDC Segment Profile templates. They also remain untested here as we don't yet have support for them in SDK and the goal of this PR is to add support for NSX-T Edge Cluster assignment to VDC (field ServicesEdgeCluster)

Additionally code for retrieving NSX-T Edge Clusters was improved:

  • vdc.GetAllNsxtEdgeClusters has changed the code to use filtering field orgVdcId instead of deprecated _context field.
  • New functions added VCDClient.GetAllNsxtEdgeClusters which are not bound to VDC. They accept customer filter, which can be defined by consumer. NSX-T Edge Clusters can be filtered by Org VDC (orgVdcId), VDC Group ID (vdcGroupId), and Provider VDC ID (pvdcId)

Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
@Didainius Didainius force-pushed the 255-edge-cluster-support branch from fef84c0 to 65ef692 Compare October 25, 2022 07:27
Signed-off-by: Dainius Serplis <[email protected]>
@Didainius Didainius marked this pull request as ready for review October 25, 2022 10:57
Copy link
Collaborator

@adambarreiro adambarreiro left a comment

Choose a reason for hiding this comment

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

Thanks!

Signed-off-by: Dainius Serplis <[email protected]>
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.

LGTM with just one ask for the PR description.

Copy link
Collaborator

@adambarreiro adambarreiro left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@dataclouder dataclouder left a comment

Choose a reason for hiding this comment

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

LGTM
please make sure we have a check for vcd.config.VCD.Nsxt.NsxtEdgeCluster in vdc_network_profile_test.go before using it

@Didainius Didainius merged commit 696fea7 into vmware:main Nov 15, 2022
@Didainius Didainius deleted the 255-edge-cluster-support branch November 15, 2022 10:06
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.

5 participants