Changeset 3551ae1 for fedd/federation/proxy_protogeni_segment.py
- Timestamp:
- May 28, 2010 10:12:41 AM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- 703859f
- Parents:
- 623a2c9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/proxy_protogeni_segment.py
r623a2c9 r3551ae1 139 139 140 140 def generate_portal_configs(self, parent, topo, pubkey_base, 141 secretkey_base, tmpdir, master,leid, connInfo, services, nodes):141 secretkey_base, tmpdir, leid, connInfo, services, nodes): 142 142 143 143 def conninfo_to_dict(key, info): … … 218 218 for e in [ e for e in topo.elements \ 219 219 if isinstance(e, topdl.Computer) and e.get_attribute('portal')]: 220 myname = e.name [0]220 myname = e.name 221 221 type = e.get_attribute('portal_type') 222 222 testbed = e.get_attribute('testbed') … … 243 243 244 244 cfn = "%s/%s.gw.conf" % (tmpdir, myname.lower()) 245 tunnelconfig = parent. attrs.has_key('TunnelCfg')245 tunnelconfig = parent.tunnel_config 246 246 try: 247 247 f = open(cfn, "w") … … 277 277 # dir. 278 278 print >>f, "ExperimentID: %s/%s" % (mproj, meid) 279 if testbed == master:280 print >>f, "SEERBase: True"281 279 f.close() 282 280 except EnvironmentError, e: … … 370 368 371 369 for e in [ e for e in topo.elements if isinstance(e, topdl.Computer)]: 372 vname = e.name [0]370 vname = e.name 373 371 node = nodes.get(vname, {}) 374 372 pname = node.get('hostname', None) … … 471 469 472 470 473 def __call__(self, parent, aid, user, rspec, pubkey, secretkey, master,471 def __call__(self, parent, aid, user, rspec, pubkey, secretkey, 474 472 ename, stagingdir, tmpdir, certfile, certpw, export_certfile, topo, 475 473 connInfo, services, timeout=0): … … 489 487 490 488 host = parent.staging_host 489 if not os.access(certfile, os.R_OK): 490 self.log.error("[start_segment]: Cannot read certfile: %s" % \ 491 certfile) 492 return False 491 493 ctxt = fedd_ssl_context(my_cert=certfile, password=certpw) 492 494 # Local software dir … … 599 601 connInfo) 600 602 self.generate_portal_configs(parent, topo, pubkey, secretkey, tmpdir, 601 master,ename, connInfo, services, nodes)603 ename, connInfo, services, nodes) 602 604 603 605 # Copy software to the staging machine (done after generation to copy … … 651 653 parent.state_lock.release() 652 654 653 # The startcmds for portals and standard nodes (the Master Slave654 # distinction is going away)655 gate_cmd = parent.attrs.get('SlaveConnectorStartCmd', '/bin/true')656 node_cmd = parent.attrs.get('SlaveNodeStartCmd', 'bin/true')657 658 655 # Now we have configuration to do for ProtoGENI 659 656 self.configure_nodes(topo, nodes, user, parent.staging_host, 660 parent.sshd, parent.sshd_config, gate_cmd, node_cmd, 657 parent.sshd, parent.sshd_config, parent.portal_startcommand, 658 parent.node_startcommand, 661 659 pubkey, secretkey, parent.federation_software, 662 660 parent.portal_software, stagingdir, tmpdir)
Note: See TracChangeset
for help on using the changeset viewer.