- dbsession.add (auth_record)
- dbsession.commit()
- self.logger.info("SfaImporter: imported authority (parent) %s " % auth_record)
-
-
- def create_sm_client_record(self):
- """
- Create a user record for the Slicemanager service.
- """
- hrn = self.interface_hrn + '.slicemanager'
- urn = hrn_to_urn(hrn, 'user')
- if not self.auth_hierarchy.auth_exists(urn):
- self.logger.info("SfaImporter: creating Slice Manager user")
- self.auth_hierarchy.create_auth(urn)
-
- if self.record_exists ('user',hrn): return
- auth_info = self.auth_hierarchy.get_auth_info(hrn)
- user_record = RegUser(hrn=hrn, gid=auth_info.get_gid_object(),
- authority=get_authority(hrn))
- user_record.just_created()
- dbsession.add (user_record)
- dbsession.commit()
- self.logger.info("SfaImporter: importing user (slicemanager) %s " % user_record)
-
+ global_dbsession.add(auth_record)
+ global_dbsession.commit()
+ self.logger.info(
+ "SfaImporter: imported authority (parent) %s " % auth_record)