Incorrect help message in port(node)-create openstack CLI option

Bug #1631326 reported by Galyna Zholtkevych
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ironicclient
Triaged
Low
Unassigned

Bug Description

Related bug: 1518959
According help message of port-create `MAC address for this port` and `UUID of the node that this port belongs to.`
are optional arguments but in fact user can't create port without it

Precondition:
Environment with openstack CLI

Steps to reproduce:
Execute:
    ~$ openstack baremetal port create

Output:
openstack baremetal port create: error: argument -a/--address is required
openstack baremetal port create: error: argument -n/--node/--node_uuid is required

Expected result:
Correct help message about what arguments are optional and what are required

Revision history for this message
Galyna Zholtkevych (gzholtkevych) wrote :

Also it corresponds to `node-create`

stack@vs-devstack-04:~$ openstack help baremetal node-create
usage: openstack baremetal node-create [-c <chassis>] -d <driver> [-i <key=value>]
                          [-p <key=value>] [-e <key=value>] [-u <uuid>]
                          [-n <name>]

Register a new node with the Ironic service.

Optional arguments:
  -c <chassis>, --chassis <chassis>
                        UUID of the chassis that this node belongs to.
  -d <driver>, --driver <driver>
                        Driver used to control the node [REQUIRED].
  -i <key=value>, --driver-info <key=value>
                        Key/value pair used by the driver, such as out-of-band
                        management credentials. Can be specified multiple
                        times.
  -p <key=value>, --properties <key=value>
                        Key/value pair describing the physical characteristics
                        of the node. This is exported to Nova and used by the
                        scheduler. Can be specified multiple times.
  -e <key=value>, --extra <key=value>
                        Record arbitrary key/value metadata. Can be specified
                        multiple times.
  -u <uuid>, --uuid <uuid>
                        Unique UUID for the node.
  -n <name>, --name <name>
                        Unique name for the node.

Actual usage:
stack@vs-devstack-04:~$ openstack baremetal node-create
usage: openstack baremetal node-create [-c <chassis>] -d <driver> [-i <key=value>]
                          [-p <key=value>] [-e <key=value>] [-u <uuid>]
                          [-n <name>]
openstack baremetal node-create: error: argument -d/--driver is required

Changed in python-ironicclient:
assignee: nobody → Galyna Zholtkevych (gzholtkevych)
status: New → In Progress
description: updated
Revision history for this message
Sofiia Andriichenko (sandriichenko) wrote :

it corresponds to "openstack help baremetal port set" and "openstack help baremetal port unset"

# openstack help baremetal port set
usage: openstack baremetal port set [-h] [--node <uuid>] [--address <address>]
                                    [--extra <key=value>]
                                    <port>

Set baremetal port properties.

positional arguments:
  <port> UUID of the port

optional arguments:
  -h, --help show this help message and exit
  --node <uuid> Set UUID of the node that this port belongs to
  --address <address> Set MAC address for this port
  --extra <key=value> Extra to set on this baremetal port (repeat option to
                       set multiple extras)

# openstack help baremetal port unset

usage: openstack baremetal port unset [-h] [--extra <key>] <port>

Unset baremetal port properties.

positional arguments:
  <port> UUID of the port.

optional arguments:
  -h, --help show this help message and exit
  --extra <key> Extra to unset on this baremetal port (repeat option to unset
                 multiple extras)

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ironicclient (master)

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

description: updated
Changed in python-ironicclient:
importance: Undecided → Low
Revision history for this message
Kyrylo Romanenko (kromanenko) wrote :

I can see following bugs in commands related to this issue:

1. openstack help baremetal port create
--node <uuid> is in optional arguments
but it should be in required (positional?) arguments.

2. openstack baremetal port group create
argument --node listed as optional argument,
but it is required.

3. openstack help baremetal node create
--driver <driver> is in list optional arguments, but it is required.

Vladyslav Drok (vdrok)
Changed in python-ironicclient:
assignee: Galyna Zholtkevych (gzholtkevych) → nobody
status: In Progress → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.