name should be optional for service-create

Bug #1393977 reported by Lin Hua Cheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keystoneclient
Fix Released
Low
Lin Hua Cheng

Bug Description

According to the api https://github.com/openstack/identity-api/blob/master/v3/src/markdown/identity-api-v3.md only the service type is mandatory.

name, description and enabled field are optional.

python-keystoneclient should not require the name as it is optional in the service, this is to make the validation consistent.

$ keystone --debug service-create --type service-test1
usage: keystone service-create --name <name> --type <type>
                               [--description <service-description>]
keystone service-create: error: argument --name is required

Changed in python-keystoneclient:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

A few things:

* I'm not seeing where in the spec you're getting that name is optional for service creation.
* The identity-api repository is frozen / no longer authoritative, please use http://specs.openstack.org/openstack/keystone-specs/api/v3/identity-api-v3.html

Technically you are correct based upon https://github.com/openstack/keystone/blob/master/keystone/catalog/schema.py#L53-L58 .

How does openstackclient respond? This is largely a user-experience issue, and I would like to encourage everyone to move to OSC instead of using keystonelcient for the cli.

Changed in python-keystoneclient:
status: New → Triaged
importance: Undecided → Low
tags: added: user-experience
Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

It is also documented in the current api docs you suggested: http://specs.openstack.org/openstack/keystone-specs/api/v3/identity-api-v3.html#services-v3-services

Service name is described as an optional attributes in the docs.

$ openstack service create --type service_type_1
usage: openstack service create [-h] [-f {html,json,shell,table,value,yaml}]
                                [-c COLUMN] [--max-width <integer>]
                                [--prefix PREFIX] --type <service-type>
                                [--description <service-description>]
                                <service-name>
openstack service create: error: too few arguments

The service name is also required on the openstackclient.

Should we make both optional to match the actual API?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/143223

Changed in python-keystoneclient:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

Reviewed: https://review.openstack.org/143223
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=1b8c3c8cb90c03881e0a648f247a186fe4b494de
Submitter: Jenkins
Branch: master

commit 1b8c3c8cb90c03881e0a648f247a186fe4b494de
Author: lin-hua-cheng <email address hidden>
Date: Fri Dec 19 16:15:13 2014 -0800

    Updated service name to be optional in CLI

    Service name is optional in the API, updating the CLI
    for consistency.

    Change-Id: I94f0eb248a39d2f59edd00a5f90125a5c42525ed
    Closes-Bug: #1393977
    Closes-Bug: #1404073

Changed in python-keystoneclient:
status: In Progress → Fix Committed
Changed in python-keystoneclient:
milestone: none → 1.1.0
Changed in python-keystoneclient:
status: Fix Committed → Fix Released
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.