21 lines
768 B
Django/Jinja
21 lines
768 B
Django/Jinja
#!/bin/sh
|
|
|
|
if=$(echo "$1" | sed -e 's,ifcfg-,,')
|
|
iftype=$(echo "$if" | sed -e 's,[0-9]\+$,,')
|
|
|
|
# if the interface being brought up is tap[n], create
|
|
# the tap device first
|
|
if [ "$iftype" == "tap" ]; then
|
|
tunctl -u _openqa-worker -p -t "$if"
|
|
fi
|
|
|
|
# if the interface being brough up is {{ openqa_multivm_bridge_interface }}, create
|
|
# the gre tunnels
|
|
if [ "$if" == "{{ openqa_multivm_bridge_interface }}" ]; then
|
|
ovs-vsctl set bridge {{ openqa_multivm_bridge_interface }} stp_enable=true
|
|
# This is only needed for multi-host setups
|
|
{% for w in range(1, openqa_worker_count+1) %}
|
|
#ovs-vsctl --may-exist add-port {{ openqa_multivm_bridge_interface }} gre{{ w }} -- set interface gre{{ w }} type=gre options:remote_ip=172.16.2.{{ 2 + w|int }}
|
|
{% endfor %}
|
|
fi
|