Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0c4819a

Browse filesBrowse files
authored
Merge pull request #3407 from gophercloud/bp-v2-af9aab7
[v2] neutron: add segment_id support to subnets
2 parents 6b87370 + f9b4f0d commit 0c4819a
Copy full SHA for 0c4819a

File tree

Expand file treeCollapse file tree

2 files changed

+13
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+13
-0
lines changed

‎openstack/networking/v2/subnets/requests.go

Copy file name to clipboardExpand all lines: openstack/networking/v2/subnets/requests.go
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ type ListOpts struct {
4343
NotTags string `q:"not-tags"`
4444
NotTagsAny string `q:"not-tags-any"`
4545
RevisionNumber *int `q:"revision_number"`
46+
SegmentID string `q:"segment_id"`
4647
}
4748

4849
// ToSubnetListQuery formats a ListOpts into a query string.
@@ -147,6 +148,10 @@ type CreateOpts struct {
147148
// Prefixlen is used when user creates a subnet from the subnetpool. It will
148149
// overwrite the "default_prefixlen" value of the referenced subnetpool.
149150
Prefixlen int `json:"prefixlen,omitempty"`
151+
152+
// SegmentID is a network segment the subnet is associated with. It is
153+
// available when segment extension is enabled.
154+
SegmentID string `json:"segment_id,omitempty"`
150155
}
151156

152157
// ToSubnetCreateMap builds a request body from CreateOpts.
@@ -219,6 +224,10 @@ type UpdateOpts struct {
219224
// will set revision_number=%s. If the revision number does not match, the
220225
// update will fail.
221226
RevisionNumber *int `json:"-" h:"If-Match"`
227+
228+
// SegmentID is a network segment the subnet is associated with. It is
229+
// available when segment extension is enabled.
230+
SegmentID *string `json:"segment_id,omitempty"`
222231
}
223232

224233
// ToSubnetUpdateMap builds a request body from UpdateOpts.

‎openstack/networking/v2/subnets/results.go

Copy file name to clipboardExpand all lines: openstack/networking/v2/subnets/results.go
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ type Subnet struct {
124124
// RevisionNumber optionally set via extensions/standard-attr-revisions
125125
RevisionNumber int `json:"revision_number"`
126126

127+
// SegmentID of a network segment the subnet is associated with. It is
128+
// available when segment extension is enabled.
129+
SegmentID string `json:"segment_id"`
130+
127131
// Timestamp when the subnet was created
128132
CreatedAt time.Time `json:"created_at"`
129133

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.