This repository was archived by the owner on Jul 18, 2025. It is now read-only.
Filter openstack floating IPs by tenant ID#1809
Closed
omgjlk wants to merge 1 commit intodocker-archive-public:masterfrom
Closed
Filter openstack floating IPs by tenant ID#1809omgjlk wants to merge 1 commit intodocker-archive-public:masterfrom
omgjlk wants to merge 1 commit intodocker-archive-public:masterfrom
Conversation
If the user in question happens to be an admin user, they may see floating IPs that are from other tenants. Attempts to use such IPs will result in an error, as the tenant of the IP doesn't match the tenant of the instance. Filtering by ID limits the returned IPs to those that are valid for the tenant. Unfortunately the filtering has to be done by tenant ID, not name, so we need to interact with the identity end point to map the tenant name to ID if only the name was provided. Currently this only supports the v2 identity endpoint. Signed-off-by: Jesse Keating <jkeating@j2solutions.net>
176e1e6 to
3ad5dce
Compare
Contributor
|
/cc @ggiamarchi |
Contributor
There was a problem hiding this comment.
If think it would be better to check if d.TenantId == "" rather than if d.TenantName != "" because it's common to have an OpenStack rc file containing both the tenant id and the tenant name. In such a situation it would be a pity to compute the id from the name.
Contributor
|
@j2sol can you address @ggiamarchi comments? Thank you both! |
Author
|
Yup, I'll address it. |
Contributor
|
Merged with #2589 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
If the user in question happens to be an admin user, they may see
floating IPs that are from other tenants. Attempts to use such IPs will
result in an error, as the tenant of the IP doesn't match the tenant of
the instance. Filtering by ID limits the returned IPs to those that are
valid for the tenant.
Unfortunately the filtering has to be done by tenant ID, not name, so we
need to interact with the identity end point to map the tenant name to
ID if only the name was provided. Currently this only supports the v2
identity endpoint.
Signed-off-by: Jesse Keating jkeating@j2solutions.net