Merge "NSX|P Change minimal supported backend version to 2.5"
This commit is contained in:
commit
ab8a02107d
|
@ -92,6 +92,11 @@ def is_nsx_version_2_4_0(nsx_version):
|
|||
version.LooseVersion(v3_const.NSX_VERSION_2_4_0))
|
||||
|
||||
|
||||
def is_nsx_version_2_5_0(nsx_version):
|
||||
return (version.LooseVersion(nsx_version) >=
|
||||
version.LooseVersion(v3_const.NSX_VERSION_2_5_0))
|
||||
|
||||
|
||||
def is_nsxv_version_6_2(nsx_version):
|
||||
return (version.LooseVersion(nsx_version) >=
|
||||
version.LooseVersion('6.2'))
|
||||
|
|
|
@ -178,7 +178,7 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
|
|||
|
||||
# Bind the dummy L3 notifications
|
||||
self.l3_rpc_notifier = l3_rpc_agent_api.L3NotifyAPI()
|
||||
LOG.info("Starting NsxPolicyPlugin (Experimental only!)")
|
||||
LOG.info("Starting NsxPolicyPlugin")
|
||||
self._extension_manager.initialize()
|
||||
self.supported_extension_aliases.extend(
|
||||
self._extension_manager.extension_aliases())
|
||||
|
@ -258,10 +258,11 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
|
|||
def _validate_nsx_policy_version(self):
|
||||
self._nsx_version = self.nsxpolicy.get_version()
|
||||
LOG.info("NSX Version: %s", self._nsx_version)
|
||||
if not self.nsxpolicy.feature_supported(
|
||||
nsxlib_consts.FEATURE_NSX_POLICY_NETWORKING):
|
||||
msg = (_("The NSX Policy plugin cannot be used with NSX version "
|
||||
"%(ver)s") % {'ver': self._nsx_version})
|
||||
if (not self.nsxpolicy.feature_supported(
|
||||
nsxlib_consts.FEATURE_NSX_POLICY_NETWORKING) or
|
||||
not utils.is_nsx_version_2_5_0(self._nsx_version)):
|
||||
msg = (_("The NSX Policy plugin requires version 2.5 "
|
||||
"(current version %(ver)s)") % {'ver': self._nsx_version})
|
||||
raise nsx_exc.NsxPluginException(err_msg=msg)
|
||||
|
||||
def _init_segment_profiles(self):
|
||||
|
|
|
@ -96,7 +96,7 @@ class NsxPPluginTestCaseMixin(
|
|||
'display_name': 'test'}]}
|
||||
mock.patch(
|
||||
"vmware_nsxlib.v3.policy.NsxPolicyLib.get_version",
|
||||
return_value=nsx_constants.NSX_VERSION_2_4_0).start()
|
||||
return_value=nsx_constants.NSX_VERSION_2_5_0).start()
|
||||
mock.patch(
|
||||
"vmware_nsxlib.v3.client.RESTClient.get").start()
|
||||
mock.patch(
|
||||
|
@ -133,7 +133,7 @@ class NsxPPluginTestCaseMixin(
|
|||
return_value=nsxlib_utils.TagLimits(20, 40, 15)).start()
|
||||
# Add some nsxlib mocks for the passthrough apis
|
||||
mock.patch("vmware_nsxlib.v3.NsxLib.get_version",
|
||||
return_value=nsx_constants.NSX_VERSION_2_4_0).start()
|
||||
return_value=nsx_constants.NSX_VERSION_2_5_0).start()
|
||||
mock.patch("vmware_nsxlib.v3.core_resources.NsxLibLogicalRouter."
|
||||
"update").start()
|
||||
|
||||
|
|
Loading…
Reference in New Issue