Skip to content

Commit d84716f

Browse files
committed
Add missing vnic-type choices to --vnic-type
The --vnic-type choices list was missing several vnic types that exist in neutron-lib's VNIC_TYPES: accelerator-direct (added in Xena for smartNIC SR-IOV), accelerator-direct-physical, and smart-nic. This forced users to use curl to create ports with these vnic types. Add all missing types to the choices tuple and help text so the CLI matches neutron-lib. Closes-Bug: #2161369 Assisted-by: Claude claude-opus-4-6 2.1.215 Change-Id: I052f77b911057a88f21adc0107196a3156a80ca1 Signed-off-by: melanie witt <melwittt@gmail.com>
1 parent 9726a4d commit d84716f

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

openstackclient/network/v2/port.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,20 +396,24 @@ def _add_updatable_args(
396396
'--vnic-type',
397397
metavar='<vnic-type>',
398398
choices=(
399+
'accelerator-direct',
400+
'accelerator-direct-physical',
399401
'direct',
400402
'direct-physical',
401403
'macvtap',
402404
'normal',
403405
'baremetal',
404406
'virtio-forwarder',
407+
'smart-nic',
405408
'vdpa',
406409
'remote-managed',
407410
),
408411
help=_(
409-
"VNIC type for this port (direct | direct-physical | "
410-
"macvtap | normal | baremetal | virtio-forwarder | vdpa | "
411-
"remote-managed) "
412-
"(default: normal)"
412+
"VNIC type for this port (accelerator-direct | "
413+
"accelerator-direct-physical | direct | "
414+
"direct-physical | macvtap | normal | baremetal | "
415+
"virtio-forwarder | smart-nic | vdpa | "
416+
"remote-managed) (default: normal)"
413417
),
414418
)
415419
parser.add_argument(

0 commit comments

Comments
 (0)