From e4f6ad98c0a64d3dc7483e2f0aa3eb813d849b24 Mon Sep 17 00:00:00 2001 From: Tong Liu Date: Fri, 16 Jun 2017 11:08:23 +0000 Subject: [PATCH] NSXv3: Add util to check version 2.1.0 Add another common util function to check if backend version is greater or equal to 2.1.0. Depends-on: Id8fd9d6ee2ce376a2d1b5e393a28fa3a063b181f Change-Id: I037ea69f979e509db17197faa9affbdcfcc2e0b3 --- vmware_nsx/common/utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vmware_nsx/common/utils.py b/vmware_nsx/common/utils.py index 8f7370d98c..e17004aef7 100644 --- a/vmware_nsx/common/utils.py +++ b/vmware_nsx/common/utils.py @@ -76,6 +76,11 @@ def is_nsx_version_2_0_0(nsx_version): version.LooseVersion(v3_const.NSX_VERSION_2_0_0)) +def is_nsx_version_2_1_0(nsx_version): + return (version.LooseVersion(nsx_version) >= + version.LooseVersion(v3_const.NSX_VERSION_2_1_0)) + + def is_nsxv_version_6_2(nsx_version): return (version.LooseVersion(nsx_version) >= version.LooseVersion('6.2'))