X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fiotlab%2Fiotlabshell.py;h=f1efa73fd268425d636699dcd02632e819b63d4f;hb=2519bc206096d403aae87c1c8f4b351d4e16e444;hp=579f98b6c7bf282df4cc1b9c2da5d5fc3ffaf501;hpb=6a033b30a09b8e41ce12544b8a9618aaa94bd4e1;p=sfa.git diff --git a/sfa/iotlab/iotlabshell.py b/sfa/iotlab/iotlabshell.py index 579f98b6..f1efa73f 100644 --- a/sfa/iotlab/iotlabshell.py +++ b/sfa/iotlab/iotlabshell.py @@ -37,7 +37,7 @@ class IotlabShell(): :param config: configuration object from sfa.util.config :type config: Config object """ - self.iotlab_db = TestbedAdditionalSfaDB(config) + self.leases_db = TestbedAdditionalSfaDB(config) self.oar = OARrestapi() self.ldap = LDAPapi() self.time_format = "%Y-%m-%d %H:%M:%S" @@ -845,8 +845,8 @@ class IotlabShell(): logger.debug("IOTLAB_API \r\n \r\n \t AddLeases iotlab_ex_row %s" \ %(iotlab_ex_row)) - self.iotlab_db.testbed_session.add(iotlab_ex_row) - self.iotlab_db.testbed_session.commit() + self.leases_db.testbed_session.add(iotlab_ex_row) + self.leases_db.testbed_session.commit() logger.debug("IOTLAB_API \t AddLeases hostname_list start_time %s " \ %(start_time)) @@ -952,7 +952,7 @@ class IotlabShell(): #the same user in LDAP SA 27/07/12 job_oar_list = [] - jobs_psql_query = self.iotlab_db.testbed_session.query(LeaseTableXP).all() + jobs_psql_query = self.leases_db.testbed_session.query(LeaseTableXP).all() jobs_psql_dict = dict([(row.experiment_id, row.__dict__) for row in jobs_psql_query]) #jobs_psql_dict = jobs_psql_dict) @@ -1018,7 +1018,7 @@ class IotlabShell(): if lease_filter_dict is None: reservation_list = unfiltered_reservation_list - self.iotlab_db.update_experiments_in_additional_sfa_db(job_oar_list, jobs_psql_id_list) + self.leases_db.update_experiments_in_additional_sfa_db(job_oar_list, jobs_psql_id_list) logger.debug(" IOTLAB_API.PY \tGetLeases reservation_list %s" % (reservation_list)) @@ -1099,8 +1099,8 @@ class IotlabShell(): #""" ##new_row = FederatedToIotlab(iotlab_hrn, federated_hrn) - ##self.iotlab_db.testbed_session.add(new_row) - ##self.iotlab_db.testbed_session.commit() + ##self.leases_db.testbed_session.add(new_row) + ##self.leases_db.testbed_session.commit() #logger.debug("IOTLAB_API UpdatePerson EMPTY - DO NOTHING \r\n ") #return