kolla/docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh
Sean Mooney 9ce814619a configure ovs bridge in openvswitch-db container
- this change moves the ovs_ensure_configured.sh  file to the
  openvswitch-db container.
- this change reorders the plays in ansible/roles/neutron/tasks/start.yml
  to configure the ovs bridges before starting the vswitchd container.

Change-Id: Ied1a82d48377534c15680406df9a96caf3b79515
Closes-Bug: #1522133
2015-12-03 20:13:21 +00:00

18 lines
311 B
Bash

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