summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Kölker <jason@koelker.net>2014-03-31 23:34:14 +0000
committerGurucharan Shetty <gshetty@nicira.com>2014-04-01 08:21:50 -0700
commitd7aab66192b34473a8b12f31113ce7cf8b61b9a9 (patch)
tree075bae5bc4606193b55d8256e6782a38f5abf6d6
parenta8513c7db801f7b87d241ca6c9a1eec832668983 (diff)
downloadopenvswitch-d7aab66192b34473a8b12f31113ce7cf8b61b9a9.tar.gz
rhel: Add Patch Port support to initscripts
Allows setting up type=patch ports through sysconfig ifcfg-* files. Signed-off-by: Jason Kölker <jason@koelker.net> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Flavio Leitner <fbl@redhat.com>
-rw-r--r--AUTHORS1
-rw-r--r--rhel/README.RHEL25
-rwxr-xr-xrhel/etc_sysconfig_network-scripts_ifdown-ovs3
-rwxr-xr-xrhel/etc_sysconfig_network-scripts_ifup-ovs4
4 files changed, 33 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index 733e8ad89..7c84c2bd4 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -59,6 +59,7 @@ Isaku Yamahata yamahata@valinux.co.jp
James P. roampune@gmail.com
James Page james.page@ubuntu.com
Jarno Rajahalme jrajahalme@nicira.com
+Jason Kölker jason@koelker.net
Jean Tourrilhes jt@hpl.hp.com
Jeremy Stribling strib@nicira.com
Jesse Gross jesse@nicira.com
diff --git a/rhel/README.RHEL b/rhel/README.RHEL
index cb6ab88d5..262067425 100644
--- a/rhel/README.RHEL
+++ b/rhel/README.RHEL
@@ -25,6 +25,8 @@ assignments. The following OVS-specific variable names are supported:
* "OVSTunnel", if <name> is an OVS tunnel.
+ * "OVSPatchPort", if <name> is a patch port
+
- OVS_BRIDGE: If TYPE is anything other than "OVSBridge", set to
the name of the OVS bridge to which the port should be attached.
@@ -47,6 +49,9 @@ assignments. The following OVS-specific variable names are supported:
- OVS_TUNNEL_OPTIONS: For "OVSTunnel" interfaces, this field should be
used to specify the tunnel options like remote_ip, key, etc.
+ - OVS_PATCH_PEER: For "OVSPatchPort" devices, this field specifies
+ the patch's peer on the other bridge.
+
Note
----
@@ -182,6 +187,26 @@ OVS_BRIDGE=ovsbridge0
OVS_TUNNEL_TYPE=gre
OVS_TUNNEL_OPTIONS="options:remote_ip=A.B.C.D"
+
+Patch Ports:
+
+==> ifcfg-patch-ovs-0 <==
+DEVICE=patch-ovs-0
+ONBOOT=yes
+DEVICETYPE=ovs
+TYPE=OVSPatchPort
+OVS_BRIDGE=ovsbridge0
+OVS_PATCH_PEER=patch-ovs-1
+
+==> ifcfg-patch-ovs-1 <==
+DEVICE=patch-ovs-1
+ONBOOT=yes
+DEVICETYPE=ovs
+TYPE=OVSPatchPort
+OVS_BRIDGE=ovsbridge1
+OVS_PATCH_PEER=patch-ovs-0
+
+
Reporting Bugs
--------------
diff --git a/rhel/etc_sysconfig_network-scripts_ifdown-ovs b/rhel/etc_sysconfig_network-scripts_ifdown-ovs
index daa578659..6e96d62a2 100755
--- a/rhel/etc_sysconfig_network-scripts_ifdown-ovs
+++ b/rhel/etc_sysconfig_network-scripts_ifdown-ovs
@@ -56,6 +56,9 @@ case "$TYPE" in
retval=$?
ovs-vsctl -t ${TIMEOUT} -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE"
;;
+ OVSPatchPort)
+ ovs-vsctl -t ${TIMEOUT} -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE"
+ ;;
*)
echo $"Invalid OVS interface type $TYPE"
exit 1
diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs b/rhel/etc_sysconfig_network-scripts_ifup-ovs
index 0ee7b219d..3ad86ff1c 100755
--- a/rhel/etc_sysconfig_network-scripts_ifup-ovs
+++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs
@@ -136,6 +136,10 @@ case "$TYPE" in
ovs-vsctl -t ${TIMEOUT} -- --may-exist add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS -- set Interface "$DEVICE" type=$OVS_TUNNEL_TYPE $OVS_TUNNEL_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
${OTHERSCRIPT} ${CONFIG} ${2}
;;
+ OVSPatchPort)
+ ifup_ovs_bridge
+ ovs-vsctl -t ${TIMEOUT} -- --may-exist add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS -- set Interface "$DEVICE" type=patch options:peer="${OVS_PATCH_PEER}" ${OVS_EXTRA+-- $OVS_EXTRA}
+ ;;
*)
echo $"Invalid OVS interface type $TYPE"
exit 1