add lb cluster
This commit is contained in:
parent
7ee3bf62da
commit
7527428664
|
@ -1201,6 +1201,7 @@ func (v *KeyPair) Validate() error {
|
|||
}
|
||||
|
||||
type LoadBalancer struct {
|
||||
Cluster []*EIP `json:"cluster" name:"cluster"`
|
||||
CreateTime *time.Time `json:"create_time" name:"create_time" format:"ISO 8601"`
|
||||
Description *string `json:"description" name:"description"`
|
||||
EIPs []*EIP `json:"eips" name:"eips"`
|
||||
|
@ -1225,6 +1226,14 @@ type LoadBalancer struct {
|
|||
|
||||
func (v *LoadBalancer) Validate() error {
|
||||
|
||||
if len(v.Cluster) > 0 {
|
||||
for _, property := range v.Cluster {
|
||||
if err := property.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(v.EIPs) > 0 {
|
||||
for _, property := range v.EIPs {
|
||||
if err := property.Validate(); err != nil {
|
||||
|
|
Loading…
Reference in New Issue