← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1306699] Re: utils.find_resource return resource not depends on query

 

** Changed in: python-openstackclient
       Status: Fix Committed => Fix Released

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

Title:
  utils.find_resource return resource not depends on query

Status in OpenStack Identity (Keystone):
  Invalid
Status in OpenStack Command Line Client:
  Fix Released

Bug description:
  When I have one group, the query /groups?display_name=bogus returns:

  {u'groups': [{u'id': u'6ce42989b4ae41f89323813812ca6208', u'name':
  u'asdf', u'domain_id': u'default', u'links': {u'self':
  u'http://172.20.1.112:5000/v3/groups/6ce42989b4ae41f89323813812ca6208'},
  u'description': u''}], u'links': {u'self':
  u'http://172.20.1.112:5000/v3/groups', u'next': None, u'previous':
  None}}

  Even though the query did not match the query string.

  I have defined only one resource of keystone (one user and one group), then I try command which call method utils.find_resource.
  This resource would be returned by utils.find_resource not depends on what was specified as name or id.

  Examples:
  (.venv)stack@eu:/opt/stack/python-openstackclient$ openstack user list --role --os-identity-api-version 3 non_existing_user

  | 54fbed994dc84616b2118e4fe6b77d8f | Member |

  (.venv)stack@eu:/opt/stack/python-openstackclient$ openstack user list
  --role --os-identity-api-version 3  admin

  | 54fbed994dc84616b2118e4fe6b77d8f | Member |

  openstack group list --role --os-identity-api-version 3 --domain admin
  group_not_exist

  | 54fbed994dc84616b2118e4fe6b77d8f | Member | Default | t_dr  |

  So, utils.find_resource tries to find user/group with incorrect names
  but  doesn't fail in case when only one resource of such type is
  specified. But it should raise an exception that it can't find
  resource with specified name or ID.

  I tried this also with nova and cinder commands, it works correct with
  this services.

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