Merge "[state] virtual_init: Limit to mas01 on baremetal"
[fuel.git] / mcp / salt-formulas / salt-formula-opendaylight / opendaylight / server.sls
index 206dc52..e0fb091 100644 (file)
@@ -41,16 +41,13 @@ opendaylight_service_mask:
   service.masked:
   - name: opendaylight
 {%- endif %}
+  - prereq:
+    - pkg: opendaylight
 
 opendaylight:
   pkg.installed:
   - require:
     - pkgrepo: opendaylight_repo
-  - require_in:
-    - file: /opt/opendaylight/etc/jetty.xml
-    - file: /opt/opendaylight/bin/setenv
-    - ini: /opt/opendaylight/etc/org.apache.karaf.features.cfg
-    - ini: /opt/opendaylight/etc/org.ops4j.pax.web.cfg
   service.running:
   - enable: true
 {%- if grains['saltversioninfo'] >= [2017, 7] %}
@@ -61,6 +58,7 @@ opendaylight:
     - file: /opt/opendaylight/bin/setenv
     - ini: /opt/opendaylight/etc/org.apache.karaf.features.cfg
     - ini: /opt/opendaylight/etc/org.ops4j.pax.web.cfg
+    - ini: /opt/opendaylight/etc/org.opendaylight.openflowplugin.cfg
 
 /opt/opendaylight/etc/jetty.xml:
   file.managed:
@@ -93,6 +91,11 @@ opendaylight:
         org.ops4j.pax.web.listening.addresses: {{ server.odl_bind_ip }}
         org.osgi.service.http.port: {{ server.odl_rest_port }}
 
+/opt/opendaylight/etc/org.opendaylight.openflowplugin.cfg:
+  ini.options_present:
+    - sections:
+        is-statistics-polling-on: {{ server.stats_polling_enabled }}
+
 {%- if server.get('router_enabled', false) %}
 /opt/opendaylight/etc/custom.properties:
   ini.options_present:
@@ -105,6 +108,17 @@ opendaylight:
       - service: opendaylight
 {%- endif %}
 
+{%- if server.dhcp.enabled %}
+/opt/opendaylight/etc/opendaylight/datastore/initial/config/netvirt-dhcpservice-config.xml:
+  file.managed:
+  - source: salt://opendaylight/files/netvirt-dhcpservice-config.xml
+  - makedirs: true
+  - watch_in:
+    - service: opendaylight
+  - use:
+    - file: /opt/opendaylight/etc/jetty.xml
+{%- endif %}
+
 {%- if grains['cpuarch'] == 'aarch64' %}
 opendaylight-leveldbjni:
   pkg.installed