-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
Site IDStringModel `json:"site,omitempty"` | ||
Type IDModel `json:"type,omitempty"` | ||
NetworkDomain *IDModel `json:"networkDomain,omitempty"` | ||
NetworkProxy *IDModel `json:"networkProxy,omitempty"` |
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.
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 ?
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.
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"` |
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.
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.
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.
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
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.
updated the proper model for both DHCP and Static Networks.
pkg/models/shared_models.go
Outdated
@@ -5,11 +5,11 @@ package models | |||
import "encoding/json" | |||
|
|||
type IDModel struct { | |||
ID int `json:"id,omitempty" tf:"id"` |
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.
this is being used in many places, I hope this doesnt break anything. why do we need to remove omit_empty here ?
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.
updated
pkg/models/networks.go
Outdated
} | ||
|
||
type CreateStaticNetwork struct { | ||
ExternalID string `json:"-" tf:"external_id,computed"` |
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.
why do need these to be tf fields ?
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.
InternalID, Unique ID , External ID
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.
code as well.
SubnetIPServerID string `json:"subnetIpServerId"` | ||
SubnetDhcpServerAddress string `json:"subnetDhcpServerAddress"` | ||
DhcpRange string `json:"dhcpRange"` | ||
SubnetDhcpLeaseTime string `json:"subnetDhcpLeaseTime"` |
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.
why is lease time a string ?
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.
yes
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.
Minor comments, looks good.
No description provided.