Fix: return the flavor ID on autodetection

The name was returned incorrectly (and inconsistently with the other
possible computation branches).

Also, fix a typo in a user-visible string.

Change-Id: I799a7239bad28c6c0d44ee399903aa67645aa45a
This commit is contained in:
Luigi Toscano 2018-08-06 20:32:34 +02:00
parent 2273794919
commit 55e48c0a62

View File

@ -119,7 +119,7 @@ class Flavors(object):
:param flavor_name: [m1.nano, m1.micro]
"""
LOG.warning("Flavor '%s' not found and creation is not allowed. "
"Tying to autodetect the smallest flavor available.",
"Trying to autodetect the smallest flavor available.",
flavor_name)
flavors = []
for flavor in self.flavor_list:
@ -139,4 +139,4 @@ class Flavors(object):
LOG.warning("Found '%s' flavor (id: '%s', ram: '%s', disk: '%s', "
"vcpus: '%s') ", f[0], f[1], f[2], f[3], f[4])
# return flavor's id
return f[0]
return f[1]