Changeset 5fffd82 for fedd/federation


Ignore:
Timestamp:
Dec 1, 2008 10:21:28 PM (16 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
Children:
5a6b75b
Parents:
77a7634
Message:

Call access control routines locally rather than trying to remotely access this
process. Currently calling a remote service on ourselves seems to tangle the
threading up in knots. This should remove that problem.

Location:
fedd/federation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/deter_impl.py

    r77a7634 r5fffd82  
    5252                self.experiment = \
    5353                        experiment_control_local(config, self.auth)
     54                # Tell the experiment control where local access control is and
     55                # what testbed it pertains to.
     56                if self.access:
     57                    self.experiment.local_access[self.access.testbed] = \
     58                            self.access
     59
    5460                self.soap_services.update(self.experiment.soap_services)
    5561                self.xmlrpc_services.update(self.experiment.xmlrpc_services)
  • fedd/federation/experiment_control.py

    r77a7634 r5fffd82  
    217217        self.def_gwimage = "FBSD61-TUNNEL2";
    218218        self.def_gwtype = "pc";
     219        self.local_access = { }
    219220
    220221        if auth:
     
    945946
    946947            try:
    947                 r = self.call_RequestAccess(uri, req,
    948                         self.cert_file, self.cert_pwd, self.trusted_certs)
     948                if self.local_access.has_key(uri):
     949                    # Local access call
     950                    req = { 'RequestAccessRequestBody' : req }
     951                    r = self.local_access[uri].RequestAccess(req,
     952                            fedid(file=self.cert_file))
     953                    r = { 'RequestAccessResponseBody' : r }
     954                else:
     955                    r = self.call_RequestAccess(uri, req,
     956                            self.cert_file, self.cert_pwd, self.trusted_certs)
    949957            except service_error, e:
    950958                if e.code == service_error.access:
     
    10041012                    "Unknown testbed: %s" % tb)
    10051013
    1006         resp = self.call_ReleaseAccess(uri, {'allocID': aid},
    1007                 self.cert_file, self.cert_pwd, self.trusted_certs)
     1014        if self.local_access.has_key(uri):
     1015            resp = self.local_access[uri].ReleaseAccess(\
     1016                    { 'ReleaseAccessRequestBody' : {'allocID': aid},},
     1017                    fedid(file=self.cert_file))
     1018            resp = { 'ReleaseAccessResponseBody': resp }
     1019        else:
     1020            resp = self.call_ReleaseAccess(uri, {'allocID': aid},
     1021                    self.cert_file, self.cert_pwd, self.trusted_certs)
    10081022
    10091023        # better error coding
Note: See TracChangeset for help on using the changeset viewer.