VMware Cloud Community
JohnSullivan
Contributor
Contributor

Add a Resource Action to Deployments

‌I am trying to add a custom Resource Action that will apply to any Deployment objects for "day 2" provisioning actions. I can successfully add Resource Actions to Virtual Machine objects, which is reasonably well documented. I cannot find any examples of doing the same for Deloyments objects. Does anyone know the right way to achieve this?

I am working with vRA v7.0 and the embedded vRO v7.0.1 server.

By defining a custom Resouce Mapping for the Deployment catalog resouce type, I can get my custom Resource Action to show up correctly in the Actions drop-down of the Items/Deployments page.

However, once the action is invoked, there is a problem in the vRO workflow that is the Resource Mapping workflow. I believe this is the root of my problem. My workflow has a single input parameter of the Properties. This matches the documentation for Resource Mapping and the configuration of the existing VM mapping workflows. However, vRA is apparently not setting that Properties parameter. It is null when I try to use it from a scriptable task in the workflow. The workflow run log also shows <<null>> for the Properties variable.

Does anyone happen to know of there is some other Input parameter type that is actually set when working with a Deployment?

-John

0 Kudos
5 Replies
Burke-
VMware Employee
VMware Employee

Unfortunately, this is a known bug that has been reported and is being addressed by Engineering. I'm uncertain as to whether or not a hot-patch will be available for 7.0.1, but I believe it will be resolved in the next released version of vRA.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
BenjaminBohec
Contributor
Contributor

Hi John,

I am currently working on this case for one of my customer.

I created an action in order to map deployment properties to vCACCAFE:CatalogResource object.

Input >> CatalogResourceProperties type Properties

Output >> vCACCAFE:CatalogResource

var type = 'vCACCAFE:CatalogResource';

var CatalogResourceHref = CatalogResourceProperties.get('EXTERNAL_REFERENCE_ID');

var foundCatalogResource = System.getModule("com.vmware.vcac.asd").findVcdObjectByHref(type,CatalogResourceHref) ;

if (!foundCatalogResource) {

  System.warn('No CatalogResource with href ' + CatalogResourceHref + ' were found');

}

return foundCatalogResource;

It's not working. The thing is that I can't know what property to get for a deployment ... EXTERNAL_REFERENCE_ID?

Just a question, how do you manage the debug point you provided:

It is null when I try to use it from a scriptable task in the workflow. The workflow run log also shows <<null>> for the Properties variable.

What workflow do you use in order to get expected properties?


Thnaks,

Ben.

0 Kudos
nuz1
Enthusiast
Enthusiast

Hi,

Did you have to install a plugin in VRO 7 to get the vCACCAFE:CatalogResource type? Out of the box, I cannot find that type.

thanks.

0 Kudos
BenjaminBohec
Contributor
Contributor

Hi nuz1,

I don't know, we are using vRA 7 with vRO embedded on vRA appliance. Plugin may be already installed.

I able to see that there is some package like com.vmware.library.vra.cafe that is using VCACCAFE... types.

Try this link >> VMware vRealize Orchestrator Plug-Ins Information

0 Kudos
nuz1
Enthusiast
Enthusiast

What you know....that was it! Thanks for the tip. I was using an external vRO and I didn't realize that there was a difference between the two. I see the types now.

thanks!

0 Kudos