diff options
Diffstat (limited to 'mcp/config/states/opendaylight')
-rwxr-xr-x | mcp/config/states/opendaylight | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/mcp/config/states/opendaylight b/mcp/config/states/opendaylight index 34a2c3bd8..de15d0cef 100755 --- a/mcp/config/states/opendaylight +++ b/mcp/config/states/opendaylight @@ -1,6 +1,6 @@ #!/bin/bash -e ############################################################################## -# Copyright (c) 2017 Mirantis Inc., Enea AB and others. +# Copyright (c) 2018 Mirantis Inc., Enea AB and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at @@ -9,7 +9,13 @@ CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x -salt -I 'opendaylight:server' state.sls opendaylight -salt -I 'opendaylight:client' state.sls opendaylight.client -salt -I 'opendaylight:client' cmd.run 'neutron-odl-ovs-hostconfig --noovs_dpdk' -salt -I 'neutron:server' state.sls opendaylight.client +# shellcheck disable=SC1090 +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 +} + +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'" |