Browse Source

Merge "Update supported NSX version for relax_scale_validation"

changes/51/695651/1
Zuul 2 weeks ago
parent
commit
2c247d4c17
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

@@ -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)


+ 2
- 2
vmware_nsxlib/v3/policy/lb_defs.py 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

Loading…
Cancel
Save