reg_objects['site'] = site
slice = {}
- slice['expires'] = int(mktime(Credential(string=creds[0]).get_lifetime().timetuple()))
+ slice['expires'] = int(time.mktime(Credential(string=creds[0]).get_lifetime().timetuple()))
slice['hrn'] = hrn
slice['name'] = site['login_base'] + "_" + get_leaf(hrn)
slice['url'] = hrn
hostnames.append(node.hostname)
return hostnames
-
-
def get_version():
version = {}
version['geni_api'] = 1
+ version['sfa'] = 1
return version
def slice_status(api, slice_xrn, creds):
api.plshell.BindObjectToPeer(api.plauth, 'slice', slice['slice_id'], peer, slice['peer_slice_id'])
return 1
-def get_slices(api):
+def get_slices(api, creds):
# look in cache first
if api.cache:
slices = api.cache.get('slices')
return rspec
-def get_ticket(api, xrn, rspec, origin_hrn=None, reg_objects=None):
+def get_ticket(api, xrn, creds, rspec, users):
+
+ reg_objects = __get_registry_objects(xrn, creds, users)
slice_hrn, type = urn_to_hrn(xrn)
slices = Slices(api)
# get the slice record
registry = api.registries[api.hrn]
credential = api.getCredential()
- records = registry.resolve(credential, xrn)
+ records = registry.Resolve(xrn, credential)
# similar to create_slice, we must verify that the required records exist
# at this aggregate before we can issue a ticket