-
Notifications
You must be signed in to change notification settings - Fork 112
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 VDC group support for NSX-T Edge Gateway #793
Conversation
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
cf7080a
to
6136be6
Compare
Signed-off-by: Dainius Serplis <[email protected]>
037826a
to
68afac1
Compare
Signed-off-by: Dainius Serplis <[email protected]>
68afac1
to
93cc7ce
Compare
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]>
3eba566
to
1f89e90
Compare
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for all the adjustments. Noticed one more thing, but LGTM otherwise!
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, will test it.
Signed-off-by: Dainius Serplis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems ok in manual testing. LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Tested manually and worked as a charm!
Many thanks for the effort to improve this resource and allow vdc groups!
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
This PR adds support for VDC Groups to NSX-T Edge Gateway resources and data sources
vcd_nsxt_edgegateway
.VDC Group support requires VCD 10.2+ and API v35.0+.
The main difference is
types.OpenAPIEdgeGateway.OrgVdc.ID
is deprecated and replaced bytypes.OpenAPIEdgeGateway.OwnerRef.ID
which supports VDC Groups.Our resource has two new fields
owner_id
(which supports VDC or VDC Group) andstarting_vdc_id
. It also deprecatesvdc
field at resource level as well asprovider
level.Note. NSX-T Edge Gateway cannot be created directly in VDC Group (it must at first be created in a VDC which is a member of VDC Group).
starting_vdc_id
allows to (optionally) specify a VDC, in which the Edge Gateway should be created while the final destination will be what is specified inowner_id
. Whenstarting_vdc_id
is not specified, butowner_id
is a VDC Group - this resource will pick random VDC in the group and then move Edge Gateway to it.The most ugly part here is backwards compatibility, migration path, and the field pick priority. Such field priority is meant to be set:
owner_id
(ignores other values)vdc
at resource levelvdc
inherited fromprovider
sectionDocs are adjusted accordingly and also all examples with using
vdc
field are removed.Additional things:
Minimally patched Org Network resources using OpenAPI (full VDC support to come out in other PR to
split cognitive load). The only change for now is VDC specification field switched from
OrgVdc
toOwnerId
. The reason is that API switched to V35.0 and OrgVdc ID cannot be created anymore (APIreturns error)
Changed a few MetadataFields from deprecated to new format, because staticcheck complains
Ran tests with tag
nsxt
on 10.2.2.1, 10.3.1