CCI-MOC / hil

Hardware Isolation Layer, formerly Hardware as a Service
Apache License 2.0
24 stars 54 forks source link

Maintenance Pool Service #891

Closed ianballou closed 6 years ago

ianballou commented 7 years ago
ianballou commented 7 years ago

Naved and I talked about some options for error checking the POST response. We suggest that even if the POST fails, the node still be taken away from the user's project and put in the maintenance pool. Then, an error will be logged for the admin to see.

We also thought it would be helpful to add a configurable for powering off the node when it gets moved into the maintenance pool. This would be for users who don't want to setup a full-fledged service but still have basic maintenance done.

As for testing, would it be appropriate to have my tests in a new file? The API test is getting rather large.

okrieg commented 7 years ago

we discussed in the HIL meeting that it would be a good idea to provide a sample service that would take the post request and do a subsequent detach_node that other's could build on.

ianballou commented 7 years ago

After some discussion with @naved001, we decided it would probably be more appropriate to add the sample service in a second pull request. One issue came up when writing the tests: running project_detach_node with maintenance enabled requires a server to POST to. As a placeholder I put a (real) dummy website that will take the POST. Since this might not be appropriate for unit tests, we can either keep the POST out of the tests or try using requests_mock. Are there any other options for the dummy POST that would be worth exploring?

ianballou commented 6 years ago

I discovered that my maintenance pool test is causing the cli.py integration test to fail somehow, which I will be investigating.

Edit: now fixed.

zenhack commented 6 years ago

Works for me, merging.