kolla-ansible/docker/openvswitch/ovs-vswitchd/ovs_ensure_configured.sh
Sam Yaple cbd42ca6e9 Move docker_templates to docker dir
Updated build.py to reflect this change.
Deprecate --template option and make it a noop.

Change-Id: I7cd98d1ee684a4c64984a49597159868152683b2
Partially-Implements: blueprint remove-docker-dir
2015-08-28 13:33:50 +00:00

18 lines
291 B
Bash
Executable File

#!/bin/bash
bridge=$1
port=$2
ovs-vsctl br-exists $bridge; rc=$?
if [[ $rc == 2 ]]; then
changed=changed
ovs-vsctl add-br $bridge
fi
if [[ ! $(ovs-vsctl list-ports $bridge) =~ $(echo "\<$port\>") ]]; then
changed=changed
ovs-vsctl add-port $bridge $port
fi
echo $changed