def rebootVM(id,vm):
		try:
			#Just try to reboot
			HdManager.rebootHook(vm)
			XendManager.rebootDomain(vm)
	
			XenProvisioningDispatcher.logger.info("VM named "+vm.name+" has been rebooted.")
			#Send async notification
			XmlRpcClient.sendAsyncProvisioningActionStatus(id,"SUCCESS","")
		except Exception as e:
			XenProvisioningDispatcher.logger.error(str(e))
			#Send async notification
			XmlRpcClient.sendAsyncProvisioningActionStatus(id,"FAILED",str(e))
			return
Beispiel #2
0
    def rebootVM(id, vm):
        try:
            #Just try to reboot
            HdManager.rebootHook(vm)
            XendManager.rebootDomain(vm)

            XenProvisioningDispatcher.logger.info("VM named " + vm.name +
                                                  " has been rebooted.")
            #Send async notification
            XmlRpcClient.sendAsyncProvisioningActionStatus(id, "SUCCESS", "")
        except Exception as e:
            XenProvisioningDispatcher.logger.error(str(e))
            #Send async notification
            XmlRpcClient.sendAsyncProvisioningActionStatus(
                id, "FAILED", str(e))
            return