VMware Aria Automation Tools

 View Only
  • 1.  vRA 8.1, Programmatically set inputProperties.customProperties?

    Posted Jul 17, 2020 09:53 PM

    I am attempting to find a method of setting inputProperties.customProperties.* variables within a workflow run to provision a host.

    If there is a better convention feel free to suggest it.

    Basically I have a need to access those variables from various points during the provisioning process AND during day 2 actions. I want to be able to retrieve and update those variables.

    Using something like

    inputProperties.customProperties.put("cidrs", [[String(context.ipv4cidr), String(context.ipv6Cidr)]]);

    Doesn't cause an error and the log in that workflow shows it as inserted but when attempting to get the same custom property from another workflow it doesn't exist.

    When the VM is built I check the Service Broker->Deployments->Host->machine->Custom Properties I don't see them there either.

    Any suggestion on a direction I can go to solve this problem?



  • 2.  RE: vRA 8.1, Programmatically set inputProperties.customProperties?
    Best Answer

    Posted Jul 18, 2020 03:29 AM

    You need to set customProperties as an output variable, see vRA 8 – My First Extensibility Workflow – vRO Edition – vBombarded and put your values into that, not to the input variable.

    From a vRA ABX action, you need to return an object with a property called customProperties:

    outputs.customProperties = {'myprop': 'myValue'};

    return outputs;



  • 3.  RE: vRA 8.1, Programmatically set inputProperties.customProperties?

    Posted Jul 18, 2020 03:42 AM

    So I need to setup an output for customProperties (Array?)

    and then

    customProperties.cidrs = new Array(String(context.ipv4cidr), String(context.ipv6Cidr));

    I thought I had tried that (this is a workflow, not a action) but no joy. I'll give it another spin and see what happens and update the thread.



  • 4.  RE: vRA 8.1, Programmatically set inputProperties.customProperties?

    Posted Jul 18, 2020 05:45 AM

    Previously when I tested I tried to set customProperties to "array" and not "Properties" type. Once set to Properties it worked.

    Thanks!



  • 5.  RE: vRA 8.1, Programmatically set inputProperties.customProperties?

    Posted Oct 30, 2024 02:50 AM

    Hi Guys,

    I know this post has several years and it has its own best answer. However, I would like to know if someone has tried to modify cpuCount and totalMemoryMB properties within a workflow triggered by a "compute allocation" event topic.

    I have tried that here: Can we modify "cpuCount" and "totalMemoryMB" in a workflow triggered by compute.allocation.pre event topic?

    But values are not taken by the VM once it is deployed.

    Can I update cpuCount and totalMemoryMB in customProperties?

    Best regards

    Antonio