Skip to content

Conversation

kayrus
Copy link
Contributor

@kayrus kayrus commented Jul 17, 2024

Prior to starting a PR, please make sure you have read our
contributor tutorial.

Prior to a PR being reviewed, there needs to be a Github issue that the PR
addresses. Replace the brackets and text below with that issue number.

Fixes #3091
Backport of the #3092 without changing the List function signature

Links to the line numbers/files in the OpenStack source code that support the
code in this PR:

[PUT URLS HERE]

@kayrus kayrus changed the title [neutron]: introduce Stateful argument for the security groups [v2] [neutron]: introduce Stateful argument for the security groups Jul 17, 2024
@github-actions github-actions bot added the semver:minor Backwards-compatible change label Jul 17, 2024
@coveralls
Copy link

Coverage Status

coverage: 78.733%. remained the same
when pulling f4c6a8e on kayrus:secgroup-stateful-v2
into e36df0f on gophercloud:v2.

@kayrus kayrus requested a review from a team July 17, 2024 19:05
@stephenfin
Copy link
Contributor

This requires the stateful-security-group extension. Do we want to document this in the help text? On a lesser note, do we want to check for the extension first in the functional test, or do we assume OVS/OVN?

@pierreprinetti pierreprinetti added good first issue A good issue for first-time contributors and removed good first issue A good issue for first-time contributors labels Jul 18, 2024
@kayrus
Copy link
Contributor Author

kayrus commented Jul 18, 2024

@stephenfin looks like the initial PR was incorrect, and I had to put this option into the openstack/networking/v2/extensions. So what's the plan? Fix the master branch, then update v1 and v2 backports?

@kayrus
Copy link
Contributor Author

kayrus commented Jul 18, 2024

Hm, looking at the allowed_address_pairs for ports. It's also an extension, but it resides in the openstack/networking/v2/ports.

@stephenfin
Copy link
Contributor

Hm, looking at the allowed_address_pairs for ports. It's also an extension, but it resides in the openstack/networking/v2/ports.

Yeah, I suspect there are quite a few cases of this: the beauties of having extensions that can change absolutely anything about the API 😅 At least CreateOpts.stateful is a pointer so someone can omit it entirely during creation if the networking backend doesn't support it. That's not the case for the result struct though 😞

Perhaps we could just document that it relies on the extension and will be unset if that extension is absent? afaict it will always be present on the OVN, OVS and linuxbridge backends, but that's not necessarily true for other backends.

@stephenfin
Copy link
Contributor

I also missed the fact that this was a backport, so feel free to ignore my comments entirely here. It would be good to fix this on master though, IMO.

@kayrus
Copy link
Contributor Author

kayrus commented Jul 19, 2024

v1 backport was already approved, can we merge this so we can close this topic until v3?

@kayrus kayrus merged commit 2705ea8 into gophercloud:v2 Jul 19, 2024
@kayrus kayrus deleted the secgroup-stateful-v2 branch July 19, 2024 11:35
@kayrus
Copy link
Contributor Author

kayrus commented Jul 19, 2024

@pierreprinetti pierreprinetti added the v2 This PR targets v2 label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor Backwards-compatible change v2 This PR targets v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants