Fix flavor getting needed for octavia plugin
When we choose a flavor we should keep in mind
the flavor volume size.
Fix adds sorting for flavors based on volume size
Change-Id: I080f5b25831dabc5565649e71dada8f94690b6cc
Related-PROD: PROD-24173
diff --git a/_modules/runtest/tempest_sections/heat_plugin.py b/_modules/runtest/tempest_sections/heat_plugin.py
index da680cd..945ea39 100644
--- a/_modules/runtest/tempest_sections/heat_plugin.py
+++ b/_modules/runtest/tempest_sections/heat_plugin.py
@@ -165,11 +165,10 @@
'nova.client.server.admin_identity.flavor', c)
if not flavors:
return
- instance_type_name, _ = sorted(
- flavors.items(),
- key=lambda (k, v): (v, k)
- )[-1]
- return instance_type_name
+ flavor = [f for f in flavors if flavors[f]['disk'] > 3]
+ if not flavor:
+ return
+ return flavor[0]
@property
def ip_version_for_ssh(self):