VMware Cloud Community
PavelGudkov
Enthusiast
Enthusiast
Jump to solution

vRA 8.2 property binding for custom day 2 action

Hello all,

My goal is to get some deployment properties for using in Workflow for day 2 action such as Cloud.vSphere.Machine resourceId and deploymentId.

These properties are not available for direct binding (and it looks strange), but I set a tag with deploymentId and I try to get it.

Direct binding for primitive types works well, but I cant do it for arrays, for example for tags(array).

Anyone have any ideas how to achieve my goals?

I can query deploymentId using vm name, but it is not a very good solution from my point of view.

 

 

0 Kudos
1 Solution

Accepted Solutions
PavelGudkov
Enthusiast
Enthusiast
Jump to solution

I have found the solution. There are __metadata_resourceProperties input when Workflow is started and this input includes all context parameters.

View solution in original post

4 Replies
PavelGudkov
Enthusiast
Enthusiast
Jump to solution

I have found the solution. There are __metadata_resourceProperties input when Workflow is started and this input includes all context parameters.

frippeisking
Contributor
Contributor
Jump to solution

I'm a little stuck in this area as well.

Best would be if you could have scope access to custom properties of the VM and bind against the instanceUUID.

This would uniquily identify the VM and you could get the deploymentId of which that VM is part of in a more controlled manner.

 

My issue here is that I have also created a tag on my VM but would like to use the condition of the day2 action to control whether of not it's being displayed.

 

matchExpression:
  - and:
      - key: '${properties.tags}'
        operator: in
        value: day2:action1

 

tags is an Array and that is what you can "copy property path" to clipboard on.

VM schema - tags

Not sure how to use conditions to match my tag "day2:action1" tag...

 

0 Kudos
marcethz
Enthusiast
Enthusiast
Jump to solution

Thanks ! This saved me a few REST calls 🙂

0 Kudos
PavelGudkov
Enthusiast
Enthusiast
Jump to solution

It works this way:

matchExpression:
  - and:
      - key: properties.tags
        operator: hasAny
        value:
          matchExpression:
            - and:
                - key: key
                  operator: eq
                  value: day2
                - key: value
                  operator: eq
                  value: action1

 

https://docs.vmware.com/en/vRealize-Automation/8.3/Using-and-Managing-Cloud-Assembly/GUID-964816D8-D...