+ def create_interface_records(self):
+ """
+ Create a record for each SFA interface
+ """
+ # just create certs for all sfa interfaces even if they
+ # arent enabled
+ interface_hrn = self.config.SFA_INTERFACE_HRN
+ interfaces = ['authority+sa', 'authority+am', 'authority+sm']
+ table = SfaTable()
+ auth_info = self.AuthHierarchy.get_auth_info(interface_hrn)
+ pkey = auth_info.get_pkey_object()
+ for interface in interfaces:
+ interface_record = table.find({'type': interface, 'hrn': interface_hrn})
+ if not interface_record:
+ self.logger.info("Import: interface %s %s " % (interface_hrn, interface))
+ urn = hrn_to_urn(interface_hrn, interface)
+ gid = self.AuthHierarchy.create_gid(urn, create_uuid(), pkey)
+ record = SfaRecord(hrn=interface_hrn, gid=gid, type=interface, pointer=-1)
+ record['authority'] = get_authority(interface_hrn)
+ table.insert(record)