Changeset 2f45140 for starbed_plugin/topdltok.py
- Timestamp:
- Aug 27, 2012 3:02:51 AM (12 years ago)
- Branches:
- master
- Children:
- b9ec635
- Parents:
- 9d40cc9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
starbed_plugin/topdltok.py
r9d40cc9 r2f45140 44 44 self.sparenoderatio = sparenoderatio 45 45 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) 46 56 def to_file(self,name): 47 57 f = open(name, 'w+') … … 99 109 nodedef = nodedef + "}\n" 100 110 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]) 102 117 #This should be replaced to specificlly define each LAN when required! 103 118 lanclass = "ethernet"
Note: See TracChangeset
for help on using the changeset viewer.