Browse Source

Merge "Warn OPENSTACK_QUANTUM_NETWORK setting as deprecated" into proposed/juno

Jenkins 4 years ago
parent
commit
ce839aa58d
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      openstack_dashboard/api/neutron.py

+ 7
- 0
openstack_dashboard/api/neutron.py View File

@@ -21,6 +21,7 @@ from __future__ import absolute_import
21 21
 
22 22
 import collections
23 23
 import logging
24
+import warnings
24 25
 
25 26
 import netaddr
26 27
 
@@ -936,6 +937,12 @@ def is_extension_supported(request, extension_alias):
936 937
 
937 938
 
938 939
 def is_enabled_by_config(name, default=True):
940
+    if hasattr(settings, 'OPENSTACK_QUANTUM_NETWORK'):
941
+        warnings.warn(
942
+            'OPENSTACK_QUANTUM_NETWORK setting is deprecated and will be '
943
+            'removed in the near future. '
944
+            'Please use OPENSTACK_NEUTRON_NETWORK instead.',
945
+            DeprecationWarning)
939 946
     network_config = (getattr(settings, 'OPENSTACK_NEUTRON_NETWORK', {}) or
940 947
                       getattr(settings, 'OPENSTACK_QUANTUM_NETWORK', {}))
941 948
     return network_config.get(name, default)

Loading…
Cancel
Save