Skip to content

NSX: configure segment discovery and security profiles - #13791

Draft
Dogface2k wants to merge 2 commits into
apache:mainfrom
Dogface2k:feature/nsx-segment-profile-bindings
Draft

NSX: configure segment discovery and security profiles#13791
Dogface2k wants to merge 2 commits into
apache:mainfrom
Dogface2k:feature/nsx-segment-profile-bindings

Conversation

@Dogface2k

@Dogface2k Dogface2k commented Aug 4, 2026

Copy link
Copy Markdown

Summary

  • expose optional IP discovery, MAC discovery, and segment security profiles on NSX network offerings;
  • validate that referenced profiles resolve to the requested canonical resource and are not marked for deletion;
  • bind selected profiles in the same hierarchical NSX request as segment creation;
  • reject profile changes on existing networks instead of silently reconfiguring an active segment;
  • add focused API, NSX client, resource, guru, and configuration coverage.

When no profiles are configured, segment creation keeps the existing behavior. This change is limited to NSX segment profile configuration; DHCP/IPAM and Kubernetes load-balancer rule regeneration are not part of this PR.

Validation

The branch is based on CloudStack main at 4f117071c9. The focused source and unit tests are included in the branch. The PR remains a draft pending the 4.23 NSX/CKS E2E validation on the target installation.

need to review these from NsxApiClientTest:

  • Sessions
  • SegmentDiscoveryProfileBindingMaps
  • SegmentSecurityProfileBindingMaps
  • StaticRoutesListResult
  • Tag
  • Tier1
  • TunnelInterfaceIPSubnet

None of these classes is referenced by the test class.

TODO: add the real missing-profile failure path to NsxApiClientTest.

Mock IpDiscoveryProfiles.get("ip-profile") to throw NotFound, assert that createSegment() returns a clean CloudRuntimeException, and verify that neither Segments.patch() nor Infra.patch() is called.

The existing tests cover a returned profile with a bad path, a different ID, and markedForDelete=true, but they do not cover the actual NSX 404/NotFound response for an absent profile.

@Dogface2k
Dogface2k force-pushed the feature/nsx-segment-profile-bindings branch from dc7d4bc to d94fafd Compare August 4, 2026 19:00
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.

1 participant