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

NSX-T Segment Profile Template support #1120

Merged
merged 34 commits into from
Nov 7, 2023

Conversation

Didainius
Copy link
Collaborator

@Didainius Didainius commented Sep 20, 2023

Segment profiles

Segment profiles include layer 2 configuration details for segments and segment ports. There are several types of segment profiles: IP discovery, MAC discovery, SpoofGuard, quality of service (QoS), and segment security. When you create a segment profile template, you can include only one segment profile of each type. For more details on each type of segment profile, see Segment Profiles in NSX Administration Guide.

About

https://docs.vmware.com/en/VMware-Cloud-Director/10.5/VMware-Cloud-Director-Service-Provider-Admin-Guide/GUID-60F90A6D-1DC6-4C21-A404-B002E71417EF.html

PR Layout

Total of 9 data sources and 4 resources, that can be split in 3 layers:

NSX-T Segment Profile Data Sources

  • vcd_nsxt_segment_ip_discovery_profile
  • vcd_nsxt_segment_mac_discovery_profile
  • vcd_nsxt_segment_spoof_guard_profile
  • vcd_nsxt_segment_qos_profile
  • vcd_nsxt_segment_security_profile

Segment Profile Templates (resource and data source)

Segment Profile Templates are composed of Segment Profiles

  • vcd_nsxt_segment_profile_template

Segment Profile configurations (resource and data source)

The following resources can set default segment profiles at different layers of VCD infrastructure. Each of the lower-level resource can override the higher-level resource

  • vcd_nsxt_global_default_segment_profile_template (global default for VCD)
  • vcd_org_vdc_nsxt_network_profile (default for particular VDC)
  • vcd_nsxt_network_segment_profile (default segment profile for individual segment)

Deprecations

This PR deprecates edge_cluster_id field in vcd_org_vdc (and makes it Computed in addition to being Optional) in favor of separate resource vcd_org_vdc_nsxt_network_profile because it uses a Network Profile endpoint and now VDC default Segment Profile Templates are also configured using that same endpoint. This will give a more granular management.

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>
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>
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>
@Didainius Didainius marked this pull request as ready for review October 4, 2023 08:25
Copy link
Collaborator

@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.

First pass. There is a lot to examine yet, but I wanted to start giving you a heads up on my findings so dar

vcd/config_test.go Outdated Show resolved Hide resolved
vcd/remove_leftovers_test.go Outdated Show resolved Hide resolved
vcd/datasource_vcd_nsxt_ip_discovery_profile.go Outdated Show resolved Hide resolved
vcd/datasource_vcd_nsxt_mac_discovery_profile.go Outdated Show resolved Hide resolved
vcd/datasource_vcd_nsxt_qos_profile.go Outdated Show resolved Hide resolved
vcd/datasource_vcd_nsxt_segment_security_profile.go Outdated Show resolved Hide resolved
vcd/datasource_vcd_nsxt_spoof_guard_profile.go Outdated Show resolved Hide resolved
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Copy link
Collaborator

@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.

Second pass

vcd/resource_vcd_org_vdc_network_profile.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_network_segment_profile.go Outdated Show resolved Hide resolved
vcd/datasource_vcd_nsxt_ip_discovery_profile.go Outdated Show resolved Hide resolved
vcd/datasource_vcd_nsxt_ip_discovery_profile.go Outdated Show resolved Hide resolved
website/docs/d/nsxt_segment_qos_profile.html.markdown Outdated Show resolved Hide resolved
website/docs/d/nsxt_segment_security_profile.html.markdown Outdated Show resolved Hide resolved
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>
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.

Awesome, massive PR! Please find some polishing comments in-line.

vcd/datasource_vcd_nsxt_segment_ip_discovery_profile.go Outdated Show resolved Hide resolved
vcd/datasource_vcd_nsxt_segment_ip_discovery_profile.go Outdated Show resolved Hide resolved
vcd/datasource_vcd_nsxt_segment_ip_discovery_profile.go Outdated Show resolved Hide resolved
website/docs/d/nsxt_segment_qos_profile.html.markdown Outdated Show resolved Hide resolved
website/docs/d/nsxt_segment_security_profile.html.markdown Outdated Show resolved Hide resolved
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.

First scan, I may have slipped things so I'm going for the second 😅

vcd/datasource_vcd_nsxt_network_segment_profile.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_network_segment_profile.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_network_segment_profile.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_network_segment_profile.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_network_segment_profile.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_network_segment_profile.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_network_segment_profile.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_network_segment_profile.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_network_segment_profile_test.go Outdated Show resolved Hide resolved
website/vcd.erb Outdated Show resolved Hide resolved
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
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.

Second pass, looks good to me. Also ran all nsxt tests on 10.5.0, all good!

Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
@Didainius Didainius merged commit dff899e into vmware:main Nov 7, 2023
3 checks passed
@Didainius Didainius deleted the nsxt-segment-profile-templates branch November 7, 2023 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants