Ignore:
Timestamp:
Aug 27, 2012 3:02:51 AM (12 years ago)
Author:
ABDULLA ALWABEL <abdullaalwabel@…>
Branches:
master
Children:
b9ec635
Parents:
9d40cc9
Message:

Handeling ssh key properly and portal connection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • starbed_plugin/topdltok.py

    r9d40cc9 r2f45140  
    4444                self.sparenoderatio = sparenoderatio
    4545                self.gut = ""
     46                #WE handle portal configuration manually since we do it in the commander!
     47                self.portal_iip = None
     48                self.portal_substrate = None
     49        def isPortal(self):
     50                if self.portal_iip and self.portal_substrate:
     51                        return True
     52                else:
     53                        return False
     54        def getPortalInfo(self):
     55                return (self.portal_iip,self.portal_substrate)
    4656        def to_file(self,name):
    4757                f = open(name, 'w+')
     
    99109                                nodedef = nodedef + "}\n"
    100110                                nodeinst = nodeinst + "nodeset %s class %sclass num 1\n" % (name,name)
    101 
     111                        elif isinstance(elt, topdl.Computer) and elt.get_attribute('portal') == 'true':
     112                                for iface in elt.interface:
     113                                        #We need a portal! we handle outside kuma!
     114                                        if not iface.get_attribute('portal'):
     115                                                self.portal_iip = str(iface.get_attribute('ip4_address'))
     116                                                self.portal_substrate = str(iface.substrate[0])
    102117                #This should be replaced to specificlly define each LAN when required!
    103118                lanclass = "ethernet"
Note: See TracChangeset for help on using the changeset viewer.