record_filepath = args[0]
rec_file = self.get_record_file(record_filepath)
record = load_record_from_file(rec_file).as_dict()
- print record
return self.registry.register(auth_cred, record)
# update named registry entry
else:
hrn, type = urn_to_hrn(xrn)
- api.logger.info("Getting credential for " + xrn)
# Is this a root or sub authority
auth_hrn = api.auth.get_authority(hrn)
if not auth_hrn or hrn == api.config.SFA_INTERFACE_HRN:
from sfa.util.debug import log
from sfa.trust.credential import Credential
-from sfa.util.sfalogging import logger
class get_credential(Method):
"""
rl = RightList()
type = record['type']
- logger.info("caller_hrn = " + caller_hrn + " type = " + type)
if type=="slice":
researchers = record.get("researcher", [])
elif type == "authority":
pis = record.get("PI", [])
operators = record.get("operator", [])
- logger.info("pis = " + str(pis) + " ops = " + str(operators))
if (caller_hrn == self.config.SFA_INTERFACE_HRN):
rl.add("authority")
rl.add("sa")