+### $Id$
+### $URL$
+
+from geni.trust.certificate import Keypair
from geni.util.faults import *
-from geni.util.excep import *
from geni.util.method import Method
from geni.util.parameter import Parameter, Mixed
from geni.util.auth import Auth
-from geni.util.cert import Keypair
from geni.util.geniticket import *
class get_ticket(Method):
returns = Parameter(str, "String represeneation of a ticket object")
def call(self, cred, hrn, rspec):
- self.api.auth.decode_authentication(cred, "getticket")
+ self.api.auth.check(cred, "getticket")
self.api.auth.verify_object_belongs_to_me(hrn)
self.api.auth.verify_object_permission(name)
auth_info = self.api.auth.get_auth_info(auth_hrn)
record = None
table = self.api.auth.get_auth_table(auth_hrn)
- records = table.resolve('slice', hrn)
+ record = table.resolve('slice', hrn)
object_gid = record.get_gid_object()
new_ticket = Ticket(subject = object_gid.get_subject())