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

[v2] neutron: add segment_id support to subnets #3407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2025
Merged
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
9 changes: 9 additions & 0 deletions 9 openstack/networking/v2/subnets/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type ListOpts struct {
NotTags string `q:"not-tags"`
NotTagsAny string `q:"not-tags-any"`
RevisionNumber *int `q:"revision_number"`
SegmentID string `q:"segment_id"`
}

// ToSubnetListQuery formats a ListOpts into a query string.
Expand Down Expand Up @@ -147,6 +148,10 @@ type CreateOpts struct {
// Prefixlen is used when user creates a subnet from the subnetpool. It will
// overwrite the "default_prefixlen" value of the referenced subnetpool.
Prefixlen int `json:"prefixlen,omitempty"`

// SegmentID is a network segment the subnet is associated with. It is
// available when segment extension is enabled.
SegmentID string `json:"segment_id,omitempty"`
}

// ToSubnetCreateMap builds a request body from CreateOpts.
Expand Down Expand Up @@ -219,6 +224,10 @@ type UpdateOpts struct {
// will set revision_number=%s. If the revision number does not match, the
// update will fail.
RevisionNumber *int `json:"-" h:"If-Match"`

// SegmentID is a network segment the subnet is associated with. It is
// available when segment extension is enabled.
SegmentID *string `json:"segment_id,omitempty"`
}

// ToSubnetUpdateMap builds a request body from UpdateOpts.
Expand Down
4 changes: 4 additions & 0 deletions 4 openstack/networking/v2/subnets/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ type Subnet struct {
// RevisionNumber optionally set via extensions/standard-attr-revisions
RevisionNumber int `json:"revision_number"`

// SegmentID of a network segment the subnet is associated with. It is
// available when segment extension is enabled.
SegmentID string `json:"segment_id"`

// Timestamp when the subnet was created
CreatedAt time.Time `json:"created_at"`

Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.