Chapter 35. Service Objects

We saw in Chapter 26 that provisioning operations always include a request object, and a task object that links to source and destination objects.

When we provision a virtual machine from a service there are many more objects involved, because we are creating and referencing more items (creating both a service and potentially several new component VMs). When we provision from a service bundle, there will be several individual items to provision as part of the bundle. Even when we provision from a single service item, however, the objects are structured as if we were provisioning a bundle containing only one item.

In this chapter we will look at some of the objects involved in provisioning a single VM from a service catalog item. The objects are visible to us during the processing of the CatalogItemInitialization state machine.

For this example:

  • We are using CloudForms 3.2.

  • The provider is VMware.

  • The service catalog item name that we’ve ordered from is called “Web Server.”

  • The service catalog item was created to clone from a VMware template called rhel65-template.

  • The new service name is “My New Service.”

  • The resulting service contains a VM called test05.

We can use object_walker with the following @walk_association_whitelist to dump the objects:

{ 'MiqAeServiceServiceTemplateProvisionTask'  => ['source',
'MiqAeServiceServiceTemplateProvisionRequest' => ['miq_request' ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.