Changeset 9d40cc9 for starbed_plugin/topdltok.py
- Timestamp:
- Aug 26, 2012 1:04:57 PM (12 years ago)
- Branches:
- master
- Children:
- 2f45140
- Parents:
- d070d9f (diff), eb117fe (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
starbed_plugin/topdltok.py
reb117fe r9d40cc9 1 1 #!/usr/bin/python 2 import federation.topdl as topdl 2 #import federation.topdl as topdl 3 from deter import topdl 3 4 4 5 # convert dotted quad netmask to CIDR / notation (i.e., 255.255.255.0 -> 24) … … 60 61 ospfd = "/etc/quagga/ospfd.conf" 61 62 for elt in topo.elements: 62 if isinstance(elt, topdl.Computer) :63 if isinstance(elt, topdl.Computer) and (not elt.get_attribute('portal') or elt.get_attribute('portal') == 'false'): 63 64 name = str(elt.name) 64 65 nodedef = nodedef + 'nodeclass %sclass {\nmethod "thru"\npartition 1\nostype "FreeBSD"\n' % name … … 104 105 for sub in topo.substrates: 105 106 sname = str(sub.name) 107 sname = sname.replace('-','') 106 108 laninst = laninst + "netset %s class %s num 1\n" % (sname,lanclass) 107 109 laninst += "%s[0].ipaddrrange = \"192.168.33.0/24\"\n" % (sname)
Note: See TracChangeset
for help on using the changeset viewer.