Separate options for --nic when creating servers

Bug #1612898 reported by Steve Martinelli on 2016-08-13
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Medium
David Rabel

Bug Description

See https://twitter.com/Kennjason/status/764296766522929152

We should deprecate --nic in favor of listing the actual options. This would also mean adding a --network and --port option. This avoiding the key value based --nic option.

We've already had a UX bug for this very issue: https://bugs.launchpad.net/python-openstackclient/+bug/1353040

Richard Theis (rtheis) on 2016-08-19
Changed in python-openstackclient:
importance: Undecided → Medium
status: New → Confirmed
Richard Theis (rtheis) on 2016-08-19
tags: added: network
Ukesh (ukeshkumar) on 2016-08-21
Changed in python-openstackclient:
assignee: nobody → Ukesh (ukeshkumar)
Ukesh (ukeshkumar) wrote :

nic option in openstack server create command's syntax is,
--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr,port-id=port-uuid>

It can be given multiple times, to create multiple interfaces in the VM-instance.

And so, if we split it into network-id / port-id options. How the
optional parameters, 'v4-fixed-ip' and 'v6-fixed-ip' can be handled ?

Ex: if we want two nic, first nic, don't have to pass v4-fixed-ip and second one, we have to pass the fixed ip. We couldn't map in this case.

with current command, we can give as below,
--nic net-id=1234 --nic net-id=5678,v4-fixed-ip=172.2.3.8

with new implementation, how can we pass the v4-fixed-ip (172.2.3.8) to the second network ?,
--network 1234 --network 5678

Please clarify...

Richard Theis (rtheis) wrote :

Hi Ukesh, I think the goal here is simplification and not necessarily feature parity with the --nic option. To get --nic net-id=5678,v4-fixed-ip=172.2.3.8, you would first create the port on the network with the specified fixed IP. Then you pass that port in on the openstack server create command.

David Rabel (rabel-b1) wrote :

Hi there,

since this is still open and the --nic option is still a little bit unhandy, I'd like to address this issue again.

Ukesh is right imho: Simplifying the arguments should not include reducing the functionality.

But if we would use --port and --network instead of --nic, isn't it possible to keep v4-fixed-ip and v6-fixed-ip as optional parameters, but for --port and --network instead of --nic?

With your example:

--network 5678,v4-fixed-ip=127.2.3.8

Or is that bad syntax?

Btw: If no one else is working on this right now, I could take over the bug and work on a commit.

Reedip (reedip-banerjee) wrote :

Removed assignee as there has not been any update for some time

Changed in python-openstackclient:
assignee: Ukesh (ukeshkumar) → nobody
David Rabel (rabel-b1) on 2017-03-13
Changed in python-openstackclient:
assignee: nobody → David Rabel (rabel-b1)

Fix proposed to branch: master
Review: https://review.openstack.org/444924

Changed in python-openstackclient:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/444924
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=8549071363805a9eef815dd2429b6b860db11a2c
Submitter: Jenkins
Branch: master

commit 8549071363805a9eef815dd2429b6b860db11a2c
Author: David Rabel <email address hidden>
Date: Mon Mar 13 15:16:48 2017 +0100

    Add --network and --port to server create

    --nic option is quite unhandy. It is better to have
    two seperate options --network and --port to add a
    network to a new server.

    Change-Id: I523abdc83ca2dd4c5dd3871f8f109c2bf57c2e02
    Closes-Bug: #1612898

Changed in python-openstackclient:
status: In Progress → Fix Released

This issue was fixed in the openstack/python-openstackclient 3.10.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers