Remove FEATURE_ROUTER_FIREWALL support since 4.0.1
nat_pass property was introduced by feature ROUTER_FIREWALL, it has been deprecated since 4.0.1. Remove the property if nsxt version is greater than 4.0.1 Change-Id: Icba4ff4139fc8ac3502e2c633637582e075faa38
This commit is contained in:
parent
69662ffa4e
commit
9523d737ba
@ -375,6 +375,14 @@ class NsxFeaturesTestCase(nsxlib_testcase.NsxLibTestCase):
|
||||
self.assertTrue(self.nsxlib.feature_supported(
|
||||
nsx_constants.FEATURE_EXCLUDE_PORT_BY_TAG))
|
||||
|
||||
def test_v4_features(self):
|
||||
self.nsxlib.nsx_version = "4.0.1"
|
||||
self.assertFalse(self.nsxlib.feature_supported(
|
||||
nsx_constants.FEATURE_ROUTER_FIREWALL))
|
||||
self.nsxlib.nsx_version = "4.0.0"
|
||||
self.assertTrue(self.nsxlib.feature_supported(
|
||||
nsx_constants.FEATURE_ROUTER_FIREWALL))
|
||||
|
||||
def test_v2_features_plus(self):
|
||||
self.test_v2_features(current_version='2.0.1')
|
||||
|
||||
|
@ -148,6 +148,12 @@ class NsxLib(lib.NsxLibBase):
|
||||
return node.get('export_type') == 'RESTRICTED'
|
||||
|
||||
def feature_supported(self, feature):
|
||||
if (version.LooseVersion(self.get_version()) >=
|
||||
version.LooseVersion(nsx_constants.NSX_VERSION_4_0_1)):
|
||||
# feature added since 2.0, removed since 4.0.1
|
||||
if feature == nsx_constants.FEATURE_ROUTER_FIREWALL:
|
||||
return False
|
||||
|
||||
if (version.LooseVersion(self.get_version()) >=
|
||||
version.LooseVersion(nsx_constants.NSX_VERSION_3_1_0)):
|
||||
# features available since 3.1.0
|
||||
|
@ -156,6 +156,7 @@ NSX_VERSION_3_1_0 = '3.1.0'
|
||||
NSX_VERSION_3_2_0 = '3.2.0'
|
||||
NSX_VERSION_3_2_1 = '3.2.1'
|
||||
NSX_VERSION_4_0_0 = '4.0.0'
|
||||
NSX_VERSION_4_0_1 = '4.0.1'
|
||||
|
||||
# Features available depending on the NSX Manager backend version
|
||||
FEATURE_MAC_LEARNING = 'MAC Learning'
|
||||
|
Loading…
Reference in New Issue
Block a user