Skip to content

Commit 3238181

Browse files
authored
Merge pull request #3452 from gophercloud/bp-v2-3a9dda3
[v2] neutron: allow omission of subnet_id for IP address
2 parents 01ba8ed + a776073 commit 3238181

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

openstack/networking/v2/extensions/layer3/routers/results.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type GatewayInfo struct {
2121
// router.
2222
type ExternalFixedIP struct {
2323
IPAddress string `json:"ip_address,omitempty"`
24-
SubnetID string `json:"subnet_id"`
24+
SubnetID string `json:"subnet_id,omitempty"`
2525
}
2626

2727
// Route is a possible route in a router.

openstack/networking/v2/ports/results.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type DeleteResult struct {
4949

5050
// IP is a sub-struct that represents an individual IP.
5151
type IP struct {
52-
SubnetID string `json:"subnet_id"`
52+
SubnetID string `json:"subnet_id,omitempty"`
5353
IPAddress string `json:"ip_address,omitempty"`
5454
}
5555

0 commit comments

Comments
 (0)