Merge "Fix the unbind_port method in libexec of ovs."
This commit is contained in:
commit
a70743317f
@ -19,11 +19,19 @@ bind_port() {
|
|||||||
sudo ovs-vsctl add-port $INT_BRIDGE $2
|
sudo ovs-vsctl add-port $INT_BRIDGE $2
|
||||||
sudo ovs-vsctl set interface $2 external_ids:attached-mac=$mac \
|
sudo ovs-vsctl set interface $2 external_ids:attached-mac=$mac \
|
||||||
external_ids:iface-id=$1 external_ids:vm-id=$3 \
|
external_ids:iface-id=$1 external_ids:vm-id=$3 \
|
||||||
external_ids:iface-status=active
|
external_ids:iface-status=active external_ids:owner=kuryr
|
||||||
}
|
}
|
||||||
|
|
||||||
unbind_port() {
|
unbind_port() {
|
||||||
echo "unplugging veth $1..."
|
echo "unplugging veth $1..."
|
||||||
|
PORT=`sudo ovs-vsctl --data=bare --no-heading --columns=name \
|
||||||
|
find interface external_ids:iface-id=$1 \
|
||||||
|
external_ids:owner=kuryr`
|
||||||
|
if [ -z "$PORT" ]; then
|
||||||
|
echo >&2 "Failed to find port $1."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sudo ovs-vsctl del-port $INT_BRIDGE $PORT
|
||||||
}
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
Loading…
Reference in New Issue
Block a user