from sfa.util.method import Method
from sfa.util.parameter import Parameter, Mixed
from sfa.trust.auth import Auth
+from sfa.util.genitable import GeniTable
from sfa.util.sfaticket import SfaTicket
from sfa.util.slices import
self.api.auth.authenticateCred(cred, [cred, hrn], request_hash)
self.api.auth.check(cred, "getticket")
self.api.auth.verify_object_belongs_to_me(hrn)
- self.api.auth.verify_object_permission(name)
-
- # XXX much of this code looks like get_credential... are they so similar
- # that they should be combined?
-
- auth_hrn = self.api.auth.get_authority(hrn)
- if not auth_hrn:
- auth_hrn = hrn
- auth_info = self.api.auth.get_auth_info(auth_hrn)
- record = None
- table = self.api.auth.get_auth_table(auth_hrn)
- record = table.resolve('slice', hrn)
+ self.api.auth.verify_object_permission(hrn)
+ table = GeniTable()
+ records = table.findObjects({'hrn': hrn, 'type': 'slice'})
+ if not records:
+ raise RecordNotFound(hrn)
+ record = records
object_gid = record.get_gid_object()
new_ticket = SfaTicket(subject = object_gid.get_subject())
new_ticket.set_gid_caller(self.client_gid)
if not slivers:
raise SliverDoesNotExist(hrn)
sliver = slivers[0]
-
+
+ # get initscripts
+ initscripts = None
+ sliver['initscripts'] = initscripts
+
# get rspec info
+ # conver plc slice tags to rspec attributes
rspec = None
new_ticket.set_attributes(sliver)