How to make an automation from a button go through approval

Ok - this has been asked before, but I haven’t seen an answer, so I shall muster my optimism and ask it again in a new way.

I have a number of working automations that I can run from a button on a VMware VM. Things like adding CPU, RAM, new Disk, extending a disk. And all these work handsomely and I’m pretty stoked with all so far … but … (and that’s a big but, I cannot lie … ) because we charge money for additional RAM, CPU & storage, we need to have these automations run through the approval process, so engineers don’t give their managers bill shock at the end of the month.

My nifty automations all seem to work by way of /ManageIQ/System/Process/Call_instance, from what I can see in the automation.log file. I don’t see an automation_request object anywhere though, and I’m a little confused about what’s really going on there. Peter McGowan’s lovely little gitbook gives me the impression that every automation task magically gets a request, so if I construct an approval policy set for automation_requests, that should be all the magic I need. But It doesn’t seem to work. Maybe I just don’t understand the approval policy/profile stuff … or maybe I do and it’s not relevant because there is no request for these automations.

Somewhere else I saw it suggested that I need to explicitly generate an automation_request via the REST API … Is that so? Or am I over thinking this …?

@mkanoor @tinaafitz Can you help out here?

Hi Stephen,

Call_instance is very useful for calling into automate, but it doesn’t create a request. It simply calls whatever you specify. Only some statemachines create requests so it depends on what you call.

Approvals are based on requests so you’ll need to create an automation_request. We’ve exposed create_automation_request in version 5.5, but the REST API has the ability to create the automation request as well.

Once you have the request created, you will be able to approve or deny it based on your criteria.
We have approvals for VM and Service provisioning. It sounds like you’ll need to create your own approval with your specific criteria.

Please let me know if you have questions.


Hi Stephen

That’s useful feedback about the gitbook, and I’ll think about how to re-word the relevant sections to clarify under what circumstances we do and don’t get a request object.

Apologies for the inaccuracy or ambiguity.