Ignore:
Timestamp:
Aug 26, 2012 1:04:18 PM (12 years ago)
Author:
ABDULLA ALWABEL <abdullaalwabel@…>
Branches:
master
Children:
9d40cc9
Parents:
794325b
Message:

Finalize cleaning!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • starbed_plugin/topdltok.py

    r794325b rd070d9f  
    11#!/usr/bin/python
    2 import federation.topdl as topdl
     2#import federation.topdl as topdl
     3from deter import topdl
    34
    45# convert dotted quad netmask to CIDR / notation (i.e., 255.255.255.0 -> 24)
     
    6061                ospfd = "/etc/quagga/ospfd.conf"
    6162                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'):
    6364                                name = str(elt.name)
    6465                                nodedef = nodedef + 'nodeclass %sclass {\nmethod "thru"\npartition 1\nostype "FreeBSD"\n' % name
     
    104105                for sub in topo.substrates:
    105106                        sname = str(sub.name)
     107                        sname = sname.replace('-','')
    106108                        laninst = laninst + "netset %s class %s num 1\n" % (sname,lanclass)
    107109                        laninst += "%s[0].ipaddrrange = \"192.168.33.0/24\"\n" % (sname)
Note: See TracChangeset for help on using the changeset viewer.