X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2FGetTicket.py;h=174bd4c60904fdf134290137b5ab2e80f762ea9c;hb=29df906cd2d154a3b90fcb1b7025f3fc1bb577fe;hp=f9b8c22cc14928b07fd70e51077e5eec7e970ac2;hpb=99e9f96209b9ebfd1853e7b8902a1a0fe893eaa2;p=sfa.git diff --git a/sfa/methods/GetTicket.py b/sfa/methods/GetTicket.py index f9b8c22c..174bd4c6 100644 --- a/sfa/methods/GetTicket.py +++ b/sfa/methods/GetTicket.py @@ -1,15 +1,10 @@ -### $Id: get_ticket.py 17732 2010-04-19 21:10:45Z tmack $ -### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/methods/get_ticket.py $ -import time -from sfa.util.faults import * -from sfa.util.namespace import urn_to_hrn +from sfa.util.xrn import urn_to_hrn from sfa.util.method import Method from sfa.util.parameter import Parameter, Mixed -from sfa.trust.auth import Auth -from sfa.util.config import Config -from sfa.trust.credential import Credential from sfa.util.sfatablesRuntime import run_sfatables +from sfa.trust.credential import Credential + class GetTicket(Method): """ Retrieve a ticket. This operation is currently implemented on PLC @@ -37,7 +32,7 @@ class GetTicket(Method): Parameter(type([]), "List of user information") ] - returns = Parameter(str, "String represeneation of a ticket object") + returns = Parameter(str, "String representation of a ticket object") def call(self, xrn, creds, rspec, users): hrn, type = urn_to_hrn(xrn) @@ -48,9 +43,7 @@ class GetTicket(Method): #log the call self.api.logger.info("interface: %s\tcaller-hrn: %s\ttarget-hrn: %s\tmethod-name: %s"%(self.api.interface, origin_hrn, hrn, self.name)) - manager = self.api.get_interface_manager() - - # flter rspec through sfatables + # filter rspec through sfatables if self.api.interface in ['aggregate']: chain_name = 'OUTGOING' elif self.api.interface in ['slicemgr']: @@ -58,7 +51,5 @@ class GetTicket(Method): rspec = run_sfatables(chain_name, hrn, origin_hrn, rspec) # remove nodes that are not available at this interface from the rspec - ticket = manager.get_ticket(self.api, xrn, creds, rspec, users) - - return ticket + return self.api.manager.GetTicket(self.api, xrn, creds, rspec, users)