pages

Tuesday, April 23, 2013

Using vCAC custom properties as vCO inputs

Based on the excellent blog post at vcoteam.info describing the decommission of services with vCenter Orchestrator integration, I searched for an option to deliver input values for workflows from vCAC to vCO.

A big thanks goes to my fellow Adam Bohle for providing me the essential answer :)

The "Extensibility Guide" describes different ExternalWFStubs for some states of the service lifecycle.









So this is where you can access external systems using the vCloud Automation Design Center. So the first step is to build or enhance a blueprint adding the ExternalWFStubXXX property. In my case I used the ExternalWFStubs.MachineProvisioned.







The next step is to add a new custom property "ValueToReceive" and let the user make some input (User Prompt = Yes).

So this was all from the vCAC side!

In vCO I designed a little workflow finding the virtual machine object with the vmName as IN-Parameter.















So in my case the value to receive is the vmName the user enters in the vCAC wizard. So let´s check out the vCAC Design Center workflow. First you have to "Load" the actual release of the WFStubMachineProvisioned workflow:

















Now you can double click the "Custom Code" part of the loaded workflow and add two more variables: vmName (String) and VM (VirtualMachine).






The next step is to drag a "GetMachineProperty" element next to the "Start" element and open it with a double click:











Enter the values as shown in the screen and go back to the Custom Code (Navigation on top of the workflow).

Now drag the "InvokevCOworkflow" element next to the "GetMachineProperty" element, browse for the vCO workflow we designed first and enter "vmName" as Input and "myVm" as Output:





















Now you can connect every step and you will see if there is any error. In my case I had to enter "virtualMachineId" in the VirtualMachineId field on the right upper side for the "InvokevCOworkflow" element:
















When everything is okay (no error messages) you can now press the "Load" button and give the new workflow release a description. With this step the workflow is updated.

After the configuration you can now deploy a virtual machine ("Windows XP instance" in my environment) from the enhanced blueprint and the wizard will ask for a custom property called "ValueToReceive":
















So this is the value our vCO workflow should receive. Keep in mind that this is just a functional example. You can do this with every option you want to provide ("Backup Network", "Additional Tools" etc.) to a vCO workflow.

When the machine is provisioned there should be a new workflow run with your value :)









Simple, isn´t it?

2 comments:

  1. Nice post Jason, have you tried to pass provisioning group custom properties to vCO?

    Thanks,

    Juan.

    ReplyDelete
  2. This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again.
    ibm full form in india |
    ssb ka full form |
    what is the full form of dp |
    full form of brics |
    gnm nursing full form |
    full form of bce |
    full form of php |
    bhim full form |
    nota full form in india |
    apec full form

    ReplyDelete