← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1418830] Re: Document Bug: service API works different than github doc (documented find by name but code work by type) - Openstack CLI

 

** Changed in: keystone
       Status: Fix Committed => Fix Released

** Changed in: keystone
    Milestone: None => kilo-3

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1418830

Title:
  Document Bug: service API works different than github doc (documented
  find by name but code work by type) - Openstack CLI

Status in OpenStack Identity (Keystone):
  Fix Released

Bug description:
  In the document it's said:
  https://github.com/openstack/keystone/blob/master/doc/source/cli_examples.rst 
  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-description> New service description
  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)cetest@cer106n0001:~/ysong/ysong$ openstack service list
  ----------------------------------------------------------------+
  ID	Name	Type	Enabled
  ----------------------------------------------------------------+
  095c0ff1e4be4126aad6f0a2270db4c4	ceilometer	metering	True
  0bf8d9ffa1ad489093f861731bf36e3f	heat	orchestration	True
  270bd87014f34142af9a4ce97d85517d	sherpa	hp-catalog	True
  34aad9f100194ef0b0f0b819cd418371	keystone	identity	True
  50b54b4a8a88426e841be4f0dda3967b	nova	computev3	True
  96084d6e48eb40e8b19df15ab33d3d35	glance	image	True
  aada972fb0bb4021b46236bc13dfb832	swift	object-store	True
  b2789fb971574f2d82ae9edecd062584	cinder	volume	True
  ce17772214884cd0baff1611bbb0a07c	neutron	network	True
  eae5cc974ec94d649e24bcf19a406662	nova	compute	True
  f2f1590d30d7451ba6a43f5a00a6b607	ec2	ec2	True
  ----------------------------------------------------------------+
  (test_venv)cetest@cer106n0001:~/ysong/ysong$ openstack service show nova
  ERROR: openstack No service with a type, name or ID of 'nova' exists.
  (test_venv)cetest@cer106n0001:~/ysong/ysong$ openstack service create test --type compute --description test
  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: --type compute --description test
  (test_venv)cetest@cer106n0001:~/ysong/ysong$ openstack service create compute --name Test --description test
  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)cetest@cer106n0001:~/ysong/ysong$ openstack service create compute --name Test
  -----------------------------------------+
  Field	Value
  -----------------------------------------+
  enabled	True
  id	f38310d398b44513b46e8a3eacda4f9a
  name	Test
  type	compute
  -----------------------------------------+
  (test_venv)cetest@cer106n0001:~/ysong/ysong$ openstack service list
  ----------------------------------------------------------------+
  ID	Name	Type	Enabled
  ----------------------------------------------------------------+
  095c0ff1e4be4126aad6f0a2270db4c4	ceilometer	metering	True
  0bf8d9ffa1ad489093f861731bf36e3f	heat	orchestration	True
  270bd87014f34142af9a4ce97d85517d	sherpa	hp-catalog	True
  34aad9f100194ef0b0f0b819cd418371	keystone	identity	True
  50b54b4a8a88426e841be4f0dda3967b	nova	computev3	True
  96084d6e48eb40e8b19df15ab33d3d35	glance	image	True
  aada972fb0bb4021b46236bc13dfb832	swift	object-store	True
  b2789fb971574f2d82ae9edecd062584	cinder	volume	True
  ce17772214884cd0baff1611bbb0a07c	neutron	network	True
  eae5cc974ec94d649e24bcf19a406662	nova	compute	True
  f2f1590d30d7451ba6a43f5a00a6b607	ec2	ec2	True
  f38310d398b44513b46e8a3eacda4f9a	Test	compute	True
  ----------------------------------------------------------------+
  (test_venv)cetest@cer106n0001:~/ysong/ysong$ openstack service delete f38310d398b44513b46e8a3eacda4f9a
  (test_venv)cetest@cer106n0001:~/ysong/ysong$ openstack service show compute	//show by 'Type' too
  ---------------------------------------------+
  Field	Value
  ---------------------------------------------+
  description	Nova Compute Service
  enabled	True
  id	eae5cc974ec94d649e24bcf19a406662
  name	nova
  type	compute
  ---------------------------------------------+
  (test_venv)cetest@cer106n0001:~/ysong/ysong$ openstack service show nova
  ERROR: openstack No service with a type, name or ID of 'nova' exists.


  (openstack) service list
  ----------------------------------------------------------------+
  ID	Name	Type	Enabled
  ----------------------------------------------------------------+
  0e28690b0f9e4b7d8935027ab3f426cf	neutron	network	True
  57fa94acbef24782b64069035374a7b3	cinder	volume	True
  827eba724d814920b34fa7196bb09432	sherpa	hp-catalog	True
  90ebb68d1fce4dd99bd37ab0e749a022	nova	computev3	True
  9af969e39ed6472c88886e35168e7711	heat	orchestration	True
  a5d024efb2744863b634f69cff8c49d2	swift	object-store	True
  d0f10646192a428dae4471d0226256f6	nova	compute	True
  d1300e097ee84bb781cee8fc47c0c623	ec2	ec2	True
  e40cc3fb58114844a9dfe0af3ded9745	glance	image	True
  f1125f4546a8473aa63c91c6ea655755	ceilometer	metering	True
  fd2a2d4b7382444691bea723851c2202	keystone	identity	True
  ----------------------------------------------------------------+
  (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	d0f10646192a428dae4471d0226256f6
  name	nova
  type	compute
  ---------------------------------------------+
  (openstack) service create apal-test --type compute --description test
  usage: service create [-h] [-f
  {html,json,shell,table,value,yaml}] [-c COLUMN]
  [--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,shell,table,value,yaml}
  ] [-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	14b9130458cd41be95140c1c3ce6eab3
  name	apal-test
  type	compute
  -----------------------------------------+
  (openstack) service delete 14b9130458cd41be95140c1c3ce6eab3
  (openstack) service list
  ----------------------------------------------------------------+
  ID	Name	Type	Enabled
  ----------------------------------------------------------------+
  0e28690b0f9e4b7d8935027ab3f426cf	neutron	network	True
  57fa94acbef24782b64069035374a7b3	cinder	volume	True
  827eba724d814920b34fa7196bb09432	sherpa	hp-catalog	True
  90ebb68d1fce4dd99bd37ab0e749a022	nova	computev3	True
  9af969e39ed6472c88886e35168e7711	heat	orchestration	True
  a5d024efb2744863b634f69cff8c49d2	swift	object-store	True
  d0f10646192a428dae4471d0226256f6	nova	compute	True
  d1300e097ee84bb781cee8fc47c0c623	ec2	ec2	True
  e40cc3fb58114844a9dfe0af3ded9745	glance	image	True
  f1125f4546a8473aa63c91c6ea655755	ceilometer	metering	True
  fd2a2d4b7382444691bea723851c2202	keystone	identity	True
  ----------------------------------------------------------------+
  (openstack)

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1418830/+subscriptions


References