openstack-python-openstackc.../openstackclient
Huanxuan Ao 681d6dc2de Make "flavor show" command to show a private flavor properly
The "flavor show" command could not show a
private flavor by flavor name becauce it could
not find a private flavor by flavor name.
In "until.find_resource(parsed_args.flavor)",
If parsed_args.falvor is a name of a flavor,
"flavors.find(name=parsed_args.flavor)"will be
called to find a flavor.But the default value of
"is_public" is "Ture" in "flavors.find()" so that
we can only find public flavors.If we want to find
all flaovrs by flavor name,we should add
"is_public=None" in "flavors.find()".

So I tried to change
"until.find_resource(parsed_args.flavor)" to
"until.find_resource(parsed_args.flavor, is_public=None)",
but then I could not find any flavor by flavor id
because "is_public" is an unexpected argument of
"flavors.get()" in "until.find_resource()".

In this case,I think "until.find_resource()"
can not find a private flavor properly,and
we should combine "manager.get(flavor.id)" and
"manager.find(name=flavor.name, is_public=None)"
by ourselve to find a flavor.

Also,this bug affects other flavor commands like
"flavor set/unset/delete",so I fix them in this patch too.

Change-Id: I4a4ed7b0a2f522ee04d1c3270afcda7064285c39
Closes-Bug: #1575478
2016-05-02 16:47:53 +08:00
..
api Fix typos in docstrings and comments 2016-04-06 10:30:39 +07:00
common Support quota show for current project 2016-04-21 11:33:24 -05:00
compute Make "flavor show" command to show a private flavor properly 2016-05-02 16:47:53 +08:00
identity Doc: Unify repeatable option comments 2016-04-12 15:57:17 +08:00
image Image API v2: make volume_type optional 2016-03-18 16:08:30 -07:00
locale Imported Translations from Zanata 2016-04-19 06:14:07 +00:00
network Merge "Add new share and default parms to subnet pool cmds" 2016-04-21 17:18:01 +00:00
object Add recursive object delete for containers 2016-02-05 11:18:46 -07:00
tests Make "flavor show" command to show a private flavor properly 2016-05-02 16:47:53 +08:00
volume Merge "Support for volume service list" 2016-04-28 16:13:46 +00:00
__init__.py Change version reporting to use pbr 2013-08-02 12:11:49 -05:00
i18n.py Update translation setup 2016-01-29 08:18:50 +09:00
shell.py Rename --profile to --os-profile 2016-04-19 07:50:42 -05:00