As per our design doc for Hosts reservations [1], Climate needs to be
added three new models called ComputeHost, ComputeHostExtraCapabilities
and ComputeHostReservation
* ComputeHost will store all info concerning hosts managed by Climate
and will keep tracability on if they are free for a lease or not
* ComputeHostExtraCapabilities will allow admin user to add extra info
for each host to add to Climate like GPU or SSD which are not yet
visible thru Nova-Compute
* ComputeHostReservation will store all reservation details when
creating a lease, needed by Manager when starting the leases
Implements bp:host-db-api
[1] : https://docs.google.com/drawings/d/1-_DOB65LsSGR4JUaPN525bWAg1yhvEv3KNcHfmuLvYw/edit
Change-Id: Ib8f289064a9621372908be1d44db92f3719b24e1
As discussed, let's remove all headers for files containing no
code but the copyright headers.
Implements bp:remove-empty-copyrights
Change-Id: I276a346360e27df70093241676576995f8e298d8
Initial release of Host Reservation Admin API by adding new classes
to the current Lease API mapped to /os-hosts/ context.
The goal of this API is to be admin-only, defining CRUD methods for
adding a host to Compute, aiming to dedicate it for lease management.
As a result, the added host won't be available for booting VMs on it
unless Climate specifically picks it from a specific freepool to the
user' pcloud associated with the host reservation.
For testing, please patch RPC methods like this :
call = lambda *args, **kwargs: True
cast = lambda *args, **kwargs: True
TODO :
- Add @policy.authorize() to climate.api.oshosts.service controllers
once review 57200 (Policy mgmt) is merged
Implements bp:host-provisioning-api
Change-Id: I58d986fe8344b9578b2f15399ec19f7649cc3035
API exceptions were not returning correct errorcode.
A bug will be opened for moving these exceptions into climate.api but
for this commit, the idea is just to quickly fix it.
Change-Id: I5563c93dac45e22dc3348f5e380521cf8537b440
After we merge this patch we can use 'tox -e cover' and see how is our
code is covered with tests. It's very good for proper code process.
Change-Id: Ia39145727b0dc55879cd807e2ef4fc2de331c9a4
Implements: blueprint coverage-for-testr
- context data is stored in a dictionary now, so any key is allowed;
- list of allowed key for certain context is stored in special class
variable;
- methods "current" and "elevated" of ClimateContext class are
accessible from module level;
- moved to usage of threading.local instead of emulating one in code (as
long as we use eventlet's monkey-patching, it's specific local() will
be used).
Change-Id: I3c79c9cd0d16dfb5c61208f2aa71b5c59f3f40f3
'universal=True' means app supports py2 and py3 which isn't supported by
climate at least due to the eventlet dependency, so, my bad, it should
be reverted atm. W/o 'universal=True' wheel bdist still could be built.
This reverts commit 415a66430b3c395c8f442d89f4d4ec6d48378276
Change-Id: I074b33f1a1df87c3f3cc58b5734b6f20e364de5b
Nova filter should be removed to the separated repo.
That fixes Jenkins tests/gate jobs fails.
Fixes: bug #1254018
Change-Id: I725dd222204f159e9fe3b1ebd64292de62d62a1b
I find bug after rebase my api unit tests to the latest master. We forgot
to add 'cfg.CONF.import('opt_name', 'climate.config')
Change-Id: I6c996c738bf3b2ae0b2c6d14beed424f99db4859
fixes: bug #1252989
Without this line locks while parallel tests running won't be
working and there will be tests fails because of this.
Change-Id: I5d29441365fafd8005ac9a2088badca23bf7cb09
The following commits are in this update:
79e6bc6 fix lockutils.lock() to make it thread-safe
ace5120 Add main() to lockutils that creates temp dir for locks
537d8e2 Allow lockutils to get lock_path conf from envvar
d498c42 Fix to properly log when we release a semaphore
Change-Id: Ida26987e8841d79f3d4627d7f46ab08eb59234ec
Implement RPC service to work with plugins and DB.
Base plugin class added.
Implements: blueprint lease-manager
Change-Id: Icbed7fabef6c0673c62f67017e5e9cd8d257b5ee
One module per line is the new hotness. I've also sorted the
modules alphabetically. There are no changes to your imports, but
this makes it easier for oslo maintainers to keep your imports up
to date.
Change-Id: I6e9ae5d8b953b81014bd60cc842af33c6af58b61
Add changes in climate.api.utils The bug occured because function excecution
wasn't stop after we log an error with abort_and_log func. Fix it with adding
return statement after abort_and_log.
Fixes LP bug #1246244
Change-Id: I7351758c10163c01ed55ffe6028dac63f9d70c69
Since we have a global context storage we should use it everywhere. I
suggest we remove all this ctx args and never bring them back.
In case someone wants to run something with different context one can
always do:
with my_other_context:
run_method_without_ctx_in_args()
Change-Id: I976726f59cedd79f1d619f35f570c60e2c701c7d