Document Bug: service API works different than github doc (documented find by name but code work by type) - Openstack CLI
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
Low
|
Steve Martinelli |
Bug Description
In the document it's said:
https:/
Services
service create
positional arguments:
<service-name> New service name
optional arguments:
--type <service-type> New service type (compute, image, identity, volume, etc)
--description <service-
example:
$ openstack service create nova --type compute --description "Nova Compute Service"
But during test, openstack CLI can only find service by 'Type' but not 'Name'. Is it a doc issue or code issue?
Here's the testing:
(test_venv)
-------
ID Name Type Enabled
-------
095c0ff1e4be412
0bf8d9ffa1ad489
270bd87014f3414
34aad9f100194ef
50b54b4a8a88426
96084d6e48eb40e
aada972fb0bb402
b2789fb971574f2
ce17772214884cd
eae5cc974ec94d6
f2f1590d30d7451
-------
(test_venv)
ERROR: openstack No service with a type, name or ID of 'nova' exists.
(test_venv)
usage: openstack service create [-h] [-f
{shell,
[--max-width <integer>] [--prefix PREFIX]
[--name <service-name>] [--enable | --disable]
<service-type>
openstack service create: error: unrecognized arguments: --type compute --description test
(test_venv)
usage: openstack service create [-h] [-f {shell,table,value}
] [-c COLUMN]
[--max-width <integer>] [--prefix PREFIX]
[--name <service-name>] [--enable | --disable]
<service-type>
openstack service create: error: unrecognized arguments: --description test
(test_venv)
-------
Field Value
-------
enabled True
id f38310d398b4451
name Test
type compute
-------
(test_venv)
-------
ID Name Type Enabled
-------
095c0ff1e4be412
0bf8d9ffa1ad489
270bd87014f3414
34aad9f100194ef
50b54b4a8a88426
96084d6e48eb40e
aada972fb0bb402
b2789fb971574f2
ce17772214884cd
eae5cc974ec94d6
f2f1590d30d7451
f38310d398b4451
-------
(test_venv)
(test_venv)
-------
Field Value
-------
description Nova Compute Service
enabled True
id eae5cc974ec94d6
name nova
type compute
-------
(test_venv)
ERROR: openstack No service with a type, name or ID of 'nova' exists.
(openstack) service list
-------
ID Name Type Enabled
-------
0e28690b0f9e4b7
57fa94acbef2478
827eba724d81492
90ebb68d1fce4dd
9af969e39ed6472
a5d024efb274486
d0f10646192a428
d1300e097ee84bb
e40cc3fb5811484
f1125f4546a8473
fd2a2d4b7382444
-------
(openstack) service show nova
ERROR: openstack No service with a type, name or ID of 'nova' exists.
(openstack) service show compute
-------
Field Value
-------
description Nova Compute Service
enabled True
id d0f10646192a428
name nova
type compute
-------
(openstack) service create apal-test --type compute --description test
usage: service create [-h] [-f
{html,json,
[--max-width <integer>] [--prefix PREFIX]
[--name <service-name>] [--enable | --disable]
<service-type>
service create: error: unrecognized arguments: --type compute --description test
(openstack) service create apal-test --type nova
usage: service create [-h] [-f {html,json,
] [-c COLUMN]
[--max-width <integer>] [--prefix PREFIX]
[--name <service-name>] [--enable | --disable]
<service-type>
service create: error: unrecognized arguments: --type nova
(openstack) service create compute --name apal-test
-------
Field Value
-------
enabled True
id 14b9130458cd41b
name apal-test
type compute
-------
(openstack) service delete 14b9130458cd41b
(openstack) service list
-------
ID Name Type Enabled
-------
0e28690b0f9e4b7
57fa94acbef2478
827eba724d81492
90ebb68d1fce4dd
9af969e39ed6472
a5d024efb274486
d0f10646192a428
d1300e097ee84bb
e40cc3fb5811484
f1125f4546a8473
fd2a2d4b7382444
-------
(openstack)
Changed in keystone: | |
milestone: | none → kilo-3 |
status: | Fix Committed → Fix Released |
Changed in keystone: | |
milestone: | kilo-3 → 2015.1.0 |
Refer to http:// docs.openstack. org/developer/ python- openstackclient /command- list.html for the canonical source of truth for all openstackclient commands. I'll use this bug to remove the OSC related commands in the Keystone docs and add a link to: http:// docs.openstack. org/developer/ python- openstackclient /command- list.html
specifically look at http:// docs.openstack. org/developer/ python- openstackclient /command- objects/ service. html for service related content