diff options
author | Edouard Bourguignon <madko@linuxed.net> | 2013-10-14 07:25:25 -0700 |
---|---|---|
committer | Gurucharan Shetty <gshetty@nicira.com> | 2013-10-14 08:15:56 -0700 |
commit | 7b75828bf5654c494a53fa57be90713c625085e2 (patch) | |
tree | 0aa4f0b1f3365763db7b48e540101b7660fe7865 | |
parent | 690efec27ba170cf1bb5bbdd28e9d354c049829a (diff) | |
download | openvswitch-7b75828bf5654c494a53fa57be90713c625085e2.tar.gz |
rhel: Option to create tunnel through ifcfg scripts.
Signed-off-by: Edouard Bourguignon <madko@linuxed.net>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | rhel/README.RHEL | 19 | ||||
-rwxr-xr-x | rhel/etc_sysconfig_network-scripts_ifdown-ovs | 2 | ||||
-rwxr-xr-x | rhel/etc_sysconfig_network-scripts_ifup-ovs | 5 |
4 files changed, 26 insertions, 1 deletions
@@ -31,6 +31,7 @@ Devendra Naga devendra.aaru@gmail.com Dominic Curran dominic.curran@citrix.com Duffie Cooley dcooley@nicira.com Ed Maste emaste at freebsd.org +Edouard Bourguignon madko@linuxed.net Edward Tomasz NapieraĆa trasz@freebsd.org Ethan Jackson ethan@nicira.com Flavio Leitner fbl@redhat.com diff --git a/rhel/README.RHEL b/rhel/README.RHEL index ba2774a66..435772f74 100644 --- a/rhel/README.RHEL +++ b/rhel/README.RHEL @@ -23,6 +23,8 @@ assignments. The following OVS-specific variable names are supported: * "OVSBond", if <name> is an OVS bond. + * "OVSTunnel", if <name> is an OVS tunnel. + - OVS_BRIDGE: If TYPE is anything other than "OVSBridge", set to the name of the OVS bridge to which the port should be attached. @@ -39,6 +41,12 @@ assignments. The following OVS-specific variable names are supported: - BOND_IFACES: For "OVSBond" interfaces, a list of physical interfaces to bond together. + - OVS_TUNNEL_TYPE: For "OVSTunnel" interfaces, the type of the tunnel. + For example, "gre", "vxlan", etc. + + - OVS_TUNNEL_OPTIONS: For "OVSTunnel" interfaces, this field should be + used to specify the tunnel options like remote_ip, key, etc. + Note ---- @@ -125,6 +133,17 @@ DEVICE=gige-* ONBOOT=yes HOTPLUG=no +An Open vSwitch Tunnel: + +==> ifcfg-gre0 <== +DEVICE=ovs-gre0 +ONBOOT=yes +DEVICETYPE=ovs +TYPE=OVSTunnel +OVS_BRIDGE=ovsbridge0 +OVS_TUNNEL_TYPE=gre +OVS_TUNNEL_OPTIONS="options:remote_ip=A.B.C.D" + Reporting Bugs -------------- diff --git a/rhel/etc_sysconfig_network-scripts_ifdown-ovs b/rhel/etc_sysconfig_network-scripts_ifdown-ovs index d2a2f4bb9..8e768c8a3 100755 --- a/rhel/etc_sysconfig_network-scripts_ifdown-ovs +++ b/rhel/etc_sysconfig_network-scripts_ifdown-ovs @@ -42,7 +42,7 @@ case "$TYPE" in retval=$? ovs-vsctl -t ${TIMEOUT} -- --if-exists del-br "$DEVICE" ;; - OVSPort|OVSIntPort|OVSBond) + OVSPort|OVSIntPort|OVSBond|OVSTunnel) ${OTHERSCRIPT} ${CONFIG} $2 retval=$? ovs-vsctl -t ${TIMEOUT} -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs b/rhel/etc_sysconfig_network-scripts_ifup-ovs index 8904c59b9..017346d4c 100755 --- a/rhel/etc_sysconfig_network-scripts_ifup-ovs +++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs @@ -117,6 +117,11 @@ case "$TYPE" in ${OTHERSCRIPT} ${CONFIG} ${2} OVSINTF=${DEVICE} /sbin/ifup "$OVS_BRIDGE" ;; + OVSTunnel) + ifup_ovs_bridge + 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} + ;; *) echo $"Invalid OVS interface type $TYPE" exit 1 |