Chapter 26. Virtual Machine Provisioning Objects
When we write our own automation scripts to interact with the virtual machine provisioning workflow, we need to know how to locate the useful service model objects that are involved in the process. We might, for example, wish to determine the virtual machine operating system being provisioned, so that we can decide whether or not to register the new VM with a Red Hat Satellite server. Our experience up to now tells us that this is likely to be a service model attribute, but which one?
This chapter will examine the main service model objects that are involved in the virtual machine provisioning workflow, and how and why we access them.
Object Overview
There are several service model objects involved in the virtual machine or instance provisioning process, but we generally only work with four of them when we write our own Automate methods to interact with the provisioning workflow (see Figure 26-1).
The Provision Request Object
We’ve discussed the provision request object in detail already. It is the object that contains all of the information relating to the virtual machine provisioning request.
Request Context
When working at the request stage of the provisioning process (i.e., prior to approval), we can access the provision request object directly from our workspace:
$evm
.
root
[
'miq_provision_request' ...
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.