This patch fix a bunch of errors which will arrive after we
will start use new hacking version.
Change-Id: I49721f1ba9f3f017da00212a9fdc5b87d5afaedf
Closes-Bug: #1330536
In order to have statuses for leases, we need to add some fieds in the
Lease DB model, but we also need to define some handlers for managing
lease states and persistences in DB.
The proposal here is to have an in-memory object for managing lifecycles
of various Climate concepts (here Lease) with asynchronous method for
writing back the value in DB. By default, the behaviour is synchronous
(using the autosave=True parameter) but can be set to async if needed.
Uses of these State objects can be found in unittests.
Implementation within Climate code (ie. the 'calls') will happen in a
separate commit in order to ease reviews to small chunks (this one is
still big, I know...)
Partially implements: blueprint lease-state
Change-Id: I6e8e03a73c838e8e66a76d5242816dc222cb449b