logger.debug("IOTLABDRIVER \r\n \r\n \t AddLeases iotlab_ex_row %s" \
%(iotlab_ex_row))
- self.iotlab_db.iotlab_dbsession.add(iotlab_ex_row)
- self.iotlab_db.iotlab_dbsession.commit()
+ self.iotlab_db.iotlab_session.add(iotlab_ex_row)
+ self.iotlab_db.iotlab_session.commit()
logger.debug("IOTLABDRIVER \t AddLeases hostname_list start_time %s " \
%(start_time))
deleted_jobs = set_jobs_psql.difference(kept_jobs)
deleted_jobs = list(deleted_jobs)
if len(deleted_jobs) > 0:
- self.iotlab_db.iotlab_dbsession.query(IotlabXP).filter(IotlabXP.job_id.in_(deleted_jobs)).delete(synchronize_session='fetch')
- self.iotlab_db.iotlab_dbsession.commit()
+ self.iotlab_db.iotlab_session.query(IotlabXP).filter(IotlabXP.job_id.in_(deleted_jobs)).delete(synchronize_session='fetch')
+ self.iotlab_db.iotlab_session.commit()
return
#the same user in LDAP SA 27/07/12
job_oar_list = []
- jobs_psql_query = self.iotlab_db.iotlab_dbsession.query(IotlabXP).all()
+ jobs_psql_query = self.iotlab_db.iotlab_session.query(IotlabXP).all()
jobs_psql_dict = dict([(row.job_id, row.__dict__ ) for row in jobs_psql_query ])
#jobs_psql_dict = jobs_psql_dict)
logger.debug("IOTLABDRIVER \tGetLeases jobs_psql_dict %s"\
#"""
##new_row = FederatedToIotlab(iotlab_hrn, federated_hrn)
- ##self.iotlab_db.iotlab_dbsession.add(new_row)
- ##self.iotlab_db.iotlab_dbsession.commit()
+ ##self.iotlab_db.iotlab_session.add(new_row)
+ ##self.iotlab_db.iotlab_session.commit()
#logger.debug("IOTLABDRIVER UpdatePerson EMPTY - DO NOTHING \r\n ")
#return
(config.SFA_DB_USER, config.SFA_DB_PASSWORD, config.SFA_DB_HOST, \
config.SFA_DB_PORT, IotlabDB._dbname)
- print "URL", tcp_url , unix_url
for url in [ unix_url, tcp_url ] :
try:
self.iotlab_engine = create_engine (url, echo_pool =
if self.iotlab_session is None:
Session = sessionmaker()
self.iotlab_session = Session(bind = self.iotlab_engine)
- print "\r\n \r\n \r\n OOOOOOOOOHHHHHHHHH YEEEEEEEEEEEEEAH"
return self.iotlab_session
def close_session(self):