- records = []
- try:
- if not self.api.auth.hierarchy.auth_exists(hrn):
- raise MissingAuthority(hrn)
- table = self.api.auth.get_auth_table(hrn)
- records = table.list()
- except MissingAuthority:
- # is this a foreign authority
- registries = Registries(self.api)
- credential = self.api.getCredential()
- for registry in registries:
- if hrn.startswith(registry) and registry not in [self.api.hrn]:
- record_list = registries[registry].list(credential, hrn)
- for record in record_list:
- records.append(record.as_dict())
- return records