VMware Cloud Community
TimDScott
Enthusiast
Enthusiast
Jump to solution

Custom Resource Actions - Issue with action parameters (v8.1 Patch 2)

I'm trying to utilise a vRO workflow as a resource action in v8.1 (patch 2). The workflow has 2 inputs, first is type VC:VirtualMachine, the second is a string that's populated via a drop-down that calls an action passing in the previously selected VM. This approach is working fine when the workflow is run directly in vRO. Workflow config here:

pastedImage_0.png

I now need to get this workflow to work as a custom resource action. I'm following the logic used here to create the resource action: https://blogs.vmware.com/management/2020/08/introducing-custom-resources-and-resource-actions-in-vre...

So I've created the action to get the VC:VirtualMachine my name, tested in isolation it works fine, then I've configured my resource action:

pastedImage_1.png

When selecting a deployment the resource action appears as expected. When I run it I get:

pastedImage_2.png

So basically the action that is called to populate the protection plan dropdown is not being supplied with the selected VM, which it requires to function.

I checked out "Edit Request Parameters" for the resource action, and can see the ognl command that is failing

pastedImage_3.png

So my question is how do I get the VM to be passed into the action? I've spent quite some time looking at this and can't see anything obvious, any help would be appreciated!

Thanks!

Tim.

0 Kudos
1 Solution

Accepted Solutions
TimDScott
Enthusiast
Enthusiast
Jump to solution

Hi,

I raised a VMware support request for this, Just received this response:

"As per the update received from VMware Engineering team, In vRA8.2 it is not possible to use input fields, which have bindings, inside the input form.They are removed form the input form, because the user should not change their values. Hence you can’t use them as input of external actions.In this use case the customer is trying to use the “vm” as input of the action which populates the dropdown, but the “vm” is not part of the input form.This issue is resolved in vRA 8.3 but for now there is no workaround available."

Does anyone know when 8.3 will be available?

 

 

 

View solution in original post

0 Kudos
5 Replies
TimDScott
Enthusiast
Enthusiast
Jump to solution

I'm not sure if I explained the above well enough, so to simplify I've created a package (attached) containing a workflow and 2 actions. The workflow named "2Day" will be imported into Library/TSDev and the actions to com.tsdev.library. When the workflow is run from orchestrator and a vm is selected, the drop-down will be populated with a couple of properties of the vm.

When I configure the resource action as below:

pastedImage_1.png

I get this:

pastedImage_0.png

I'm not sure if what I need to do is even possible, so if anyone has any ideas I would be grateful!

0 Kudos
lnairn
VMware Employee
VMware Employee
Jump to solution

Hi,

I think the issue is with vCenter plugin. Maybe you can try to avoid using it in presentation? Instead of using VC:VirtualMachine in the form, use the name of the resource and calculate the VC:VirtualMachine object within the workflow... just an idea

I'll try to test your code in a vRA8.1 environment (I'm using 8.2 now) and let you know my results.

Regards,

Leandro.

0 Kudos
TimDScott
Enthusiast
Enthusiast
Jump to solution

Hi Leandro,

Thanks for getting back to me.

I've put together another workflow "2Day String" (updated package attached) to have all string inputs. Now when I configure the resource action I can't get the value of the vm field to default to the name of the selected machine.

Basically, I need the name of the selected machine to be passed into the actions that populate the other dropdowns on the form. so need a way to map ${properties.resourceName} to the vm field.

If you could try on v8.1 for me that would be great.

For reference here are screenshots of the config of each field:

pastedImage_3.png

pastedImage_5.png

Thanks,

Tim.

0 Kudos
Taylor_D
Contributor
Contributor
Jump to solution

I am also facing this kind of problem, like not same but facing some of this

please if anyone have scure for this then please help NavyArmyCCU.

Thanks in advance

0 Kudos
TimDScott
Enthusiast
Enthusiast
Jump to solution

Hi,

I raised a VMware support request for this, Just received this response:

"As per the update received from VMware Engineering team, In vRA8.2 it is not possible to use input fields, which have bindings, inside the input form.They are removed form the input form, because the user should not change their values. Hence you can’t use them as input of external actions.In this use case the customer is trying to use the “vm” as input of the action which populates the dropdown, but the “vm” is not part of the input form.This issue is resolved in vRA 8.3 but for now there is no workaround available."

Does anyone know when 8.3 will be available?

 

 

 

0 Kudos