nova boot --nic to accept network names
Bug #1496180 reported by
Armando Migliaccio
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-novaclient |
Fix Released
|
Wishlist
|
Pavel Kholkin |
Bug Description
Today, in order to specify networking arguments, the nova client accepts this option:
[--nic <net-id=
However, it can only accept uuid's. If I try to specify a (unique) name for a network on which I want to boot on, I get the following error:
ERROR (BadRequest): Bad networks format: network uuid is not in proper format (network-foo).
It would be nice if we could extend the client option to allow names to be accepted too.
Changed in python-novaclient: | |
importance: | Undecided → Wishlist |
Changed in python-novaclient: | |
assignee: | nobody → Akhila C (chetlapalle-akhila-b) |
Changed in python-novaclient: | |
status: | New → Confirmed |
Changed in python-novaclient: | |
status: | Confirmed → In Progress |
Changed in python-novaclient: | |
assignee: | Akhila C (chetlapalle-akhila-b) → Pavel Kholkin (pkholkin) |
To post a comment you must log in.
This is going to require a change to the nova API if you're going to just pass the network name through on the request, because at least in the v2.1 API we validate against the network portion of the request and name isn't allowed:
https:/ /github. com/openstack/ nova/blob/ master/ nova/api/ openstack/ compute/ schemas/ servers. py#L29
You could workaround this in the client though by getting the uuid for the network given by name and then passing that uuid to the server create API.
You can get all networks via the API here:
https:/ /github. com/openstack/ nova/blob/ master/ nova/api/ openstack/ compute/ networks. py#L86
And then match the network['label'] to the requested network name during the nova boot CLI. If you find a match, then use that network's id for the uuid to pass to the server create request. If there is more than one match for the requested network name then you have to error out to the user and tell them to provide the network id (uuid).