VMware Aria Automation Tools

 View Only
  • 1.  vRA 8.1 - How to use project custom properties in custom form with vRO external action ?

    Posted Apr 24, 2020 02:07 PM

    Hi all,

    I'm new to vRA 8.1, and I'm pretty happy of lots of things improved !

    But while trying to reproduce my Blueprint and its Custom Form from vRA 7.5 to vRA 8.1, I'm struggling with something that was not difficult previously.

    I need to fill a dropdown list with a REST API call from an external vRO action.

    The REST Host was successfully added in vRO (this is one of the inputs for this action and it's working fine).

    I need two others inputs to filter the content of the list that I'll display on form:

    - environment of blueprint (easy as I added it in the inputs section of the Blueprint, I just select it in Fields)

    - the group that is granted to acces only some items in the original list and here is my problem...

    This group should be different for each project as projects replace Business Groups.

    So I set a custom property in my project with one of the possible values, but I'm struggling retrieving this property in the custom form designer or inside my vRO external action.

    In vRA 7.5, I was passing the Business Group name to my vRO external action and then used the action System.getModule("com.vmware.library.vcaccafe.subtenant").getCustomPropertyNames(subtenant) to retrieve all properties of the BG and then retrieve my property value.

    But now it's just becoming a nightmare on the vRO side...

    • No vRA plugin...
    • No action containing the word 'project'
    • API explorer not organized to list vRA capabilities

    I found this action that I could use: com.vmware.library.customProperties.getCustomProperty but its input is object type and I don't see any trace of method somewhere to get my project in the API so how can achieve that ????!!

    I was curious enough to find something in API and did a test using Server.getObjectsWithCustomPropertyKey(myCustomProperty) and it return an empty object :smileyangry:

    Please help me I'm getting very confused :smileyconfused:

    Cheers,

    Tim



  • 2.  RE: vRA 8.1 - How to use project custom properties in custom form with vRO external action ?

    Posted Apr 29, 2020 08:58 AM

    Hello,

    I'm also looking for an answer



  • 3.  RE: vRA 8.1 - How to use project custom properties in custom form with vRO external action ?

    Posted May 07, 2020 01:29 PM

    All custom properties that are assigned to the project and or blueprint are passed into VRO through a value (INPUTPROPERTIES)  All you should have to do is parse inputProperties and find custom properties with your property in it.



  • 4.  RE: vRA 8.1 - How to use project custom properties in custom form with vRO external action ?

    Posted May 07, 2020 01:44 PM

    Add inputProperties (type:properties) as an input to the workflow.

    If you add this line to the first step of the workflow, you get a nicely formatted view of what you have to work with.

    System.log(JSON.stringify(inputProperties, null, 2))



  • 5.  RE: vRA 8.1 - How to use project custom properties in custom form with vRO external action ?

    Posted May 08, 2020 08:39 AM

    Hi,

    Thanks for your help.

    But I'm not talking about a workflow, but an external action that is called directly inside a custom form where we need to do a mapping of all inputs fo the external action.

    Apparently the development team as decided to expose project properties after submitting the request form so I may need a fix from them.

    I'll keep this topic updated when I have more information.

    Cheers,

    Tim.



  • 6.  RE: vRA 8.1 - How to use project custom properties in custom form with vRO external action ?

    Posted Jul 31, 2020 02:55 PM
    Any news about this issue?


  • 7.  RE: vRA 8.1 - How to use project custom properties in custom form with vRO external action ?

    Posted Aug 05, 2020 09:39 PM

    I also have a need to access these properties via an action.



  • 8.  RE: vRA 8.1 - How to use project custom properties in custom form with vRO external action ?

    Posted Sep 17, 2020 02:28 PM

    Certainly not ideal, but would it be possible to put those properties in a config element in vRO as well?  I think vRA could send the Project ID to vRO, so if you had a config element for each project id and attributes for each property, then the action could use those?

    I understand that's probably a lot of manual and prone to plenty of errors/fat-fingering/etc, but could maybe be something to allow you to move forward while the engineers actually fix the API?



  • 9.  RE: vRA 8.1 - How to use project custom properties in custom form with vRO external action ?

    Posted Sep 17, 2020 10:27 PM


  • 10.  RE: vRA 8.1 - How to use project custom properties in custom form with vRO external action ?

    Posted Oct 28, 2020 11:33 PM

    This worked great for me! Thanks.