GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add network segment range extension to networking v2 by cardoe · Pull Request #3614 · gophercloud/gophercloud

Conversation

@cardoe

@cardoe cardoe commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cardoe
feat: add network segment range extension to networking v2
16497aa
Add support for Neutron's network segment range extension to the
networking/v2 module.
@github-actions github-actions Bot added edit:networking This PR updates networking code semver:minor Backwards-compatible change backport-v2 This PR will be backported to v2 labels Jan 27, 2026
@coveralls

coveralls commented Jan 27, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 63.91% (+0.05%) from 63.865%
when pulling 16497aa on cardoe:neutron-network-segment-range
into 01208c9 on gophercloud:main.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cardoe added a commit to cardoe/openstack-resource-controller that referenced this pull request Jan 27, 2026
@cardoe
wip: implement Network Segment Range resource
5f70594
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.
@cardoe cardoe mentioned this pull request Jan 27, 2026
wip: implement Network Segment Range resource k-orc/openstack-resource-controller#654
Draft
@cardoe

cardoe commented Jan 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

The testing failure is:


Jan 27 18:56:17 runnervmymu0l neutron-bgp-dragent[80592]: Traceback (most recent call last):
Jan 27 18:56:17 runnervmymu0l neutron-bgp-dragent[80592]:   File "/opt/stack/data/venv/bin/neutron-bgp-dragent", line 3, in <module>
Jan 27 18:56:17 runnervmymu0l neutron-bgp-dragent[80592]:     from neutron_dynamic_routing.cmd.eventlet.agents.bgp_dragent import main
Jan 27 18:56:17 runnervmymu0l neutron-bgp-dragent[80592]:   File "/opt/stack/neutron-dynamic-routing/neutron_dynamic_routing/cmd/eventlet/__init__.py", line 13, in <module>
Jan 27 18:56:17 runnervmymu0l neutron-bgp-dragent[80592]:     from neutron.common import eventlet_utils
Jan 27 18:56:17 runnervmymu0l neutron-bgp-dragent[80592]: ImportError: cannot import name 'eventlet_utils' from 'neutron.common' (/opt/stack/neutron/neutron/common/__init__.py)
Jan 27 18:56:17 runnervmymu0l systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE

Not something this code changes or touches or impacts.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mandre

mandre commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

The testing failure is:


Jan 27 18:56:17 runnervmymu0l neutron-bgp-dragent[80592]: Traceback (most recent call last):
Jan 27 18:56:17 runnervmymu0l neutron-bgp-dragent[80592]:   File "/opt/stack/data/venv/bin/neutron-bgp-dragent", line 3, in <module>
Jan 27 18:56:17 runnervmymu0l neutron-bgp-dragent[80592]:     from neutron_dynamic_routing.cmd.eventlet.agents.bgp_dragent import main
Jan 27 18:56:17 runnervmymu0l neutron-bgp-dragent[80592]:   File "/opt/stack/neutron-dynamic-routing/neutron_dynamic_routing/cmd/eventlet/__init__.py", line 13, in <module>
Jan 27 18:56:17 runnervmymu0l neutron-bgp-dragent[80592]:     from neutron.common import eventlet_utils
Jan 27 18:56:17 runnervmymu0l neutron-bgp-dragent[80592]: ImportError: cannot import name 'eventlet_utils' from 'neutron.common' (/opt/stack/neutron/neutron/common/__init__.py)
Jan 27 18:56:17 runnervmymu0l systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mandre
mandre reviewed Jan 28, 2026
View reviewed changes

@mandre mandre left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

gophercloud/internal/acceptance/openstack/networking/v2/extensions/mtu/mtu_test.go

Lines 25 to 26 in 01208c9

// Skip these tests if we don't have the required extension
networking.RequireNeutronExtension(t, client, "net-mtu")

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread openstack/networking/v2/extensions/networksegmentranges/results.go
}

// NetworkSegmentRange represents a network segment range.
type NetworkSegmentRange struct {

@mandre mandre Jan 28, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add all fields? We're currently missing:

  • Description
  • TenantID (not sure this one is relevant anymore)
  • CreatedAt
  • UpdatedAt
  • RevisionNumber
  • Tags

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread openstack/networking/v2/extensions/networksegmentranges/requests.go

// CreateOpts represents options for creating a network segment range.
type CreateOpts struct {
Name string `json:"name,omitempty"`

@mandre mandre Jan 28, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we'd add godoc comments for all public fields.

https://github.com/gophercloud/gophercloud/blob/main/docs/contributor-tutorial/step-05-pull-requests.md#documentation

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mandre mandre mandre left review comments

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

backport-v2 This PR will be backported to v2 edit:networking This PR updates networking code semver:minor Backwards-compatible change

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

neutron: support network segment ranges extension

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@cardoe @coveralls @mandre
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.