Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
Merge f2e21f0 into 0d85999
Browse files Browse the repository at this point in the history
  • Loading branch information
uruddarraju committed Aug 9, 2016
2 parents 0d85999 + f2e21f0 commit 9faf0ef
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion openstack/networking/v2/extensions/lbaas/pools/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func Create(c *gophercloud.ServiceClient, opts CreateOpts) CreateResult {
Name string `json:"name"`
TenantID string `json:"tenant_id,omitempty"`
Protocol string `json:"protocol"`
SubnetID string `json:"subnet_id"`
SubnetID string `json:"subnet_id,omitempty"`
LBMethod string `json:"lb_method"`
Provider string `json:"provider,omitempty"`
}
Expand Down
6 changes: 1 addition & 5 deletions openstack/networking/v2/extensions/lbaas/vips/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@ func Create(c *gophercloud.ServiceClient, opts CreateOpts) CreateResult {
res.Err = errNameRequired
return res
}
if opts.SubnetID == "" {
res.Err = errSubnetIDRequried
return res
}
if opts.Protocol == "" {
res.Err = errProtocolRequired
return res
Expand All @@ -145,7 +141,7 @@ func Create(c *gophercloud.ServiceClient, opts CreateOpts) CreateResult {

type vip struct {
Name string `json:"name"`
SubnetID string `json:"subnet_id"`
SubnetID string `json:"subnet_id,omitempty"`
Protocol string `json:"protocol"`
ProtocolPort int `json:"protocol_port"`
PoolID string `json:"pool_id"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ func (opts CreateOpts) ToLoadbalancerCreateMap() (map[string]interface{}, error)

if opts.VipSubnetID != "" {
l["vip_subnet_id"] = opts.VipSubnetID
} else {
return nil, errVipSubnetIDRequried
}
if opts.AdminStateUp != nil {
l["admin_state_up"] = &opts.AdminStateUp
Expand Down

0 comments on commit 9faf0ef

Please sign in to comment.