From c8abede9b1c2e5f88a7894da798a097d7f55ee9d Mon Sep 17 00:00:00 2001 From: Hamdy Khader Date: Sun, 6 Jan 2019 14:04:49 +0200 Subject: [PATCH] Add 'hostname' to port's local link connection In order to create Smart NIC port, port argument is-smartnic should be used in addition to local link connection attributes 'port_id' and 'hostname'. Story: #2003346 Change-Id: I95d6e5d53eb6df8468748ed223bf947da5212b6e --- ironicclient/osc/v1/baremetal_port.py | 14 +++++++++----- ...ort-local-link-connection-0d4ae64b0c24bf52.yaml | 5 +++++ 2 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/add-hostname-to-port-local-link-connection-0d4ae64b0c24bf52.yaml diff --git a/ironicclient/osc/v1/baremetal_port.py b/ironicclient/osc/v1/baremetal_port.py index df70da9fa..d9bc61f69 100644 --- a/ironicclient/osc/v1/baremetal_port.py +++ b/ironicclient/osc/v1/baremetal_port.py @@ -56,7 +56,7 @@ class CreateBaremetalPort(command.ShowOne): metavar="", action='append', help=_("Record arbitrary key/value metadata. " - "Can be specified multiple times.") + "Argument can be specified multiple times.") ) parser.add_argument( '--local-link-connection', @@ -64,8 +64,10 @@ class CreateBaremetalPort(command.ShowOne): action='append', help=_("Key/value metadata describing Local link connection " "information. Valid keys are 'switch_info', 'switch_id', " - "and 'port_id'. The keys 'switch_id' and 'port_id' are " - "required. Can be specified multiple times.") + "'port_id' and 'hostname'. The keys 'switch_id' and " + "'port_id' are required. In case of Smart NIC port, " + "the keys 'port_id' and 'hostname' are required. " + "Argument can be specified multiple times.") ) parser.add_argument( '-l', @@ -299,8 +301,10 @@ class SetBaremetalPort(command.Command): action='append', help=_("Key/value metadata describing local link connection " "information. Valid keys are 'switch_info', 'switch_id', " - "and 'port_id'. The keys 'switch_id' and 'port_id' are " - "required. Can be specified multiple times.") + "'port_id' and 'hostname'. The keys 'switch_id' and " + "'port_id' are required. In case of Smart NIC port, " + "the keys 'port_id' and 'hostname' are required. " + "Argument can be specified multiple times.") ) pxe_enabled_group = parser.add_mutually_exclusive_group(required=False) pxe_enabled_group.add_argument( diff --git a/releasenotes/notes/add-hostname-to-port-local-link-connection-0d4ae64b0c24bf52.yaml b/releasenotes/notes/add-hostname-to-port-local-link-connection-0d4ae64b0c24bf52.yaml new file mode 100644 index 000000000..920984eab --- /dev/null +++ b/releasenotes/notes/add-hostname-to-port-local-link-connection-0d4ae64b0c24bf52.yaml @@ -0,0 +1,5 @@ +--- +prelude: > + Support Smart NIC ports. Adding local link connection attributes + 'port_id' and 'hostname' when creating port with port argument + ``--is-smartnic`` means that it's a Smart NIC port.