From 49ab5d77de106ad368e8b3ee1e476bbe47089598 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Tue, 7 Nov 2017 04:08:40 -0800 Subject: [PATCH] Add in feature for 'on behalf of' Version 2.2 has a logging feature wher the NSX can log via the X-NSX-EUSER header details of who the request was made for. This feature will enable the plugin to determine whether or not to send this header. Change-Id: Ib87d5df2fbf5e15856511a50013ea47dbd4ca728 --- vmware_nsxlib/v3/__init__.py | 5 +++-- vmware_nsxlib/v3/nsx_constants.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/vmware_nsxlib/v3/__init__.py b/vmware_nsxlib/v3/__init__.py index 3c79957c..4d9ef592 100644 --- a/vmware_nsxlib/v3/__init__.py +++ b/vmware_nsxlib/v3/__init__.py @@ -271,9 +271,10 @@ class NsxLib(NsxLibBase): def feature_supported(self, feature): if (version.LooseVersion(self.get_version()) >= version.LooseVersion(nsx_constants.NSX_VERSION_2_2_0)): - # Features available since 3.0 + # Features available since 2.2 if (feature == nsx_constants.FEATURE_VLAN_ROUTER_INTERFACE or - feature == nsx_constants.FEATURE_IPSEC_VPN): + feature == nsx_constants.FEATURE_IPSEC_VPN or + feature == nsx_constants.FEATURE_ON_BEHALF_OF): return True if (version.LooseVersion(self.get_version()) >= diff --git a/vmware_nsxlib/v3/nsx_constants.py b/vmware_nsxlib/v3/nsx_constants.py index d80a4738..c7aae5e3 100644 --- a/vmware_nsxlib/v3/nsx_constants.py +++ b/vmware_nsxlib/v3/nsx_constants.py @@ -136,3 +136,4 @@ FEATURE_DHCP_RELAY = 'DHCP Relay' FEATURE_NSX_POLICY = 'NSX Policy' FEATURE_VLAN_ROUTER_INTERFACE = 'VLAN Router Interface' FEATURE_IPSEC_VPN = 'IPSec VPN' +FEATURE_ON_BEHALF_OF = 'On Behalf Of'