Add method to check NSX export type

Add a method to check if NSX build is export restricted or not.

Change-Id: I88038b78cf56caeb605a2b4de2eb1ae4fd724db5
This commit is contained in:
Tong Liu 2018-04-26 12:27:19 +00:00
parent ab42ef09fb
commit 4f7c1a5c6d
1 changed files with 4 additions and 0 deletions

View File

@ -313,6 +313,10 @@ class NsxLib(NsxLibBase):
self.nsx_version = node.get('node_version')
return self.nsx_version
def export_restricted(self):
node = self.client.get("node")
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_2_0)):