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

GO SDK for DHCP based NSX-T segment #61

Merged
merged 27 commits into from
Oct 17, 2022
Merged

Conversation

Pushpalatha555
Copy link
Collaborator

@Pushpalatha555 Pushpalatha555 commented Oct 8, 2022

No description provided.

Site IDStringModel `json:"site,omitempty"`
Type IDModel `json:"type,omitempty"`
NetworkDomain *IDModel `json:"networkDomain,omitempty"`
NetworkProxy *IDModel `json:"networkProxy,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

why did you remove these ? We still have support for Static Pool Networks. Did the story say that we need to remove static pool networks anywhere ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

Gateway string `json:"gateway,omitempty" tf:"gateway"`
DNSPrimary string `json:"dnsPrimary,omitempty" tf:"primary_dns"`
DNSSecondary string `json:"dnsSecondary,omitempty" tf:"secondary_dns"`
Config *CreateNetworkConfig `json:"config,omitempty" tf:"config,sub"`
Config *CreateNetworkConfig `json:"config" tf:"config,sub"`
Active bool `json:"active" tf:"active"`
Copy link
Contributor

Choose a reason for hiding this comment

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

my only worry about changing the tf fields is that it could break the existing automation if any of the teams have used ? what is the need to change the tf fields which were already existing ? Please have a good explanation about this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Use can create both DHCP and Static Networks. Ideally he should be able to create one at a time. Please add necessary validations for the same.
https://turbo-fortnight-4dcdc26d.pages.github.io/#tag/Networks/operation/CreatesANetwork

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated the proper model for both DHCP and Static Networks.

@@ -5,11 +5,11 @@ package models
import "encoding/json"

type IDModel struct {
ID int `json:"id,omitempty" tf:"id"`
Copy link
Contributor

Choose a reason for hiding this comment

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

this is being used in many places, I hope this doesnt break anything. why do we need to remove omit_empty here ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

}

type CreateStaticNetwork struct {
ExternalID string `json:"-" tf:"external_id,computed"`
Copy link
Contributor

Choose a reason for hiding this comment

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

why do need these to be tf fields ?

Copy link
Contributor

Choose a reason for hiding this comment

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

InternalID, Unique ID , External ID

Copy link
Contributor

Choose a reason for hiding this comment

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

code as well.

SubnetIPServerID string `json:"subnetIpServerId"`
SubnetDhcpServerAddress string `json:"subnetDhcpServerAddress"`
DhcpRange string `json:"dhcpRange"`
SubnetDhcpLeaseTime string `json:"subnetDhcpLeaseTime"`
Copy link
Contributor

Choose a reason for hiding this comment

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

why is lease time a string ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes

Copy link
Contributor

@manjunath-batakurki manjunath-batakurki left a comment

Choose a reason for hiding this comment

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

Minor comments, looks good.

@manjunath-batakurki manjunath-batakurki merged commit 4ba6567 into master Oct 17, 2022
@manjunath-batakurki manjunath-batakurki deleted the nsx-Segment branch October 17, 2022 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.

3 participants