From: Vance Shipley Date: Thu, 11 May 2017 22:32:50 +0000 (+0530) Subject: Bug 267 fixed: correct flavor dict key names X-Git-Tag: v2.0.1~16 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F15%2F1815%2F2;p=osm%2FRO.git Bug 267 fixed: correct flavor dict key names Signed-off-by: Vance Shipley --- 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]