Update supported NSX version for relax_scale_validation

Support for relax_scale_validation for LBS is postponed to NSX 3.0.0.
Updated related version check for MP and Policy in nsxlib. Previous unit
test is still working after this change. Thus no additional UT added.

Change-Id: I26ce4b1af9e9b6c19a3245675a3db2c027361acb
This commit is contained in:
Shawn Wang 2019-11-20 15:29:36 -08:00
parent bfbe3fa101
commit da173462c5
No known key found for this signature in database
GPG Key ID: C98A86CC967E89A7
4 changed files with 4 additions and 13 deletions

View File

@ -172,10 +172,6 @@ class NsxLib(lib.NsxLibBase):
# features available since 3.0.0
if (feature == nsx_constants.FEATURE_GET_TZ_FROM_SWITCH):
return True
if (version.LooseVersion(self.get_version()) >=
version.LooseVersion(nsx_constants.NSX_VERSION_2_5_1)):
# features available since 2.5.1
if (feature == nsx_constants.FEATURE_RELAX_SCALE_VALIDATION):
return True

View File

@ -146,7 +146,6 @@ NSX_VERSION_2_2_0 = '2.2.0'
NSX_VERSION_2_3_0 = '2.3.0'
NSX_VERSION_2_4_0 = '2.4.0'
NSX_VERSION_2_5_0 = '2.5.0'
NSX_VERSION_2_5_1 = '2.5.1'
NSX_VERSION_3_0_0 = '3.0.0'
# Features available depending on the NSX Manager backend version

View File

@ -162,12 +162,6 @@ class NsxPolicyLib(lib.NsxLibBase):
if (feature == nsx_constants.FEATURE_ENS_WITH_QOS):
return True
if (version.LooseVersion(self.get_version()) >=
version.LooseVersion(nsx_constants.NSX_VERSION_2_5_1)):
# features available since 2.5.1
if (feature == nsx_constants.FEATURE_RELAX_SCALE_VALIDATION):
return True
if (version.LooseVersion(self.get_version()) >=
version.LooseVersion(nsx_constants.NSX_VERSION_3_0_0)):
# features available since 3.0.0
@ -177,6 +171,8 @@ class NsxPolicyLib(lib.NsxLibBase):
return True
if feature == nsx_constants.FEATURE_NSX_POLICY_MDPROXY:
return True
if (feature == nsx_constants.FEATURE_RELAX_SCALE_VALIDATION):
return True
return (feature == nsx_constants.FEATURE_NSX_POLICY)

View File

@ -408,7 +408,7 @@ class LBServiceDef(ResourceDef):
def _version_dependant_attr_supported(self, attr):
if (version.LooseVersion(self.nsx_version) >=
version.LooseVersion(nsx_constants.NSX_VERSION_2_5_1)):
version.LooseVersion(nsx_constants.NSX_VERSION_3_0_0)):
if attr == 'relax_scale_validation':
return True
else:
@ -416,7 +416,7 @@ class LBServiceDef(ResourceDef):
"Ignoring %s for %s %s: this feature is not supported."
"Current NSX version: %s. Minimum supported version: %s",
attr, self.resource_type, self.attrs.get('name', ''),
self.nsx_version, nsx_constants.NSX_VERSION_2_5_1)
self.nsx_version, nsx_constants.NSX_VERSION_3_0_0)
return False
return False