VLAN Manager tool
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 lines
574 B

  1. import vlanmang
  2. ##############
  3. ### Data ###
  4. ##############
  5. vlans = {
  6. 1: 'def',
  7. 5: 'vlana',
  8. 283: 'vlanb',
  9. }
  10. def rng(s, e):
  11. return list(range(s, e + 1))
  12. distributionswitch = {
  13. 1: {
  14. 'u': [ 'lag1', 20, 21 ],
  15. },
  16. 5: {
  17. 'u': rng(1,8),
  18. 't': [ 'lag1', 20, 21],
  19. },
  20. 283: {
  21. 'u': rng(9,19) + [ 22, 23 ],
  22. 't': [ 'lag1' ]
  23. },
  24. }
  25. settings = [
  26. ('somesettingtrue', True),
  27. ('annumberset', 42),
  28. ('nochange', 100),
  29. ]
  30. distswitch = vlanmang.SwitchConfig('192.168.0.58', { 'getmanybroken': False, 'community': 'private' }, distributionswitch, [ 'lag2' ], settings)