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:
parent
a0de247577
commit
81b37943af
|
@ -172,10 +172,6 @@ class NsxLib(lib.NsxLibBase):
|
||||||
# features available since 3.0.0
|
# features available since 3.0.0
|
||||||
if (feature == nsx_constants.FEATURE_GET_TZ_FROM_SWITCH):
|
if (feature == nsx_constants.FEATURE_GET_TZ_FROM_SWITCH):
|
||||||
return True
|
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):
|
if (feature == nsx_constants.FEATURE_RELAX_SCALE_VALIDATION):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,6 @@ NSX_VERSION_2_2_0 = '2.2.0'
|
||||||
NSX_VERSION_2_3_0 = '2.3.0'
|
NSX_VERSION_2_3_0 = '2.3.0'
|
||||||
NSX_VERSION_2_4_0 = '2.4.0'
|
NSX_VERSION_2_4_0 = '2.4.0'
|
||||||
NSX_VERSION_2_5_0 = '2.5.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'
|
NSX_VERSION_3_0_0 = '3.0.0'
|
||||||
|
|
||||||
# Features available depending on the NSX Manager backend version
|
# Features available depending on the NSX Manager backend version
|
||||||
|
|
|
@ -167,12 +167,6 @@ class NsxPolicyLib(lib.NsxLibBase):
|
||||||
if (feature == nsx_constants.FEATURE_ENS_WITH_QOS):
|
if (feature == nsx_constants.FEATURE_ENS_WITH_QOS):
|
||||||
return True
|
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()) >=
|
if (version.LooseVersion(self.get_version()) >=
|
||||||
version.LooseVersion(nsx_constants.NSX_VERSION_3_0_0)):
|
version.LooseVersion(nsx_constants.NSX_VERSION_3_0_0)):
|
||||||
# features available since 3.0.0
|
# features available since 3.0.0
|
||||||
|
@ -188,6 +182,8 @@ class NsxPolicyLib(lib.NsxLibBase):
|
||||||
return True
|
return True
|
||||||
if feature == nsx_constants.FEATURE_NSX_POLICY_ADMIN_STATE:
|
if feature == nsx_constants.FEATURE_NSX_POLICY_ADMIN_STATE:
|
||||||
return True
|
return True
|
||||||
|
if (feature == nsx_constants.FEATURE_RELAX_SCALE_VALIDATION):
|
||||||
|
return True
|
||||||
|
|
||||||
return (feature == nsx_constants.FEATURE_NSX_POLICY)
|
return (feature == nsx_constants.FEATURE_NSX_POLICY)
|
||||||
|
|
||||||
|
|
|
@ -390,7 +390,7 @@ class LBServiceDef(ResourceDef):
|
||||||
|
|
||||||
def _version_dependant_attr_supported(self, attr):
|
def _version_dependant_attr_supported(self, attr):
|
||||||
if (version.LooseVersion(self.nsx_version) >=
|
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':
|
if attr == 'relax_scale_validation':
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
@ -398,7 +398,7 @@ class LBServiceDef(ResourceDef):
|
||||||
"Ignoring %s for %s %s: this feature is not supported."
|
"Ignoring %s for %s %s: this feature is not supported."
|
||||||
"Current NSX version: %s. Minimum supported version: %s",
|
"Current NSX version: %s. Minimum supported version: %s",
|
||||||
attr, self.resource_type, self.attrs.get('name', ''),
|
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
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue