Need to reorganize '--help' in CLI

Registered by Anastasia Kuznetsova

Currently, latest python-mistralclient supports both CLI versions. But these versions have a differences, some commands are absent in v2 and conversely, some are just appeared.

1) When user executes "mistral --help", he see list of commands for v2 CLI version only. Part of these commands work only with v2 and when user tries to execute one of these commands for v1 he got an error. The reason of such error isn't clear for the end user because from his side all is correct (he executes command from help list).

Possible solution: Mark such commands as "work only on v2"

2)Alternatively, command 'workbook-upload-definition' still work in v1, but is absent in v2, and there is no information about it command in help text.

Possible solution: In case if mistralclient will support both version, mark such commands as "Deprecated. Only for v1"

3)Another situation when command works in v1 and in v2 but has different arguments. Then 'mistral help <command>' is shown info about how it command work in v2 and nothing about v1. To see help how it command work in v1 user have to add --os-mistral-url="<host>/v1" to the command.

Possible solution: In case if mistralclient will support both version, show help text for both version, for example:

mistral help workbook-create

Create new workbook.

positional arguments:
  v1:
  name Workbook name
  description Workbook description
  tags Workbook tags separated by ","
  definition Workbook definition file

  v2:
  definition Workbook definition file

Blueprint information

Status:
Complete
Approver:
Renat Akhmerov
Priority:
Undefined
Drafter:
Anastasia Kuznetsova
Direction:
Approved
Assignee:
None
Definition:
Obsolete
Series goal:
Accepted for liberty
Implementation:
Unknown
Milestone target:
None
Completed by
Renat Akhmerov

Related branches

Sprints

Whiteboard

I think we need to do a better job of presenting everything to a user. As far as CLI we need to explicit print the current version we're using at the moment and how we can switch to a different version if needed.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.