--parents option access wrong URL
Bug #1499657 reported by
Hidekazu Nakamura
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-openstackclient |
Fix Released
|
Medium
|
Rui Chen |
Bug Description
project show <project_name> --parents simply show only specified project.
--parents option is expected to access "/projects/
but accessed /"projects?
api-v3:
https:/
debug output:
http://
description: | updated |
Changed in python-openstackclient: | |
assignee: | nobody → Rahul U Nair (rahulunair) |
Changed in python-openstackclient: | |
assignee: | Rahul U Nair (rahulunair) → nobody |
description: | updated |
Changed in python-openstackclient: | |
assignee: | nobody → Hidekazu Nakamura (nakamura-h) |
Changed in python-openstackclient: | |
importance: | Undecided → Medium |
Changed in python-openstackclient: | |
assignee: | Hidekazu Nakamura (nakamura-h) → nobody |
Changed in python-openstackclient: | |
assignee: | nobody → Rui Chen (kiwik-chenrui) |
To post a comment you must log in.
This bug seems to be by design.
project show( maybe other command also ) uses find_resource() method in openstackclient /common/ utils.py. /github. com/openstack/ python- openstackclient /blob/master/ openstackclient /common/ utils.py# L52
https:/
find_resource() method first tries to find by name_or_id. If it failed, list with query parameter of name_or_id.
project show --parents is the following:
If --parents option with project name is given, first try to find by project name with parents_as_list query paramter and fail. Then list project with query parameters of project name and parents_as_list.
Since list projects RESTful API does not accept query paramter parents_as_list, simply show project by query parameter of project name.