Ignore:
Timestamp:
May 28, 2010 10:12:41 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
703859f
Parents:
623a2c9
Message:

access is looking better, but segment is a screaming mess. I'm not sure that division makes any sense at all.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/proxy_protogeni_segment.py

    r623a2c9 r3551ae1  
    139139
    140140    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):
    142142
    143143        def conninfo_to_dict(key, info):
     
    218218        for e in [ e for e in topo.elements \
    219219                if isinstance(e, topdl.Computer) and e.get_attribute('portal')]:
    220             myname = e.name[0]
     220            myname = e.name
    221221            type = e.get_attribute('portal_type')
    222222            testbed = e.get_attribute('testbed')
     
    243243
    244244            cfn = "%s/%s.gw.conf" % (tmpdir, myname.lower())
    245             tunnelconfig = parent.attrs.has_key('TunnelCfg')
     245            tunnelconfig = parent.tunnel_config
    246246            try:
    247247                f = open(cfn, "w")
     
    277277                    # dir.
    278278                    print >>f, "ExperimentID: %s/%s" % (mproj, meid)
    279                     if testbed == master:
    280                         print >>f, "SEERBase: True"
    281279                    f.close()
    282280                except EnvironmentError, e:
     
    370368
    371369        for e in [ e for e in topo.elements if isinstance(e, topdl.Computer)]:
    372             vname = e.name[0]
     370            vname = e.name
    373371            node = nodes.get(vname, {})
    374372            pname = node.get('hostname', None)
     
    471469
    472470
    473     def __call__(self, parent, aid, user, rspec, pubkey, secretkey, master,
     471    def __call__(self, parent, aid, user, rspec, pubkey, secretkey,
    474472            ename, stagingdir, tmpdir, certfile, certpw, export_certfile, topo,
    475473            connInfo, services, timeout=0):
     
    489487
    490488        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
    491493        ctxt = fedd_ssl_context(my_cert=certfile, password=certpw)
    492494        # Local software dir
     
    599601                connInfo)
    600602        self.generate_portal_configs(parent, topo, pubkey, secretkey, tmpdir,
    601                 master, ename, connInfo, services, nodes)
     603                ename, connInfo, services, nodes)
    602604
    603605        # Copy software to the staging machine (done after generation to copy
     
    651653            parent.state_lock.release()
    652654
    653         # The startcmds for portals and standard nodes (the Master Slave
    654         # distinction is going away)
    655         gate_cmd = parent.attrs.get('SlaveConnectorStartCmd', '/bin/true')
    656         node_cmd = parent.attrs.get('SlaveNodeStartCmd', 'bin/true')
    657 
    658655        # Now we have configuration to do for ProtoGENI
    659656        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,
    661659                pubkey, secretkey, parent.federation_software,
    662660                parent.portal_software, stagingdir, tmpdir)
Note: See TracChangeset for help on using the changeset viewer.