Does anyone have a way of shutting down oVirt automatically in the case of a power outage?

Ideally I would like a script that can be automatically run when the UPS reaches a certain level. I had a look at the python SDK but I could only find functions for shutting down VMs and not hosts. Also I suspect this wont let me shutdown the hosted engine VM.

Any ideas?

Regards