Merge "Fix flavor swap default value for compute microversion 2.75"

This commit is contained in:
Zuul 2020-06-11 05:50:11 +00:00 committed by Gerrit Code Review
commit 4341421365

View File

@ -107,7 +107,10 @@ class FlavorsAdminTestJSON(base.BaseV2ComputeAdminTest):
"""
def verify_flavor_response_extension(flavor):
# check some extensions for the flavor create/show/detail response
self.assertEqual(flavor['swap'], '')
if self.is_requested_microversion_compatible('2.74'):
self.assertEqual(flavor['swap'], '')
else:
self.assertEqual(flavor['swap'], 0)
self.assertEqual(int(flavor['rxtx_factor']), 1)
self.assertEqual(flavor['OS-FLV-EXT-DATA:ephemeral'], 0)
self.assertEqual(flavor['os-flavor-access:is_public'], True)