from sfa.trust.trustedroots import TrustedRoots
config = Config()
+interface_hrn = config.SFA_INTERFACE_HRN
TrustedR = TrustedRoots(Config.get_trustedroots_dir(config))
AuthHierarchy = Hierarchy()
table = SfaTable()
node_record['date_created'] = int(time.mktime(extime.timetuple()))
existing_records = table.find({'hrn': hrn, 'type': 'node', 'pointer': node['node_id']})
if not existing_records:
- print>>sys.stderr, " \r\n \t slab-import : node record %s inserted" %(node_record )
+ print>>sys.stderr, " \r\n \t slab-import : node record %s inserted" %(node['node_id'])
table.insert(node_record)
else:
existing_record = existing_records[0]
table.remove(record)
def hostname_to_hrn(root_auth,login_base,hostname):
- return PlXrn(auth=auth,hostname=login_base+'_'+hostname).get_hrn()
+ return PlXrn(auth=root_auth,hostname=login_base+'_'+hostname).get_hrn()
def main():