Changeset 027b87b


Ignore:
Timestamp:
Nov 30, 2010 10:25:47 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master
Children:
78f2668
Parents:
725c55d
Message:

This little class added a useless complexity. While I'm in here I removed it.

Location:
fedd/federation
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/access.py

    r725c55d r027b87b  
    1616from util import *
    1717from allocate_project import allocate_project_local, allocate_project_remote
    18 from access_project import access_project
    1918from fedid import fedid, generate_fedid
    2019from authorizer import authorizer
  • fedd/federation/deter_internal_access.py

    r725c55d r027b87b  
    1414from util import *
    1515from allocate_project import allocate_project_local, allocate_project_remote
    16 from access_project import access_project
    1716from fedid import fedid, generate_fedid
    1817from authorizer import authorizer
  • fedd/federation/dragon_access.py

    r725c55d r027b87b  
    1515from util import *
    1616from allocate_project import allocate_project_local, allocate_project_remote
    17 from access_project import access_project
    1817from fedid import fedid, generate_fedid
    1918from authorizer import authorizer
  • fedd/federation/emulab_access.py

    r725c55d r027b87b  
    1919from util import *
    2020from allocate_project import allocate_project_local, allocate_project_remote
    21 from access_project import access_project
    2221from fedid import fedid, generate_fedid
    2322from authorizer import authorizer, abac_authorizer
     
    208207    def make_access_project(str):
    209208        """
    210         Convert a string of the form (id[:resources:resouces], id, id) into an
    211         access_project.  This is called by read_access to convert to local
    212         attributes.  It returns a tuple of the form (project, user, user) where
    213         users may be names or fedids.
     209        Convert a string of the form (id[:resources:resouces], id, id) into a
     210        tuple of the form (project, user, user) where users may be names or
     211        fedids.  The resources strings are obsolete and ignored.
    214212        """
    215213        def parse_name(n):
     
    227225                del first[0]
    228226                first[0] = fedid(hexstr=first[0])
    229             names[0] = access_project(first[0], first[1:])
     227            names[0] = first[0]
    230228
    231229            for i in range(1,2):
     
    249247            # The slice takes the parens off the string.
    250248            proj, user = str[1:-1].split(',')
    251             return (access_project(proj.strip(), []),
    252                     user.strip(), user.strip())
     249            return (proj.strip(), user.strip(), user.strip())
    253250        else:
    254251            raise self.parse_error(
     
    270267        """
    271268        # Return values
    272         rp = access_project(None, ())
     269        rp = None
    273270        ru = None
    274271        # This maps a valid user to the Emulab projects and users to use
     
    285282        dyn_service_user = False
    286283
    287         if found[0].name == "<same>":
     284        if found[0] == "<same>":
    288285            if project != None:
    289                 rp.name = project
     286                rp = project
    290287            else :
    291288                raise service_error(\
    292289                        service_error.server_config,
    293290                        "Project matched <same> when no project given")
    294         elif found[0].name == "<dynamic>":
    295             rp.name = None
     291        elif found[0] == "<dynamic>":
     292            rp = None
    296293            dyn_proj = True
    297294        else:
    298             rp.name = found[0].name
    299         rp.node_types = found[0].node_types;
     295            rp = found[0]
    300296
    301297        if found[1] == "<same>":
     
    503499        ap = None
    504500
    505         print "%s %s %s" % (found, dyn, owners)
    506 
    507501        # if this includes a project export request and the exported
    508502        # project is not the access project, access denied.
    509503        if 'service' in req:
    510504            ep = get_export_project(req['service'])
    511             if ep and ep != found[0].name:
     505            if ep and ep != found[0]:
    512506                raise service_error(service_error.access,
    513507                        "Cannot export %s" % ep)
    514508
    515509        if self.ssh_pubkey_file:
    516             ap = self.do_project_allocation(dyn[1], found[0].name, found[1])
     510            ap = self.do_project_allocation(dyn[1], found[0], found[1])
    517511        else:
    518512            raise service_error(service_error.internal,
  • fedd/federation/protogeni_access.py

    r725c55d r027b87b  
    1717
    1818from util import *
    19 from access_project import access_project
    2019from fedid import fedid, generate_fedid
    2120from authorizer import authorizer
Note: See TracChangeset for help on using the changeset viewer.