From fc58ec85b7962b4709e5ba402c5159493979e9a4 Mon Sep 17 00:00:00 2001 From: Tong Liu Date: Thu, 14 Sep 2017 11:22:11 +0000 Subject: [PATCH] Move LBaaS to 2.1 supported feature NSXv3 supports native load balancing since 2.1. Move the feature to 2.1 from 2.0. Change-Id: Ib2076a2afdd7576ebc262af30d5a4e05fa866ce8 --- vmware_nsxlib/v3/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vmware_nsxlib/v3/__init__.py b/vmware_nsxlib/v3/__init__.py index 7f91b8a4..d11f079a 100644 --- a/vmware_nsxlib/v3/__init__.py +++ b/vmware_nsxlib/v3/__init__.py @@ -257,15 +257,17 @@ class NsxLib(NsxLibBase): return self.nsx_version def feature_supported(self, feature): + if (version.LooseVersion(self.get_version()) >= + version.LooseVersion(nsx_constants.NSX_VERSION_2_1_0)): + # Features available since 2.1 + if (feature == nsx_constants.FEATURE_LOAD_BALANCER): + return True + if (version.LooseVersion(self.get_version()) >= version.LooseVersion(nsx_constants.NSX_VERSION_2_0_0)): # Features available since 2.0 - # TODO(tongl) Load balancer is supported in the next version - # after 2.0. Move load balancer feature to NSX version 2.x - # when the actual version of NSX has been decided. if (feature == nsx_constants.FEATURE_EXCLUDE_PORT_BY_TAG or feature == nsx_constants.FEATURE_ROUTER_FIREWALL or - feature == nsx_constants.FEATURE_LOAD_BALANCER or feature == nsx_constants.FEATURE_DHCP_RELAY): return True