3
CONF_FILE=/etc/xapi.d/plugins/ovs_quantum_plugin.ini
5
if [ ! -d /etc/xapi.d/plugins ]; then
6
echo "Am I on a xenserver? I can't find the plugins directory!"
10
# Make sure we have mysql-python
11
rpm -qa | grep MySQL-python >/dev/null 2>&1
13
echo "MySQL-python not found"
14
echo "Please enable the centos repositories and install mysql-python:"
15
echo "yum --enablerepo=base -y install MySQL-python"
19
cp ovs_quantum_agent.py /etc/xapi.d/plugins
20
cp ovs_quantum_plugin.ini /etc/xapi.d/plugins
21
cp set_external_ids.sh /etc/xapi.d/plugins
23
xe network-list name-label="integration-bridge" | grep xapi >/dev/null 2>&1
25
echo "No integration bridge found. Creating."
26
xe network-create name-label="integration-bridge"
29
BR=$(xe network-list name-label="integration-bridge" | grep "bridge.*:" | awk '{print $4}')
30
CONF_BR=$(grep integration-bridge ${CONF_FILE} | cut -d= -f2)
31
if [ "X$BR" != "X$CONF_BR" ]; then
32
echo "Integration bridge doesn't match configuration file; fixing."
33
sed -i -e "s/^integration-bridge =.*$/integration-bridge = ${BR}/g" $CONF_FILE
36
echo "Using integration bridge: $BR (make sure this is set in the nova configuration)"
38
echo "Make sure to edit: $CONF_FILE"