We need to implement state management for leases

Registered by Dina Belova

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:
milestone icon next
Started by
Hiroaki Kobayashi
Completed by
Hiroaki Kobayashi

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://review.openstack.org/#q,topic:bp/lease-state,n,z

Addressed by: https://review.openstack.org/90755
    Create Statuses objects for Leases

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.