- AuthHierarchy = self.AuthHierarchy
-
- # if auth records for this hrn dont exist, create it
- if not AuthHierarchy.auth_exists(hrn):
- trace("Import: creating top level authorites", self.logger)
- AuthHierarchy.create_auth(hrn)
-
-
- # get the auth info of the newly created root auth (parent)
- # or level1_auth if it exists
- if self.level1_auth:
- auth_info = AuthHierarchy.get_auth_info(hrn)
+ urn = hrn_to_urn(hrn, 'authority')
+ # make sure parent exists
+ parent_hrn = get_authority(hrn)
+ if not parent_hrn: