-
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
US25988-CMP-1 GO SDK update and models added for load balancer and its configurations #53
Conversation
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
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
pkg/models/load_balancer.go
Outdated
Size string `json:"size"` | ||
Tier1 string `json:"tier1"` | ||
type EnableResourcePermissions struct { | ||
All bool `json:"all,omitempty" tf:"all"` |
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.
Please validate do we need omitempty here and take it up in the next PR. omitempty functionality should be checked for all the cases.
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 its not needed here removed
pkg/models/load_balancer.go
Outdated
@@ -52,6 +57,7 @@ type CreateNetworkLoadBalancerResp struct { | |||
|
|||
type NetworkLoadBalancerResp struct { | |||
ID int `json:"id" tf:"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.
Can we not reuse ID itself here ? why LBID again ?
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.
removed
pkg/models/load_balancer.go
Outdated
@@ -83,7 +89,8 @@ type GetNetworkLoadBalancers struct { | |||
} | |||
|
|||
type GetNetworkLoadBalancerResp struct { | |||
ID int `json:"id"` | |||
ID int `json:"id" tf:"id,computed"` | |||
LbID int `json:"lb_id" tf:"lb_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 LBID ?
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.
removed
pkg/models/load_balancer.go
Outdated
Visibility string `json:"visibility"` | ||
Description string `json:"description"` | ||
Timeout int `json:"monitorTimeout" tf:"timeout"` | ||
Interval int `json:"monitorInterval" tf:"interval"` |
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 tf variables ?
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.
removed
pkg/models/load_balancer.go
Outdated
SSLSuite string `json:"sslSuite" tf:"ssl_suite"` | ||
SessionCache bool `json:"sessionCache" tf:"session_cache"` | ||
SessionCacheEntryTimeout int `json:"sessionCacheTimeout" tf:"session_cache_entry_timeout"` | ||
PreferServerCipher bool `json:"preferServerCipher" tf:"prefer_server_cipher"` |
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.
needs refactoring here.
pkg/models/load_balancer.go
Outdated
RequestURL string `json:"monitorDestination" tf:"request_url"` | ||
RequestBody string `json:"sendData" tf:"request_body"` | ||
AliasPort int `json:"aliasPort" tf:"monitor_port"` | ||
RiseCount int `json:"riseCount" tf:"rise_count"` |
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 tf 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.
removed
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.
Synced with Jinu and we have reviewed it again. Please take care of these comments in the next review.
1b644d0
pkg/models/load_balancer.go
Outdated
ProfileType string `json:"profileType" tf:"profile_type"` | ||
FastTCPIdleTimeout int `json:"fastTcpIdleTimeout" tf:"fast_tcp_idle_timeout"` | ||
FastUDPIdleTimeout int `json:"fastUdpIdleTimeout" tf:"fast_udp_idle_timeout"` | ||
HTTPIdleTimeout int `json:"httpIdleTimeout" tf:"http_idle_timeout"` |
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 these keys 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.
For profiles also no need of json because these models CreateHttpProfileConfig only to achieve the profile type payloads from terraform later to send to cmp we are using same flat models so using these keys
VipHostName string `json:"vipHostName" tf:"vip_host_name"` | ||
SSLServerCert int `json:"sslServerCert" tf:"ssl_server_cert"` | ||
SSLCert int `json:"sslCert" tf:"ssl_client_cert"` | ||
VirtualServerConfig *VirtualServerConfig `json:"config" tf:"config,sub"` |
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.
I would assume that you will take care of servers and pools and profiles related changes in the subsequent review. Please remove duplicate JSON keyword related to them in subsequent review. Please take care of it later.
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.
LGTM
No description provided.