Merge "Add missing local API down alert"
diff --git a/README.rst b/README.rst
index 2047af9..60eb58a 100644
--- a/README.rst
+++ b/README.rst
@@ -953,6 +953,19 @@
           Instance port in the stated subnet will be associated with the dynamically generated floating IP.
 
 
+
+Enable Neutron extensions (QoS, DNS, etc.)
+------------------------------------------
+.. code-block:: yaml
+
+    neutron:
+      server:
+        backend:
+          extension:
+            - dns
+            - qos
+
+
 Documentation and Bugs
 ======================
 
diff --git a/neutron/files/grafana_dashboards/neutron_openvswitch_prometheus.json b/neutron/files/grafana_dashboards/neutron_openvswitch_prometheus.json
index bf06c4c..3cc03b4 100755
--- a/neutron/files/grafana_dashboards/neutron_openvswitch_prometheus.json
+++ b/neutron/files/grafana_dashboards/neutron_openvswitch_prometheus.json
@@ -22,8 +22,8 @@
           "colorValue": true,
           "colors": [
             "rgba(245, 54, 54, 0.9)",
-            "rgba(237, 129, 40, 0.89)",
-            "rgba(50, 172, 45, 0.97)"
+            "rgba(50, 172, 45, 0.97)",
+            "rgba(237, 129, 40, 0.89)"
           ],
           "datasource": "prometheus",
           "format": "none",
@@ -80,7 +80,7 @@
               "step": 60
             }
           ],
-          "thresholds": "1,0",
+          "thresholds": "0.5,1.5",
           "title": "API Availability",
           "type": "singlestat",
           "valueFontSize": "80%",
@@ -92,13 +92,18 @@
             },
             {
               "op": "=",
+              "text": "DOWN",
+              "value": "0"
+            },
+            {
+              "op": "=",
               "text": "OK",
               "value": "1"
             },
             {
               "op": "=",
-              "text": "DOWN",
-              "value": "0"
+              "text": "UNKNOWN",
+              "value": "2"
             }
           ],
           "valueName": "current"
diff --git a/neutron/files/grafana_dashboards/neutron_prometheus.json b/neutron/files/grafana_dashboards/neutron_prometheus.json
index b103b68..2285ede 100755
--- a/neutron/files/grafana_dashboards/neutron_prometheus.json
+++ b/neutron/files/grafana_dashboards/neutron_prometheus.json
@@ -22,8 +22,8 @@
           "colorValue": true,
           "colors": [
             "rgba(245, 54, 54, 0.9)",
-            "rgba(237, 129, 40, 0.89)",
-            "rgba(50, 172, 45, 0.97)"
+            "rgba(50, 172, 45, 0.97)",
+            "rgba(237, 129, 40, 0.89)"
           ],
           "datasource": "prometheus",
           "format": "none",
@@ -80,7 +80,7 @@
               "step": 60
             }
           ],
-          "thresholds": "1,0",
+          "thresholds": "0.5,1.5",
           "title": "API Availability",
           "type": "singlestat",
           "valueFontSize": "80%",
@@ -92,13 +92,18 @@
             },
             {
               "op": "=",
+              "text": "DOWN",
+              "value": "0"
+            },
+            {
+              "op": "=",
               "text": "OK",
               "value": "1"
             },
             {
               "op": "=",
-              "text": "DOWN",
-              "value": "0"
+              "text": "UNKNOWN",
+              "value": "2"
             }
           ],
           "valueName": "current"
diff --git a/neutron/files/ocata/ml2_conf.ini b/neutron/files/ocata/ml2_conf.ini
index 0d48951..5ecafe3 100644
--- a/neutron/files/ocata/ml2_conf.ini
+++ b/neutron/files/ocata/ml2_conf.ini
@@ -137,7 +137,10 @@
 # neutron.ml2.extension_drivers namespace. For example: extension_drivers =
 # port_security,qos (list value)
 #extension_drivers =
-extension_drivers = port_security{% if server.get('qos', 'True') %},qos{% endif %}
+{%- set tmp_ext_list = server.backend.get('extension', []) %}
+{%- do tmp_ext_list.append('port_security') if 'port_security' not in tmp_ext_list %}
+{%- do tmp_ext_list.append('qos') if server.get('qos', 'True') and 'qos' not in tmp_ext_list %}
+extension_drivers={{ tmp_ext_list|join(',') }}
 
 # Maximum size of an IP packet (MTU) that can traverse the underlying physical
 # network infrastructure without fragmentation when using an overlay/tunnel
diff --git a/neutron/files/ocata/openvswitch_agent.ini b/neutron/files/ocata/openvswitch_agent.ini
index 00c33b4..654fc76 100644
--- a/neutron/files/ocata/openvswitch_agent.ini
+++ b/neutron/files/ocata/openvswitch_agent.ini
@@ -195,9 +195,9 @@
 #agent_type = Open vSwitch agent
 
 # Extensions list to use (list value)
-{% if neutron.get('qos', 'True') %}
-extensions = qos
-{% endif %}
+{%- set tmp_ext_list = neutron.backend.get('extension', []) %}
+{%- do tmp_ext_list.append('qos') if neutron.get('qos', 'True') and 'qos' not in tmp_ext_list %}
+extensions={{ tmp_ext_list|join(',') }}
 
 [ovs]
 
diff --git a/neutron/files/ocata/sriov_agent.ini b/neutron/files/ocata/sriov_agent.ini
index eebd662..9ba9c1a 100644
--- a/neutron/files/ocata/sriov_agent.ini
+++ b/neutron/files/ocata/sriov_agent.ini
@@ -122,9 +122,9 @@
 #
 
 # Extensions list to use (list value)
-{% if neutron.get('qos', 'True') %}
-extensions = qos
-{% endif %}
+{%- set tmp_ext_list = neutron.backend.get('extension', []) %}
+{%- do tmp_ext_list.append('qos') if neutron.get('qos', 'True') and 'qos' not in tmp_ext_list %}
+extensions={{ tmp_ext_list|join(',') }}
 
 
 [sriov_nic]