From 9c1f787a5afc0049cac33ae4f75a6e6a4e16f6b1 Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Thu, 19 Jul 2018 14:12:06 +0300 Subject: [PATCH] Add version 2.4 and initial features list Change-Id: Ie94c5e797eac415103ecf574c8bcd1327a14d06c --- vmware_nsxlib/v3/__init__.py | 6 ++++++ vmware_nsxlib/v3/nsx_constants.py | 2 ++ 2 files changed, 8 insertions(+) diff --git a/vmware_nsxlib/v3/__init__.py b/vmware_nsxlib/v3/__init__.py index 5c3a8410..542f9329 100644 --- a/vmware_nsxlib/v3/__init__.py +++ b/vmware_nsxlib/v3/__init__.py @@ -318,6 +318,12 @@ class NsxLib(NsxLibBase): return node.get('export_type') is 'RESTRICTED' def feature_supported(self, feature): + if (version.LooseVersion(self.get_version()) >= + version.LooseVersion(nsx_constants.NSX_VERSION_2_3_0)): + # Features available since 2.3 + if (feature == nsx_constants.FEATURE_ENS_WITH_SEC): + return True + if (version.LooseVersion(self.get_version()) >= version.LooseVersion(nsx_constants.NSX_VERSION_2_2_0)): # Features available since 2.2 diff --git a/vmware_nsxlib/v3/nsx_constants.py b/vmware_nsxlib/v3/nsx_constants.py index e7ed5160..dcf6a8f4 100644 --- a/vmware_nsxlib/v3/nsx_constants.py +++ b/vmware_nsxlib/v3/nsx_constants.py @@ -126,6 +126,7 @@ NSX_VERSION_2_0_0 = '2.0.0' NSX_VERSION_2_1_0 = '2.1.0' NSX_VERSION_2_2_0 = '2.2.0' NSX_VERSION_2_3_0 = '2.3.0' +NSX_VERSION_2_3_0 = '2.4.0' NSX_VERSION_3_0_0 = '3.0.0' # Features available depending on the backend version @@ -143,3 +144,4 @@ FEATURE_ON_BEHALF_OF = 'On Behalf Of' FEATURE_TRUNK_VLAN = 'Trunk Vlan' FEATURE_ROUTER_TRANSPORT_ZONE = 'Router Transport Zone' FEATURE_NO_DNAT_NO_SNAT = 'No DNAT/No SNAT' +FEATURE_ENS_WITH_SEC = 'ENS with security'