Chapter 30. The Service Provisioning State Machine

As might be expected, CloudForms uses a state machine to intelligently handle the workflow for provisioning a service. Although we rarely modify the service provisioning state machine, it is useful to have an understanding of its steps and the functions that it performs. This more theoretical chapter examines the state machine and discusses its role in passing into the provisioning workflow the service dialog values that the user has input.

Class and Instances

The service provisioning state machine (the ServiceProvision_Template class) controls the sequence of steps involved in provisioning the service. The ManageIQ domain contains four instances of this state machine (see Figure 30-1).

ServiceProvision_Template Class, Instances and Method
Figure 30-1. ServiceProvision_Template class, instances, and method

The ServiceProvision_Template class schema contains a number of states. Figure 30-2 shows the default instance of this state machine.

ServiceProvision_Template Class schema
Figure 30-2. ServiceProvision_Template class schema

As we can see, most of the fields are pre and post placeholders around the main provision and checkprovisioned states, to allow for optional processing if required. The configurechilddialog state (by default commented out) can be used to populate the options[:dialog] hash in the child task if ...

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.