-
Notifications
You must be signed in to change notification settings - Fork 23.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow subnet names to be used in os_port instead of subnet ids only #21522
Comments
These just get passed onto the neutron API which supports ip_address and subnet_id. I'm asking on #openstack-neutron irc free node if this can be supported in addition. |
Maybe we can take a look at the openstack client how it's handled there? I suppose that an additional step where we get all the subnets and filter by name would be a little bit overkill and shift the responsibility too much torwards the module in Ansible, right? |
@dev00 We pretty much do the name filtering everywhere else in shade. The response I got on #openstack-neutron was to create a new API extension, which makes me very sad. |
This is currently possible with OpenStack, as the OpenStack API supports getting a subnet ID only and it will grab the first available IP then. https://developer.openstack.org/api-ref/network/v2/#create-port |
needs_contributor |
Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue/PR because this content has been moved to one or more collection repositories.
For further information, please see: |
ISSUE TYPE
COMPONENT NAME
os_port
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
N/A
SUMMARY
Right now we can only create instances which will be attached to a specific network. Openstack will then place the instance in the first subnet.
However, when having multiple subnets, you may want to choose in which subnet the instance should be placed.
This can at the moment only be done by creating an openstack port with os_port. os_port will accept only subnet-ids at the moment, which are a little bit messy (because you need to get the id first from the name etc.).
However, the openstack-client already supports creating a port in a subnet and allows the subnet to be chosen by name.
It would be great to take out some restrictions from the os_port module and allow a subnet name or subnet id (this is btw. the default behavior for the network-parameter already) to be supplied instead of allowing an id only.
STEPS TO REPRODUCE
EXPECTED RESULTS
That the port would be created.
ACTUAL RESULTS
The step fails and asks for an ID.
The text was updated successfully, but these errors were encountered: