Czernobog
Expert
Expert

vRA 8 - Extensibility and VM Properties

Jump to solution

Is there any in-depth documentation on how to pass properties to vRO, when an Event is triggered. The very poor official documentation:

Writing Workflow and Action Code for vRealize Automation Cloud Assembly

just says to pass the payload to vRO, like you do with vRA 7. However no payload object of the Property type is pased to vRO. The only thing I get is a bunch of attributes, with _metadata* as a prefix in the name. There are no machine properties and, as there are no custom proeprties in vRA 8, I do not know how I could force vRA to pass those to a vRO workflow.

Also - in vRA 7, to test a subscription, I could just configure an event subscription that would be triggered on each event topic (Condition -> run for all events). This was really helpful when learning which parameters get passed with each topic. AFIAK there is no way to configure an "any" Event in vRA 8 - or is there?

Tags (2)
1 Solution

Accepted Solutions
haloOne
Contributor
Contributor

use "inputProperties" as your vro WF input, i was getting the same thing until i used that.

View solution in original post

6 Replies
DLally
Enthusiast
Enthusiast

I'm a bit surprised that this is still unanswered due to the massive headache it was to initially deploy and use vcac.  I would have hoped documentation would be improved.  

0 Kudos
haloOne
Contributor
Contributor

use "inputProperties" as your vro WF input, i was getting the same thing until i used that.

View solution in original post

itrudeau
Contributor
Contributor

Hello Group

I have the same issue, I was not able to grab the blueprint input value from the payload with inputProperties input with type properties.

I getting only the custom properties values list bellow in the vro log tabs:

2019-11-05 11:43:56.000 -05:00info__item_stack:/item1

2019-11-05 11:43:56.000 -05:00infocustomProperties[

2019-11-05 11:43:56.000 -05:00infohostname:none

2019-11-05 11:43:56.000 -05:00infoimageRef:tmpl-win2019

2019-11-05 11:43:56.000 -05:00info]

2019-11-05 11:43:56.000 -05:00infocomponentId:vSphere_Machine

2019-11-05 11:43:56.000 -05:00infocomponentTypeId:Cloud.vSphere.Machine

2019-11-05 11:43:56.000 -05:00inforequestId:82738b32-f600-423e-85ed-a901843c12c9

2019-11-05 11:43:56.000 -05:00infodeploymentId:53b350a6-77a2-42c2-920d-3853f6ea8955

2019-11-05 11:43:56.000 -05:00infoplacementIds:f8c36a95-2829-476f-8a91-332c6667bbf1-64f403ad807c38755956c5d93c830

2019-11-05 11:43:56.000 -05:00infoprojectId:f8c36a95-2829-476f-8a91-332c6667bbf1

2019-11-05 11:43:56.000 -05:00infoblueprintId:9e969c25-ff66-43a1-8caa-49db4553faab

2019-11-05 11:43:56.000 -05:00inforesourceIds:8698b4e2f1f50e755969c19f0cf70

2019-11-05 11:43:56.000 -05:00infotags[

2019-11-05 11:43:56.000 -05:00info]

2019-11-05 11:43:56.000 -05:00infoHashMap:1513203023

2019-11-05 11:43:56.000 -05:00info__item_stack:/item0

Is there a way to get the value of the blueprint input like :

inputs:

  environment:

    type: string

    default: none

  location:

    type: string

   default: none

  workload:

    type: string

    default: none

  cluster:

    type: string

    default: none

  tier:

    type: string

    default: none

  network:

    type: string

    default: none

0 Kudos
haloOne
Contributor
Contributor

Did you add it to your blueprint properties ?

ex.

  Cloud_vSphere_Machine_1:

    type: Cloud.vSphere.Machine

    properties:

      environment: '${input.envoirnment}'

      location: '${input.location}

      workload: '${input.workload}

itrudeau
Contributor
Contributor

hello haloOne.

Actualy you're right they are not part of the vSphere.Machine but only in the contraints/tag.

If you look at the YAML

vSphere_Machine:

    type: Cloud.vSphere.Machine

    properties:

      imageRef: 'tmpl-win2019-${input.cluster}'

      cpuCount: '${input.cpuCount}'

      totalMemoryMB: '${input.totalMemoryMB}'

      hostname: '${input.hostname}'

      networks:

        - network: '${resource.Cloud_vSphere_Network_1.id}'

      constraints:

        - tag: 'rp:${input.cluster}-${input.tier}'

        - tag: 'env:${input.environment}'

        - tag: 'location:${input.location}'

I will to push in the properties.

Thank you to pointing it out.

Regards.

0 Kudos
Czernobog
Expert
Expert

Can confirm this works - use inputProperties of type Properties as input and parse it with for in, here's a sample output:

2019-11-12 17:02:23.000 +01:00INFOaddresses:10.9.5.12

2019-11-12 17:02:23.000 +01:00INFOcomponentId:Cloud_vSphere_Machine_1

2019-11-12 17:02:23.000 +01:00INFOendpointId:5f9de3a1e499ea755957ee7ddc511

2019-11-12 17:02:23.000 +01:00INFOexternalIds:50086956-222a-0550-454c-ecbfee8c07a2

2019-11-12 17:02:23.000 +01:00INFOblueprintId:0b3be186-630a-4e30-88a7-60680e7fab36

2019-11-12 17:02:23.000 +01:00INFOtags[

2019-11-12 17:02:23.000 +01:00INFO]

2019-11-12 17:02:23.000 +01:00INFOresourceNames:Quickstart project-005

2019-11-12 17:02:23.000 +01:00INFOcustomProperties[

2019-11-12 17:02:23.000 +01:00INFO  provisionGB:20

2019-11-12 17:02:23.000 +01:00INFO  softwareName:CentOS 4/5 or later (64-bit)

2019-11-12 17:02:23.000 +01:00INFO  osType:LINUX

2019-11-12 17:02:23.000 +01:00INFO  datacenter:Datacenter:datacenter-2

2019-11-12 17:02:23.000 +01:00INFO  imageRef:cent_tmpl

2019-11-12 17:02:23.000 +01:00INFO  datastoreName:DS9-D01

2019-11-12 17:02:23.000 +01:00INFO  memoryGB:1

2019-11-12 17:02:23.000 +01:00INFO  vcUuid:1c902f4e-6a6f-45c9-8301-56336a58fe3d

2019-11-12 17:02:23.000 +01:00INFO]

2019-11-12 17:02:23.000 +01:00INFOcomponentTypeId:Cloud.vSphere.Machine

2019-11-12 17:02:23.000 +01:00INFOrequestId:458a4698-0a4d-4b41-b388-eefcc8e0d093

2019-11-12 17:02:23.000 +01:00INFOdeploymentId:d9a2e7cd-6686-42f9-a7b8-266f8c66dccb

2019-11-12 17:02:23.000 +01:00INFOzoneId:5f9de3a1e499ea755957ef35c4268

2019-11-12 17:02:23.000 +01:00INFOprojectId:8b3bdf6a-9b4f-42c2-a6b7-ed25034c8a79

2019-11-12 17:02:23.000 +01:00INFOresourceIds:bfb567677e4923b5

I did not monitor the thread, while I was at VMworld last week, but I have asked an expert the question there and got the same result 😃

edit: the custom properties:

resources:

  Cloud_vSphere_Machine_1:

     ...etc

were already pre-created in the quickstart project.