Merge "Remove ovsdb related in resources"
[netvirt.git] / resources / openstack / odl_os_ovs.sh
1 #!/usr/bin/env bash
2
3 # odl_os_ovs.sh : Stands for OpenDaylight_OpenStack_Openvswith.sh (cant be more Open than this ;) )
4
5 if [ `whoami` != "root" ]; then
6     echo Please execute this script as superuser or with sudo previleges.
7     exit 1
8 fi
9
10 if [ "$#" -ne 1 ]; then
11   echo "Usage: odl_ovs_os.sh <tunnel-endpoint-ip-address>" >&2
12   echo "       <tunnel-endpoint-ip-address> is same as the local-ip configuration done for ovs-neutron-agent in ovs_quantum_plugin.ini"
13   exit 1
14 fi
15
16 ovs-vsctl set-manager ptcp:6640
17 read ovstbl <<< $(ovs-vsctl get Open_vSwitch . _uuid)
18 ovs-vsctl set Open_vSwitch $ovstbl other_config={"local_ip"="$1"}
19 ovs-vsctl list Open_vSwitch .