Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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