backend.InstanceShutdown: small cleanup
1) unhardcode the timeout, abstracting it in a constant 2) Use time.time() rather than hiding the timeout in a range() 3) call hyper.StopInstance multiple times -- currently all hypervisors just ignore all calls but once 4) Use hyper.ListInstances() rather than GetInstanceList([hv_name]) -- it's cheaper :) 5) Change the final message to "forcing" from "using destroy" Signed-off-by:Guido Trotter <ultrotter@google.com> Reviewed-by:
Olivier Tharan <olive@google.com>
Loading
Please register or sign in to comment