Display private flavors in server list

Update the code so that "openstack server list --all"
also displays the names of private flavors.

Change-Id: I4804fcd905eaf67b1ad9b461084eaf0caa820d2f
Closes-Bug: #1742453
This commit is contained in:
npraveen35 2018-02-04 00:08:02 -08:00 committed by Jens Harbott
parent 7505831e81
commit c615bcd75e
2 changed files with 7 additions and 1 deletions

View File

@ -1162,7 +1162,7 @@ class ListServer(command.Lister):
# "Flavor Name" is not crucial, so we swallow any exceptions.
if not parsed_args.no_name_lookup:
try:
flavors_list = compute_client.flavors.list()
flavors_list = compute_client.flavors.list(is_public=None)
for i in flavors_list:
flavors[i.id] = i
except Exception:

View File

@ -0,0 +1,6 @@
---
fixes:
- |
The ``server list --all`` command now resolves non-public flavor names,
too, so that the ``Flavor`` column will be properly populated.
[Bug `1742453 <https://bugs.launchpad.net/bugs/1742453>`_]