Ignore:
Timestamp:
Jul 12, 2012 5:48:44 PM (12 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, master
Children:
87b1a06
Parents:
4708875
Message:

Add support for nat_portal parameter. Remove old half-assed active
endpoints

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/emulab_access.py

    r4708875 r4ffa6f8  
    9090        self.portal_startcommand = config.get("access", "portal_startcommand")
    9191        self.node_startcommand = config.get("access", "node_startcommand")
     92        self.nat_portal = config.get("access", "nat_portal")
    9293
    9394        self.uri = 'https://%s:%d' % (socket.getfqdn(),
     
    552553                    k = p.get('key', None)
    553554                    surl = p.get('store', None)
    554                     if surl and k and k.index('/') != -1:
    555                         value = "%s.%s.%s%s" % \
     555                    if surl :
     556                        if self.nat_portal:
     557                            value = self.nat_portal
     558                        elif k and k.index('/') != -1:
     559                            value = "%s.%s.%s%s" % \
    556560                                (k[k.index('/')+1:], ename, proj, self.domain)
    557                         req = { 'name': k, 'value': value }
     561                        else:
     562                            self.log.error("Bad export request: %s" % p)
     563                            continue
    558564                        self.log.debug("Setting %s to %s on %s" % \
    559565                                (k, value, surl))
     566                        req = { 'name': k, 'value': value }
    560567                        self.call_SetValue(surl, req, cf)
    561568                    else:
Note: See TracChangeset for help on using the changeset viewer.