We need to implement state management for leases
Now lease is stateless abstraction, that is not really comfortable for user.
Lease should have some lifecycle described in states like 'started', 'stopped', 'error', 'to be started' or stmh like that.
For example, now even if there is some error with resource belonging to lease, lease is ok with that, although it's not more usable.
Blueprint information
- Status:
- Complete
- Approver:
- Dina Belova
- Priority:
- Medium
- Drafter:
- Dina Belova
- Direction:
- Approved
- Assignee:
- Sylvain Bauza
- Definition:
- Approved
- Series goal:
- Accepted for 0.x.0
- Implementation:
- Implemented
- Milestone target:
- next
- Started by
- Hiroaki Kobayashi
- Completed by
- Hiroaki Kobayashi
Related branches
Related bugs
Bug #1274520: Lease is ok even if resource in belonging reservation is in error state | Fix Released |
Sprints
Whiteboard
History:
I suppose we may provide that feature in 0.2
Proposal here for statuses is to do like Heat (and Nova) and decouple actions and statuses like for Leases :
ACTIONS = (CREATE, DELETE, UPDATE, DELETE, START, STOP)
STATUSES = (IN_PROGRESS, FAILED, COMPLETE)
So, for instance:
- START/FAILED : the lease tried to start but an Exception occurred.
- START/COMPLETE : the lease is currently running
- STOP/COMPLETE : the lease has ended
CRUD actions with IN_PROGRESS status should be transient, if everything is fine, all leases waiting to be honored would be CREATE/COMPLETE
Gerrit topic: https:/
Addressed by: https:/
Create Statuses objects for Leases