feat: add network segment range extension to networking v2#3614
feat: add network segment range extension to networking v2#3614cardoe wants to merge 1 commit intogophercloud:mainfrom
Conversation
Add support for Neutron's network segment range extension to the networking/v2 module.
Added an implementation to manage Network Segment Ranges which is a Neutron extension. This depends on gophercloud/gophercloud#3614. For now it pulls that in with a replacement in go.mod.
|
The testing failure is: Not something this code changes or touches or impacts. |
Yep, this is a known issue with master branch due to eventlet removal. But I now realize the patch we were waiting for merged and the job should be back to green. |
mandre
left a comment
There was a problem hiding this comment.
This looks great!
Would it be possible to add acceptance tests as well, to ensure the feature works as expected against a live environment?
We already configure devstack with the neutron-network-segment-range extension, so the environment should be able to handle it. That said, we should add a guard similar to what's done here:
| } | ||
|
|
||
| // NetworkSegmentRange represents a network segment range. | ||
| type NetworkSegmentRange struct { |
There was a problem hiding this comment.
Should we add all fields? We're currently missing:
- Description
- TenantID (not sure this one is relevant anymore)
- CreatedAt
- UpdatedAt
- RevisionNumber
- Tags
|
|
||
| // CreateOpts represents options for creating a network segment range. | ||
| type CreateOpts struct { | ||
| Name string `json:"name,omitempty"` |
There was a problem hiding this comment.
Ideally we'd add godoc comments for all public fields.
Add support for Neutron's network segment range extension to the networking/v2 module.
Fixes #3613
Links to the line numbers/files in the OpenStack source code that support the
code in this PR:
https://docs.openstack.org/neutron/2025.2//admin/config-network-segment-ranges.html
https://github.com/openstack/neutron/blob/master/neutron/extensions/network_segment_range.py
https://docs.openstack.org/api-ref/network/v2/index.html#network-segment-ranges