Set before_end_lease event as DONE
Now Blazar sets the before_end_lease status as DONE, when the time of the event comes and is properly processed. Change-Id: I854269d15d4f5d8727187f10c6bc26d01c5ffb12 Closes-bug: #1316982
This commit is contained in:
parent
c90faabb04
commit
acb155cbcc
@ -416,7 +416,7 @@ class ManagerService(service_utils.RPCServer):
|
||||
self._basic_action(lease_id, event_id, 'on_end', 'deleted')
|
||||
|
||||
def before_end_lease(self, lease_id, event_id):
|
||||
pass
|
||||
db_api.event_update(event_id, {'status': 'DONE'})
|
||||
|
||||
def _basic_action(self, lease_id, event_id, action_time,
|
||||
reservation_status=None):
|
||||
|
@ -1073,6 +1073,7 @@ class ServiceTestCase(tests.TestCase):
|
||||
|
||||
def test_before_end_lease(self):
|
||||
self.manager.before_end_lease(self.lease_id, '1')
|
||||
self.event_update.assert_called_once_with('1', {'status': 'DONE'})
|
||||
|
||||
def test_basic_action_no_res_status(self):
|
||||
self.patch(self.manager, 'get_lease').return_value = self.lease
|
||||
|
Loading…
Reference in New Issue
Block a user