Chapter 39. Service Tips and Tricks

There are three useful tips and tricks to be aware of when developing services, and we’ll discuss them here.

Test Virtual Machine Provisioning First

Before developing a service catalog item to provision a virtual machine, test that an interactive provision (Infrastructure → Virtual Machines → Lifecycle → Provision VMs) from the same virtual machine template, using the same virtual machine settings, works successfully.

This should include the same placement type (auto or manually selected), and the same CPU count and memory size ranges that will be offered from the service dialog.

Troubleshooting a failing interactive VM provision is simpler than troubleshooting a failing service order.

Re-create the Service Item if the Template Changes

If any changes are made to the template that would result in a new internal template ID, then the service catalog item must be re-created (even if the new template has the same name as the old). The new template will be represented by a new object in the VMDB, so the service provision request template will need to be re-created with the new template ID.

Custom State Machines

There are times when an out-of-the-box service provision state machine does not provide the flexibility that we need to create the service that we require. An example of this would be wishing to present a service dialog offering a drop-down list prompting for the number of virtual machines to provision as part of the order from the catalog ...

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.