VMware Cloud Community
kmzimm
Enthusiast
Enthusiast
Jump to solution

Displaying Output from a Workflow in a Provisioned VM

I'm attempting to determine a way to show back the contents of a variable from a virtual machine entity once the machine is built, preferably in the "Machine Information" tab of Item Details. I don't seem to be able to find a way of doing this (I've tried to update the "__Notes" value, but that doesn't seem to pass back to the portal). Basically, we generate a temporary password for the end user, and we'd like to show it in the portal, rather than email it.

Can someone tell me if there is a way to display data back in the portal after provisioning is completed, outside of making the person a manager and directly viewing the properties? Alternately, is there a way to show data back by using a custom resource action?

Thanks for any ideas.

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
stvkpln
Virtuoso
Virtuoso
Jump to solution

So, the easiest way (I think) would be to update the description field of the VM.. That happens to be a property of the VM entity within the IaaS API, so what you'd be doing is running the Update a vCAC Model Entity workflow under Library -> vCloud Automation Center -> Infrastructure Administration. That workflow needs to have two specific inputs:

1) The entity: that can be acquired when the stub is being initiated as an input into the stub

2) The input properties to update.. This one gets a little bit more fun. You can do that with a very simple action / scriptable task. The task / action will have an input attribute of (for this example) password, which is the temporary password configured, and an output to a properties attribute within the workflow called (for this example) vCACModelProperties. The code block you'd use would look like this:

var p = new Properties ();

if (password) { p.put("Notes","The password for your virtual machine is: ".concat(password)); }

vCACModelProperties = p;

After that scriptable task / action outputs to the properties, you should be able to feed it into the Update workflow, and the value will appear in the item once it gets populated with the state workflow completion.

-Steve

View solution in original post

0 Kudos
2 Replies
stvkpln
Virtuoso
Virtuoso
Jump to solution

So, the easiest way (I think) would be to update the description field of the VM.. That happens to be a property of the VM entity within the IaaS API, so what you'd be doing is running the Update a vCAC Model Entity workflow under Library -> vCloud Automation Center -> Infrastructure Administration. That workflow needs to have two specific inputs:

1) The entity: that can be acquired when the stub is being initiated as an input into the stub

2) The input properties to update.. This one gets a little bit more fun. You can do that with a very simple action / scriptable task. The task / action will have an input attribute of (for this example) password, which is the temporary password configured, and an output to a properties attribute within the workflow called (for this example) vCACModelProperties. The code block you'd use would look like this:

var p = new Properties ();

if (password) { p.put("Notes","The password for your virtual machine is: ".concat(password)); }

vCACModelProperties = p;

After that scriptable task / action outputs to the properties, you should be able to feed it into the Update workflow, and the value will appear in the item once it gets populated with the state workflow completion.

-Steve
0 Kudos
kmzimm
Enthusiast
Enthusiast
Jump to solution

Thanks, that did the trick. Hopefully there's a method to allow for custom fields in the future.

0 Kudos