There was missing relation in Reservation model.
Change-Id: I6efe558278297aea6d2348b347152c244b3323d6
Fixes: bug 1185325
delta = Column(Integer)
expire = Column(DateTime, nullable=False)
+ usage = relationship(
+ "QuotaUsage",
+ foreign_keys=usage_id,
+ primaryjoin='and_(Reservation.usage_id == QuotaUsage.id,'
+ 'QuotaUsage.deleted == 0)')
+
class Snapshot(BASE, CinderBase):
"""Represents a block storage device that can be attached to a VM."""
self.assertEqual(expected, db.quota_usage_get_all_by_project(
self.ctxt, 'project1'))
- @test.testtools.skip("bug 1185325")
def test_reservation_expire(self):
self.values['expire'] = datetime.utcnow() + timedelta(days=1)
reservations = _quota_reserve(self.ctxt, 'project1')