kolla-ansible/docker/openvswitch/openvswitch-vswitchd/ovs_ensure_configured.sh
Sam Yaple 76920be5fa Rename ovs to openvswitch
Our openvswitch image does not follow the naming convention of any of
our other containers and it should.

Change-Id: If1b815117bb39df74061218e48778479b8d674bc
Closes-Bug: #1500392
2015-09-28 11:10:17 +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