OSC operations that have optional params don't raise an error when no options are passed

Bug #2032984 reported by Goutham Pacha Ravi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-manilaclient
In Progress
Low
Solomon Barine Akpuru

Bug Description

This is a UX improvement RFE.

When using the OSC CLI, when a command has optional parameters, not providing any of these options doesn't currently raise any errors.

For example:

https://opendev.org/openstack/python-manilaclient/src/commit/7a15a2a1ae9bde8236547b85c90a9f71c9f11073/manilaclient/osc/v2/security_services.py#L280-L323

Here, if you use:

 $ openstack share security service set mysecservice

i.e, you specify the pos arg in this case (Security service name or ID) but not any of the optional args, the command does nothing. This pattern exists elsewhere too.

It'd be nice for the CLI to suggest that one or more of the options are necessary to have an effect; perhaps as a warning log?

summary: - OSC operations that have optional components don't raise an error when
- no options are passed
+ OSC operations that have optional params don't raise an error when no
+ options are passed
Changed in python-manilaclient:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Solomon Barine Akpuru (solly47) wrote :

Hi Goutham, could you assign this bug to me?

Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

> Hi Goutham, could you assign this bug to me?

Hi Solomon,

Thank you for your interest here. Please propose a bug fix, and i'll set the asignee field.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-manilaclient (master)
Changed in python-manilaclient:
status: Triaged → In Progress
Changed in python-manilaclient:
assignee: nobody → Solomon Barine Akpuru (solly47)
Revision history for this message
Takashi Kajinami (kajinamit) wrote :

I've checked a few commands in openstackclient and many existing commands do not fail when the commands have only optional options and no option is passed.

eg.
 $ openstack server set <servername>
 $ openstack network set <network name>
 $ openstack subnet set <subnet name>

So the current behavior follows the standard. If we change this then we should make this change consistently across all openstack commands but I don't think it's worth paying effort to, atm

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.