From: Sandrine Avakian Date: Thu, 17 Oct 2013 13:34:35 +0000 (+0200) Subject: Fixing mistake in db name. X-Git-Tag: sfa-3.0-2-bonfire-r1-0~16 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=0e7a41f8f081d452afeb9fb05740ca27452fceb6 Fixing mistake in db name. --- diff --git a/sfa/iotlab/iotlabpostgres.py b/sfa/iotlab/iotlabpostgres.py index d454cbf7..34b26624 100644 --- a/sfa/iotlab/iotlabpostgres.py +++ b/sfa/iotlab/iotlabpostgres.py @@ -23,19 +23,19 @@ slice_table = {'record_id_user': 'integer PRIMARY KEY references X ON DELETE \ 'record_id_slice': 'integer', 'slice_hrn': 'text NOT NULL'} #Dict with all the specific iotlab tables -# tablenames_dict = {'testbed_xp': slice_table} +# tablenames_dict = {'lease_table': slice_table} TestbedBase = declarative_base() -class TestbedXP (TestbedBase): +class LeaseTableXP (TestbedBase): """ SQL alchemy class to manipulate the rows of the slice_iotlab table in lease_table database. Handles the records representation and creates the table if it does not exist yet. """ - __tablename__ = 'testbed_xp' + __tablename__ = 'lease_table' slice_hrn = Column(String) experiment_id = Column(Integer, primary_key=True) @@ -56,7 +56,7 @@ class TestbedXP (TestbedBase): """Prints the SQLAlchemy record to the format defined by the function. """ - result = " 0: - self.testbed_session.query(TestbedXP).filter(TestbedXP.job_id.in_(deleted_experiments)).delete(synchronize_session='fetch') + self.testbed_session.query(LeaseTableXP).filter(LeaseTableXP.job_id.in_(deleted_experiments)).delete(synchronize_session='fetch') self.testbed_session.commit() return