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 DNS option to the NSX-T Segment DHCP server #465

Merged
merged 9 commits into from
Apr 29, 2022

Conversation

mikeletux
Copy link
Contributor

@mikeletux mikeletux commented Apr 19, 2022

This PR addresses the needs on go-vcloud-director to allow later feature implementation on terraform-provider-vcd about DHCP DNS on NSX-T routed networks vmware/terraform-provider-vcd#753

Description

This PR allows govcd to be able to set and read DNS servers to/from the Dhcp configuration of a specific Org vDC routed network.

Detailed description

Starting from VCD 10.3.1 (API v36.1) is possible to set the DNS servers that the DHCP sends when configured in a routed NSX-T network.

To allow this, a new field DnsServers has been added to the struct OpenApiOrgVdcNetworkDhcp. Also the methods Vdc.GetOpenApiOrgVdcNetworkDhcp and Vdc.UpdateOpenApiOrgVdcNetworkDhcp have been updated to use the method Client.getOpenApiHighestElevatedVersion instead of Client.checkOpenApiEndpointCompatibility, so if VCD 10.3.1 or newer is used, DNS can be set.

Also the function nsxtRoutedDhcpConfig have been slightly to add DnsServers to test that the changes done are perform appropriately.

Miguel Sama added 5 commits April 19, 2022 11:12
…sions

Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
…rsion function

Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
@mikeletux mikeletux marked this pull request as ready for review April 21, 2022 08:29
Signed-off-by: Miguel Sama <msama@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.

Great! 👍

govcd/openapi_org_network_dhcp.go Outdated Show resolved Hide resolved
…enApiHighestElevatedVersion

Signed-off-by: Miguel Sama <msama@vmware.com>
@mikeletux mikeletux merged commit 011d36c into vmware:main Apr 29, 2022
@mikeletux mikeletux deleted the feature-nsxt-dhcp-dns branch April 29, 2022 07:57
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