X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2FGetTicket.py;h=2223e3738d3712e6ea40d4ee097395a5bb305ac5;hb=cf630d87d633f3861e3ac8a50433fa29ca46a74e;hp=c21ce169091c40a048465ca1e8058eaf02dea0c3;hpb=89d0fa4efde57cb62445af75c16bdc42bc03693a;p=sfa.git diff --git a/sfa/methods/GetTicket.py b/sfa/methods/GetTicket.py index c21ce169..2223e373 100644 --- a/sfa/methods/GetTicket.py +++ b/sfa/methods/GetTicket.py @@ -1,10 +1,11 @@ from sfa.util.xrn import urn_to_hrn from sfa.util.method import Method -from sfa.util.parameter import Parameter, Mixed from sfa.util.sfatablesRuntime import run_sfatables from sfa.trust.credential import Credential +from sfa.storage.parameter import Parameter, Mixed + class GetTicket(Method): """ Retrieve a ticket. This operation is currently implemented on PLC @@ -29,12 +30,13 @@ class GetTicket(Method): Mixed(Parameter(str, "Credential string"), Parameter(type([str]), "List of credentials")), Parameter(str, "Resource specification (rspec)"), - Parameter(type([]), "List of user information") + Parameter(type([]), "List of user information"), + Parameter(dict, "Options") ] returns = Parameter(str, "String representation of a ticket object") - def call(self, xrn, creds, rspec, users): + def call(self, xrn, creds, rspec, users, options={}): hrn, type = urn_to_hrn(xrn) # Find the valid credentials valid_creds = self.api.auth.checkCredentials(creds, 'getticket', hrn) @@ -51,5 +53,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 - return self.api.manager.get_ticket(self.api, xrn, creds, rspec, users) + return self.api.manager.GetTicket(self.api, xrn, creds, rspec, users, options)