Skip to content

Commit

Permalink
Merge "Fixed method db.api.reservation_expire"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Jun 2, 2013
2 parents 2b00f53 + c6cf016 commit a003e4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions cinder/db/sqlalchemy/models.py
Expand Up @@ -245,6 +245,12 @@ class Reservation(BASE, CinderBase):
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."""
Expand Down
1 change: 0 additions & 1 deletion cinder/tests/test_db_api.py
Expand Up @@ -443,7 +443,6 @@ def test_reservation_rollback(self):
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')
Expand Down

0 comments on commit a003e4a

Please sign in to comment.