fixed up the names of new site names/slices to be more PLC compatible
[sfa.git] / sfa / methods / get_ticket.py
1 ### $Id$
2 ### $URL$
3 import time
4 from sfa.util.faults import *
5 from sfa.util.namespace import *
6 from sfa.util.method import Method
7 from sfa.util.parameter import Parameter, Mixed
8 from sfa.methods.GetTicket import GetTicket
9
10 class get_ticket(GetTicket):
11     """
12     Deprecated. Use GetTicket instead.
13
14     Retrieve a ticket. This operation is currently implemented on PLC
15     only (see SFA, engineering decisions); it is not implemented on
16     components.
17     
18     The ticket is filled in with information from the PLC database. This
19     information includes resources, and attributes such as user keys and
20     initscripts.
21     
22     @param cred credential string
23     @param name name of the slice to retrieve a ticket for (hrn or urn)
24     @param rspec resource specification dictionary
25     
26     @return the string representation of a ticket object
27     """
28
29     interfaces = ['aggregate', 'slicemgr']
30     
31     accepts = [
32         Parameter(str, "Credential string"),
33         Parameter(str, "Human readable name of slice to retrive a ticket for (hrn or urn)"),
34         Parameter(str, "Resource specification (rspec)"),
35         Mixed(Parameter(str, "Human readable name of the original caller"),
36               Parameter(None, "Origin hrn not specified"))
37         ]
38
39     returns = Parameter(str, "String represeneation of a ticket object")
40     
41     def call(self, cred, xrn, rspec, origin_hrn=None):
42         
43         return GetTicket.call(self, xrn, cred, rspec, None)