Browse Source

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
changes/34/704734/2
Shawn Wang asarfaty 3 months ago
parent
commit
81b37943af
4 changed files with 4 additions and 13 deletions
  1. +0
    -4
      vmware_nsxlib/v3/__init__.py
  2. +0
    -1
      vmware_nsxlib/v3/nsx_constants.py
  3. +2
    -6
      vmware_nsxlib/v3/policy/__init__.py
  4. +2
    -2
      vmware_nsxlib/v3/policy/lb_defs.py

+ 0
- 4
vmware_nsxlib/v3/__init__.py 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



+ 0
- 1
vmware_nsxlib/v3/nsx_constants.py 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


+ 2
- 6
vmware_nsxlib/v3/policy/__init__.py View File

@@ -167,12 +167,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
@@ -188,6 +182,8 @@ class NsxPolicyLib(lib.NsxLibBase):
return True
if feature == nsx_constants.FEATURE_NSX_POLICY_ADMIN_STATE:
return True
if (feature == nsx_constants.FEATURE_RELAX_SCALE_VALIDATION):
return True

return (feature == nsx_constants.FEATURE_NSX_POLICY)



+ 2
- 2
vmware_nsxlib/v3/policy/lb_defs.py View File

@@ -390,7 +390,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:
@@ -398,7 +398,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


Loading…
Cancel
Save