Skip to content

Neutron: AddressScope controller#693

Open
winiciusallan wants to merge 2 commits intok-orc:mainfrom
winiciusallan:controller-addressscope
Open

Neutron: AddressScope controller#693
winiciusallan wants to merge 2 commits intok-orc:mainfrom
winiciusallan:controller-addressscope

Conversation

@winiciusallan
Copy link
Contributor

@winiciusallan winiciusallan commented Feb 26, 2026

This PR introduces the AddressScope controller.

Notes for the reviewers:

  • Although the Shared field is mutable in the API, I've decided to keep it as immutable because we can't update
    true -> false; this way, we can't unset the field once set as true. IMO it is safer to keep it as immutable. If anyone has a different opinion, we can discuss.

Fixes #393

go run ./cmd/scaffold-controller \
       -interactive=false \
       -kind AddressScope \
       -gophercloud-client NewNetworkV2 \
       -gophercloud-module github.com/gophercloud/gophercloud/v2/openstack/networking/v2/extensions/layer3/addressscopes \
       -optional-create-dependency Project \
       -import-dependency Project
@github-actions github-actions bot added the semver:major Breaking change label Feb 26, 2026
@dlaw4608
Copy link
Contributor

dlaw4608 commented Mar 3, 2026

Hey @winiciusallan great job!! looks to me like its almost ready to be merged, added a couple of nits, also don't forget to add the new controller to the list of implemented controllers in the README.md!!


## Step 00

Create a AddressScope using all available fields, and verify that the observed state corresponds to the spec.
Copy link
Contributor

Choose a reason for hiding this comment

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

Tiny NIT, technically should be "an AddressScope" instead of "a AddressScope", "an" is used for words starting with a vowel sound ("an endpoint"), "a" is for words starting with a consonant sound ("a domain"), again this makes no difference to the code just thought I would point it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for noting this, Daniel! I've searched for more occurrences of this spelling error and found more. I'll fix all of them and push the changes.

❯ grep -rni "a AddressScope" internal/controllers/addressscope/ | cut -d ':' -f1
internal/controllers/addressscope/tests/addressscope-update/README.md
internal/controllers/addressscope/tests/addressscope-create-minimal/README.md
internal/controllers/addressscope/tests/addressscope-create-full/README.md
internal/controllers/addressscope/tests/addressscope-create-full/README.md
internal/controllers/addressscope/tests/addressscope-import/README.md
internal/controllers/addressscope/tests/addressscope-import/README.md
internal/controllers/addressscope/tests/addressscope-import/README.md
internal/controllers/addressscope/tests/addressscope-import-dependency/README.md
internal/controllers/addressscope/tests/addressscope-import-dependency/README.md
internal/controllers/addressscope/tests/addressscope-import-dependency/README.md

Copy link
Contributor Author

@winiciusallan winiciusallan Mar 3, 2026

Choose a reason for hiding this comment

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

Actually, I noticed that it is also occurring at the endpoint controller. I'll open a PR soon to fix this as well.

(I don't know if it's worth it, but we might include in AGENTS.md guidance about spelling errors, and ask for them to be fixed as soon as they're found)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opened #697 to address this.


## Step 00

Import a AddressScope that references other imported resources. The referenced imported resources have no matching resources yet.
Copy link
Contributor

Choose a reason for hiding this comment

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

Same NIT as before, I assume it's the scaffolding tool creating the README for the e2e tests, so up to you to if you want to go back and tweak the spelling. Again I'm splitting hairs here, please feel free to ignore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! Thanks for highlighting this.

@winiciusallan winiciusallan force-pushed the controller-addressscope branch from ace4ca4 to 65434eb Compare March 3, 2026 13:40
@winiciusallan
Copy link
Contributor Author

winiciusallan commented Mar 3, 2026

@dlaw4608 I've addressed your nit comments. Could you check? I've also added to the README the new controller as implemented.

@dlaw4608
Copy link
Contributor

dlaw4608 commented Mar 3, 2026

LGTM thanks 👍

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

Labels

semver:major Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable (IPv6) Subnet Allocation with AddressScope/SubnetPool

2 participants