+
+ # special case for vini
+ if ".vini" in interface_hrn and interface_hrn.endswith('vini'):
+ # create a fake internet2 site first
+ i2site = {'name': 'Internet2', 'abbreviated_name': 'I2',
+ 'login_base': 'internet2', 'site_id': -1}
+ site_hrn = _get_site_hrn(interface_hrn, i2site)
+ logger.info("Importing site: %s" % site_hrn)
+ # import if hrn is not in list of existing hrns or if the hrn exists
+ # but its not a site record
+ if site_hrn not in existing_hrns or \
+ (site_hrn, 'authority') not in existing_records:
+ logger.info("Import: site %s " % site_hrn)
+ urn = hrn_to_urn(site_hrn, 'authority')
+ if not sfaImporter.AuthHierarchy.auth_exists(urn):
+ sfaImporter.AuthHierarchy.create_auth(urn)
+ auth_info = sfaImporter.AuthHierarchy.get_auth_info(urn)
+ auth_record = SfaRecord(hrn=site_hrn, gid=auth_info.get_gid_object(), \
+ type="authority", pointer=site['site_id'],
+ authority=get_authority(site_hrn))
+ auth_record.sync(verbose=True)
+