Update OpenDaylight version to Neon
[fuel.git] / mcp / config / states / opendaylight
index d00a773..eb6cc65 100755 (executable)
@@ -14,14 +14,12 @@ source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh"
 
 # Get OpenDaylight server options with prefix odl_
 function odl() {
-  salt --out txt -I 'opendaylight:server' pillar.get "opendaylight:server:odl_$1" | cut -d ' ' -f2
+  salt --out txt -C 'I@opendaylight:server and *01*' pillar.get "opendaylight:server:odl_$1" | cut -d ' ' -f2
 }
 
-# TODO: use service.masked state instead once salt get updated to 2017.7.0+
-salt -I 'opendaylight:server' service.mask opendaylight
-salt -I 'opendaylight:server' state.sls opendaylight
-
+wait_for 5.0 "salt -I 'opendaylight:server' state.sls opendaylight"
 wait_for 20 "salt --out yaml -C 'I@neutron:server and *01*' network.connect $(odl bind_ip) $(odl rest_port) | fgrep -q 'result: true'"
 
-# settle down neutron api and agents
-sleep 180
+# https://bugs.launchpad.net/networking-odl/+bug/1822559
+salt -I 'linux:network:bridge:openvswitch' pkg.install python3-networking-odl
+salt -I 'linux:network:bridge:openvswitch' file.patch /usr/lib/python3/dist-packages/networking_odl/cmd/set_ovs_hostconfigs.py /var/tmp/odl_hostconfig.patch || true