Merge "Fix wrong stacklevel in deprecation warnings"
This commit is contained in:
commit
a8700687de
@ -84,7 +84,7 @@ class HyperVInspector(virt_inspector.Inspector):
|
||||
self._host_max_cpu_clock = self._compute_host_max_cpu_clock()
|
||||
|
||||
warnings.warn('Support for HyperV is deprecated.',
|
||||
category=DeprecationWarning, stacklevel=3)
|
||||
category=DeprecationWarning, stacklevel=2)
|
||||
|
||||
def _compute_host_max_cpu_clock(self):
|
||||
hostutils = utilsfactory.get_hostutils()
|
||||
|
@ -120,7 +120,7 @@ class VsphereInspector(virt_inspector.Inspector):
|
||||
get_api_session(self.conf), 1000)
|
||||
|
||||
warnings.warn('Support for VMWare vSphere is deprecated.',
|
||||
category=DeprecationWarning, stacklevel=3)
|
||||
category=DeprecationWarning, stacklevel=2)
|
||||
|
||||
def _get_vm_mobj_not_power_off_or_raise(self, instance):
|
||||
vm_mobj = self._ops.get_vm_mobj(instance.id)
|
||||
|
@ -39,7 +39,7 @@ class FirewallPollster(base.BaseServicesPollster):
|
||||
|
||||
warnings.warn('Support for Neutron FWaaS has been deprecated '
|
||||
'and will be removed in a future release.',
|
||||
category=DeprecationWarning, stacklevel=3)
|
||||
category=DeprecationWarning, stacklevel=2)
|
||||
|
||||
@property
|
||||
def default_discovery(self):
|
||||
@ -86,7 +86,7 @@ class FirewallPolicyPollster(base.BaseServicesPollster):
|
||||
|
||||
warnings.warn('Support for Neutron FWaaS has been deprecated '
|
||||
'and will be removed in a future release.',
|
||||
category=DeprecationWarning, stacklevel=3)
|
||||
category=DeprecationWarning, stacklevel=2)
|
||||
|
||||
@property
|
||||
def default_discovery(self):
|
||||
|
@ -60,7 +60,7 @@ class OpencontrailDriver(driver.Driver):
|
||||
"""
|
||||
def __init__(self, conf):
|
||||
warnings.warn('Support for OpenContrail is deprecated.',
|
||||
category=DeprecationWarning, stacklevel=3)
|
||||
category=DeprecationWarning, stacklevel=2)
|
||||
super(OpencontrailDriver, self).__init__(conf)
|
||||
|
||||
def _prepare_cache(self, endpoint, params, cache):
|
||||
|
@ -81,7 +81,7 @@ class OpenDayLightDriver(driver.Driver):
|
||||
"""
|
||||
def __init__(self, conf):
|
||||
warnings.warn('Support for OpenDaylight is deprecated.',
|
||||
category=DeprecationWarning, stacklevel=3)
|
||||
category=DeprecationWarning, stacklevel=2)
|
||||
super(OpenDayLightDriver, self).__init__(conf)
|
||||
|
||||
def _prepare_cache(self, endpoint, params, cache):
|
||||
|
Loading…
Reference in New Issue
Block a user