Skip to content

Commit 459526e

Browse files
committed
Better help for --nic in create server
Use the help string from python-novaclient for a better user experience. Closes-Bug: #1444685 Change-Id: If7b8e3f68a0c6ad82b9959f162670b5568d5d12d
1 parent 8b44d34 commit 459526e

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎openstackclient/compute/v2/server.py‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,17 @@ def get_parser(self, prog_name):
275275
)
276276
parser.add_argument(
277277
'--nic',
278-
metavar='<nic-config-string>',
278+
metavar="<net-id=net-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr,"
279+
"port-id=port-uuid>",
279280
action='append',
280281
default=[],
281-
help=_('Specify NIC configuration (optional extension)'),
282+
help=_("Create a NIC on the server. "
283+
"Specify option multiple times to create multiple NICs. "
284+
"Either net-id or port-id must be provided, but not both. "
285+
"net-id: attach NIC to network with this UUID, "
286+
"port-id: attach NIC to port with this UUID, "
287+
"v4-fixed-ip: IPv4 fixed address for NIC (optional), "
288+
"v6-fixed-ip: IPv6 fixed address for NIC (optional), "),
282289
)
283290
parser.add_argument(
284291
'--hint',

0 commit comments

Comments
 (0)