Hi,
I wrote a simple func module for VLAN management.
Some examples on how this can be used:
import func.overlord.client as fc
target = "lynx.gs-infra.stone-it.local"
intf = "bond1"
print "Listing VLANs:"
print fc.Overlord(target).vlan.list()
print
print "Adding VLAN 1999:"
print fc.Overlord(target).vlan.add(intf, 1999)
print fc.Overlord(target).vlan.list()
print
print "Removing VLAN 1999:"
print fc.Overlord(target).vlan.delete(intf, 1999)
print fc.Overlord(target).vlan.list()
Other methods I implemented are:
up(interface,vlanid)
Runs ifconfig to mark this vlan interface up
down(interface,vlanid)
Runs ifconfig to mark this vlan interface down
makeitso(configdictionary)
Takes a dictionary representing what the vlan config should look like, an
example dictionary:
{ "bond1": [4, 8, 15, 16, 23, 42] }
Kind regards,
Jasper Capel
Stone-IT
_______________________________________________
Func-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/func-list