From 8c4285ddc2a6c9e2124bfd82e1ae2764a5273fe0 Mon Sep 17 00:00:00 2001 From: Vance Shipley Date: Fri, 12 May 2017 04:02:50 +0530 Subject: [PATCH] Bug 267 fixed: correct flavor dict key names Signed-off-by: Vance Shipley --- osm_ro/vimconn_aws.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/osm_ro/vimconn_aws.py b/osm_ro/vimconn_aws.py index 45202934..dbe9acb2 100644 --- a/osm_ro/vimconn_aws.py +++ b/osm_ro/vimconn_aws.py @@ -471,17 +471,17 @@ class vimconnector(vimconn.vimconnector): try: flavor = None for key, values in self.flavor_info.iteritems(): - if (values["memory"], values["cores"], values["disk"]) == ( - flavor_dict["ram"], flavor_dict["cpus"], flavor_dict["disk"]): + if (values["ram"], values["cpus"], values["disk"]) == ( + flavor_dict["ram"], flavor_dict["vcpus"], flavor_dict["disk"]): flavor = (key, values) break - elif (values["memory"], values["cores"], values["disk"]) >= ( - flavor_dict["ram"], flavor_dict["cpus"], flavor_dict["disk"]): + elif (values["ram"], values["cpus"], values["disk"]) >= ( + flavor_dict["ram"], flavor_dict["vcpus"], flavor_dict["disk"]): if not flavor: flavor = (key, values) else: - if (flavor[1]["memory"], flavor[1]["cores"], flavor[1]["disk"]) >= ( - values["memory"], values["cores"], values["disk"]): + if (flavor[1]["ram"], flavor[1]["cpus"], flavor[1]["disk"]) >= ( + values["ram"], values["cpus"], values["disk"]): flavor = (key, values) if flavor: return flavor[0] -- 2.25.1