summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkihiro Motoki <motoki@da.jp.nec.com>2014-10-05 03:53:51 +0900
committerThierry Carrez <thierry@openstack.org>2014-10-10 10:54:21 +0200
commitf1a8abb9250f158ba1f04cf2055f717e78ef8184 (patch)
tree26c5e8b81049fedf69257a9f324137aa84a8d945
parent9b0ba951c07af13aa4c386b19876474b971e7946 (diff)
downloadhorizon-f1a8abb9250f158ba1f04cf2055f717e78ef8184.tar.gz
Warn OPENSTACK_QUANTUM_NETWORK setting as deprecated
Change-Id: If2f762fe665b9a88153a77a658f52bcd56185c53 Closes-Bug: #1377498 (cherry picked from commit 530e5fee789ce5ed19d90a6b4901f01e8efde5ff)
-rw-r--r--openstack_dashboard/api/neutron.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/openstack_dashboard/api/neutron.py b/openstack_dashboard/api/neutron.py
index 4dccc6fb0..b8aa880df 100644
--- a/openstack_dashboard/api/neutron.py
+++ b/openstack_dashboard/api/neutron.py
@@ -21,6 +21,7 @@ from __future__ import absolute_import
import collections
import logging
+import warnings
import netaddr
@@ -936,6 +937,12 @@ def is_extension_supported(request, extension_alias):
def is_enabled_by_config(name, default=True):
+ if hasattr(settings, 'OPENSTACK_QUANTUM_NETWORK'):
+ warnings.warn(
+ 'OPENSTACK_QUANTUM_NETWORK setting is deprecated and will be '
+ 'removed in the near future. '
+ 'Please use OPENSTACK_NEUTRON_NETWORK instead.',
+ DeprecationWarning)
network_config = (getattr(settings, 'OPENSTACK_NEUTRON_NETWORK', {}) or
getattr(settings, 'OPENSTACK_QUANTUM_NETWORK', {}))
return network_config.get(name, default)