Chapter 15. Event Processing

One of the most powerful features of CloudForms Automate is its capability to process events. CloudForms can monitor and respond to external (provider) events, such as a virtual machine starting or stopping, or a hypervisor going into maintenance. These events can then be used as triggers for Automate operations. We might wish to initiate a SmartState Analysis scan on a new VMware virtual machine when a VmCreatedEvent event is detected, for example. Perhaps we’d like to intercept and cancel a USER_INITIATED_SHUTDOWN_VM event being detected on a critical Red Hat Enterprise Virtualization (RHEV) virtual machine that we’ve tagged as do_not_shutdown.

CloudForms Automate also raises its own events internally, which can then be used as workflow triggers. We see an example of this when we provision a new virtual machine (we cover VM provisioning in Part II of the book). The workflow for provisioning a virtual machine includes an approval stage—we can optionally allow administrators to approve large VM requests—followed by a quota-checking stage to ensure that users are not exceeding their quota. The successful approval of the VM provisioning request results in Automate raising a request_approved internal event. This request_approved event is then used as the trigger to automatically start the quota-checking workflow (see Chapter 19 for more details on this workflow).

In this chapter we’ll examine in detail how events are processed by the Automation Engine. ...

Get Mastering CloudForms Automation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.