|
- import vlanmang
-
- ##############
- ### Data ###
- ##############
- vlans = {
- 1: 'def',
- 5: 'vlana',
- 283: 'vlanb',
- }
-
- def rng(s, e):
- return list(range(s, e + 1))
-
- distributionswitch = {
- 1: {
- 'u': [ 'lag1', 20, 21 ],
- },
- 5: {
- 'u': rng(1,8),
- 't': [ 'lag1', 20, 21],
- },
- 283: {
- 'u': rng(9,19) + [ 22, 23 ],
- 't': [ 'lag1' ]
- },
- }
-
- settings = [
- ('somesettingtrue', True),
- ('annumberset', 42),
- ('nochange', 100),
- ]
- distswitch = vlanmang.SwitchConfig('192.168.0.58', { 'getmanybroken': False, 'community': 'private' }, distributionswitch, [ 'lag2' ], settings)
|