Log automation method on request page


#1

Hi all,

I’ve added a button to call a custom automation method to modify the number of vCPU on existing VM.
When the button is clicked, the method is called and it works.
The question is: Is it possible to log this request in the Requests page (miq_request/show_list) ?

Thanks
Marione


#2

Hi Marione

When you call an automation instance directly from a button the method is run immediately as a task, rather than having to go through the request and approval stage. As there is no request associated with the task, you don’t see an entry in the Requests page in the WebUI.

You could re-write your button method to launch a $evm.execute('create_automation_request',...) call to then run the method to modify the number of CPUs. It’s slightly more long-winded, but you would get a request created.

Hope this helps,
pemcg


#3

Hi Peter,

thanks for your answer and for your great book.
I re-wrote my button method following your suggestion and the automation request is logged now.
The request is an automation request and is logged into the “automation tab” request page. Do you know if is there any way to make the automation request log into the “service tab” request page ? This because I’d like to centralize all requests (provisioning, service and automation) in one place only.

Thanks
Marione