VMware Aria Automation Tools

 View Only
  • 1.  Service broker template yaml error with 'min' command syntax in 8.17

    Posted Jun 12, 2024 04:02 PM

    After upgrading to 8.17 I'm getting this error in my yaml template regarding the usage of "min" (This worked in 8.16 and prior)

          capacityGb: ${(length(input.disks)>0) ? min([input.disks[count.index].size,input.maxDiskSize]):0}

    Invalid argument type calling 'min': expected array of numbers or string but was array of null and a number.

    Obviously reading the error message I understand some null value is getting in there, but I have a default for my maxDiskSize set 

      maxDiskSize:
        type: integer
        $dynamicDefault: /data/vro-actions/com.ge.storage.configuration/getMaxChunkSize?location={{location}}
        default: 10240

    And my disks definition:

      disks:
        type: array
        title: additional disks
        items:
          title: disk
          type: object
          properties:
            mountPoint:
              type: string
              title: Mount Point
            size:
              type: integer
              title: Size in GB
            fsType:
              type: string
              title: File System Type
        maxItems: 16

    I'm not quite sure where the 'null' value is coming in, but I tried setting a disk default size to 1 and that didn't help either.  I'm not a yaml expert, and the min option I can't find a lot of documentation on it but if I remove it my disk add fails.  I inherited this code so I'm just trying to update it at this point, any opinion would be greatly appreciated.



  • 2.  RE: Service broker template yaml error with 'min' command syntax in 8.17

    Posted Jun 13, 2024 10:50 AM

    Edit Blueprint YAML file & add this, hope it fix your current issue:-

    disks:
        type: array
        minItems: 0
        maxItems: 10




  • 3.  RE: Service broker template yaml error with 'min' command syntax in 8.17

    Posted Jun 13, 2024 11:10 AM

    Thanks for the suggestion, adding a minItems to that field did not change the syntax error.  I'm not sure what changed going into 8.17 but if anyone has a link to documentation with changes maybe that would help failing a suggestion on fixing or changing my yaml syntax to work properly.




  • 4.  RE: Service broker template yaml error with 'min' command syntax in 8.17

    Posted Jun 14, 2024 12:15 PM

    There is nothing mentioned in vRA 8.17 release note about changing in blueprint YAML; so this issue is my be YAML indentation or recent modifications happened on YAML syntax.

    https://docs.vmware.com/en/VMware-Aria-Automation/services/rn/vmware-aria-automation-release-notes/index.html

    Could you share further logs / event / screenshot for the issue? Also try to restore to last working version from 'version history' 



    ------------------------------
    Tarek Nader
    www.linkedin.com/in/tnader-70853361
    ------------------------------



  • 5.  RE: Service broker template yaml error with 'min' command syntax in 8.17

    Posted Jun 14, 2024 12:54 PM

    This is strictly a problem with 8.17 and the yaml.  My vRA 8.16 still works with the same template, only stopped working after the upgrade in my dev env.  I've got no error logs, since it's just the yaml syntax error in the template.  I'll just have to figure out another way to do it if min isn't working as it was for me in 8.16(and earlier).  




  • 6.  RE: Service broker template yaml error with 'min' command syntax in 8.17

    Posted 28 days ago

    Apparently there was some change in 8.16.2, I can't find it exactly.  However, I was able to get some help and changed the code and now i'm working again.  In case someone comes upon this at some future point, changed min to min([not_null]

          capacityGb: ${length(input.disks)>0?min([not_null(input.disks[count.index].size,0)+2,input.maxDiskSize]):0}




  • 7.  RE: Service broker template yaml error with 'min' command syntax in 8.17

    Posted 28 days ago

    Do it work when you add "not_null"?

    Why you didn't use vRO action instead or custom forms ?



    ------------------------------
    Tarek Nader
    www.linkedin.com/in/tnader-70853361
    ------------------------------