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
This commit is contained in:
David Rabel
2017-03-13 15:16:48 +01:00
parent 4a19f6753b
commit 8549071363
4 changed files with 103 additions and 13 deletions
doc/source/command-objects
openstackclient
compute
tests
unit
releasenotes/notes

@ -108,6 +108,8 @@ Create a new server
[--availability-zone <zone-name>]
[--block-device-mapping <dev-name=mapping> [...] ]
[--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr,port-id=port-uuid,auto,none> [...] ]
[--network <network>]
[--port <port>]
[--hint <key=value> [...] ]
[--config-drive <value>|True ]
[--min <count>]
@ -176,6 +178,20 @@ Create a new server
Specifying a --nic of auto or none cannot be used with any other
--nic value.
.. option:: --network <network>
Create a NIC on the server and connect it to network.
Specify option multiple times to create multiple NICs.
For more options on NICs see --nic parameter.
network: attach NIC to this network
.. option:: --port <port>
Create a NIC on the server and connect it to port.
Specify option multiple times to create multiple NICs.
For more options on NICs see --nic parameter.
port: attach NIC to this port
.. option:: --hint <key=value>
Hints for the scheduler (optional extension)
@ -200,6 +216,16 @@ Create a new server
New server name
..
The parameters ``--network <network>`` and ``--port <port>`` are actually
wrappers to ``--nic net-id=<network>`` and ``--nic port-id=<port>``. ``--nic``
also provides additional options to specify an IP address, automatic network
assignment and NICs which are not assigned to any port. This functionality
is not part of ``--network`` and ``--port``, which aim to provide a simple
syntax for the standard use cases of connecting a new server to a given
network or port.
server delete
-------------