Signed-off-by: Brian Turek <brian.tu...@gmail.com> diff --git a/utilities/ovs-docker b/utilities/ovs-docker index 43cea54..98892b6 100755 --- a/utilities/ovs-docker +++ b/utilities/ovs-docker @@ -90,6 +90,10 @@ add_port () { MTU=`expr X"$1" : 'X[^=]*=\(.*\)'` shift ;; + --vlan=*) + TAG="tag=$(expr X"$1" : 'X[^=]*=\(.*\)')" + shift + ;; *) echo >&2 "$UTIL add-port: unknown option \"$1\"" exit 1 @@ -126,7 +130,7 @@ add_port () {
# Add one end of veth to OVS bridge. if ovs_vsctl --may-exist add-port "$BRIDGE" "${PORTNAME}_l" \ - -- set interface "${PORTNAME}_l" \ + $TAG -- set interface "${PORTNAME}_l" \ external_ids:container_id="$CONTAINER" \ external_ids:container_iface="$INTERFACE"; then :; else echo >&2 "$UTIL: Failed to add "${PORTNAME}_l" port to bridge $BRIDGE" @@ -224,15 +228,15 @@ usage: ${UTIL} COMMAND Commands: add-port BRIDGE INTERFACE CONTAINER [--ipaddress="ADDRESS"] [--gateway=GATEWAY] [--macaddress="MACADDRESS"] - [--mtu=MTU] + [--mtu=MTU] [--vlan=VLAN] Adds INTERFACE inside CONTAINER and connects it as a port in Open vSwitch BRIDGE. Optionally, sets ADDRESS on INTERFACE. ADDRESS can include a '/' to represent network - prefix length. Optionally, sets a GATEWAY, MACADDRESS - and MTU. e.g.: + prefix length. Optionally, sets a GATEWAY, MACADDRESS, + MTU, and VLAN. e.g.: ${UTIL} add-port br-int eth1 c474a0e2830e --ipaddress=192.168.1.2/24 --gateway=192.168.1.1 - --macaddress="a2:c3:0d:49:7f:f8" --mtu=1450 + --macaddress="a2:c3:0d:49:7f:f8" --mtu=1450 --vlan=10 del-port BRIDGE INTERFACE CONTAINER Deletes INTERFACE inside CONTAINER and removes its connection to Open vSwitch BRIDGE. e.g.: _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev