A simple Python script to help you when generating Open vSwitch network configuration scripts

I’ve written a simple script in Python that will help you to generate network configuration scripts integrating Open vSwitch for RHEL-based Linux distributions like CentOS. Note that the Open vSwitch integration is optional but is quite useful. It helps me to remember the options  I need and I hope it’s useful to you too.

The script is hosted at my Github account.

The README.RHEL included with Open vSwitch explains how to use the optional Open vSwitch integration with RHEL network configuration scripts identifying all the attributes and values you can add to the scripts. The script comes with a wizard that creates the content for a network script that should be placed in the /etc/sysconfig/network-scripts directory. A file like the following will be generated:

DEVICE=intbr0
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSIntPort
OVS_BRIDGE=ovsbridge0
OVSBOOTPROTO="dhcp"
OVSDHCPINTERFACES="eth0"
HOTPLUG=no

Let me know about any errors, thoughts and suggestions.

Enjoy!

2 thoughts on “A simple Python script to help you when generating Open vSwitch network configuration scripts

  1. Morgan Yang says:

    This is a very informational blog. I’m wondering if have tried adding mirror ports in RH/CentOS using the ifcfg files?

    Like

    • n40lab says:

      Hi, thanks for reading my blog. I haven’t tried to use the ifcfg files but I’m working on it, visit the blog in a few days maybe I can post about this topic.

      Like

Leave a comment