Comment 0 for bug 1245342

Revision history for this message
Zhang Yun (zhangyun) wrote : Not accurate usage prompts for "keystone user-create " CLI

Recreate the problem steps:
1. Install OSEE using install scripts.
2. Create a new user for keystone:
2.1 Running "help" to get the parameter list:
[root@localhost init.d]# keystone help user-create
usage: keystone user-create --name <user-name> [--tenant <tenant>]
                            [--pass <pass>] [--email <email>]
                            [--enabled <true|false>]

From the result, the "user-name" is mandatory, others are optional.

2.2 But when only setting username in command, it prompts below error:
[root@localhost init.d]# keystone user-create --name test1
KS-B7349D8 Expecting to find string in password. The server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400)

So I must also set password at the same time.
[root@localhost init.d]# keystone user-create --name test1 --pass passw0rd
+----------+----------------------------------+
| Property | Value |
+----------+----------------------------------+
| email | |
| enabled | True |
| id | 23c5ca72fdb54e3a89d19261fd5ac669 |
| name | test1 |
+----------+----------------------------------+

3. From the results, there are some CLI usage prompts errors when new user creating.

The same issue occurred on "keystone endpoint-create" command.
From the "help" to get the parameter list as below:
[root@osee12-compute01 ˜]# keystone help endpoint-create
usage: keystone endpoint-create [--region <endpoint-region>] --service
                                <service> [--publicurl <public-url>]
                                [--adminurl <admin-url>]
                                [--internalurl <internal-url>]

From the help, the "--service" parameter is mandatory, but when only setting service name in command , it prompts this error:
[root@osee12-compute01 ˜]# keystone endpoint-create --region RegionOne --service 5680c529a8b049d086f4a39d2a0bff5b
publicurl field is required and cannot be empty (HTTP 400)

So the "-publicurl " also should set as mandatory, without the bracket.