summaryrefslogtreecommitdiffstats
path: root/mcp
diff options
context:
space:
mode:
Diffstat (limited to 'mcp')
-rw-r--r--mcp/salt-formulas/salt-formula-opendaylight/opendaylight/files/netvirt-dhcpservice-config.xml23
-rw-r--r--mcp/salt-formulas/salt-formula-opendaylight/opendaylight/map.jinja4
-rw-r--r--mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls12
3 files changed, 34 insertions, 5 deletions
diff --git a/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/files/netvirt-dhcpservice-config.xml b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/files/netvirt-dhcpservice-config.xml
new file mode 100644
index 000000000..336957fd1
--- /dev/null
+++ b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/files/netvirt-dhcpservice-config.xml
@@ -0,0 +1,23 @@
+{%- from "opendaylight/map.jinja" import server with context -%}
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<dhcpservice-config xmlns="urn:opendaylight:params:xml:ns:yang:dhcpservice:config">
+ <controller-dhcp-enabled>{{ server.dhcp.enabled }}</controller-dhcp-enabled>
+ <dhcp-dynamic-allocation-pool-enabled>{{ server.dhcp.dynamic_allocation_pool_enabled }}</dhcp-dynamic-allocation-pool-enabled>
+</dhcpservice-config>
diff --git a/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/map.jinja b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/map.jinja
index 38575111e..e0b495952 100644
--- a/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/map.jinja
+++ b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/map.jinja
@@ -16,6 +16,10 @@
'enable_ha': false,
'ha_node_ips': [],
'ha_node_index': 0,
+ 'dhcp': {
+ 'enabled': false,
+ 'dynamic_allocation_pool_enabled': false,
+ },
'security_group_mode': 'stateful',
'vpp_routing_node': '',
'java_extra_opts': '-Djava.net.preferIPv4Stack=true -XX:+UseG1GC',
diff --git a/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls
index 206dc52a2..ff5a0bbfa 100644
--- a/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls
+++ b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls
@@ -46,11 +46,6 @@ 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] %}
@@ -58,6 +53,7 @@ opendaylight:
{%- endif %}
- watch:
- file: /opt/opendaylight/etc/jetty.xml
+ - file: /opt/opendaylight/etc/opendaylight/datastore/initial/config/netvirt-dhcpservice-config.xml
- file: /opt/opendaylight/bin/setenv
- ini: /opt/opendaylight/etc/org.apache.karaf.features.cfg
- ini: /opt/opendaylight/etc/org.ops4j.pax.web.cfg
@@ -105,6 +101,12 @@ opendaylight:
- service: opendaylight
{%- endif %}
+/opt/opendaylight/etc/opendaylight/datastore/initial/config/netvirt-dhcpservice-config.xml:
+ file.managed:
+ - source: salt://opendaylight/files/netvirt-dhcpservice-config.xml
+ - use:
+ - file: /opt/opendaylight/etc/jetty.xml
+
{%- if grains['cpuarch'] == 'aarch64' %}
opendaylight-leveldbjni:
pkg.installed