vRO Pass By Reference

This vRO Action inputs a string or property name, and a property set and replaces the any {property key} in braces included in the input string with the value of that property key. This is very handy, as an example, for handling scripts run during vRA provisioning by allowing you to code scripts as "templates" and replace dynamic values in the scripts with property values set in vRA.

For example, the inputString = "The {fox.speed} {fox.color} fox jumps over the {dog.emotion} dog";

and the inputProperties  (key, value) pairs include:

  • (fox.speed , "fast")
  • (fox.color, "yellow")
  • (dog.emotion, "angry")

The call would be:

  • outputString = System.getModule("com.vmware.pso.vcac").parsePassByReferenceString(inputString,inputProperties) ;

the output of the action would be : The fast yellow fox jumps over the angry dog.

An alternate use: if the properties set included the (key,value) pair :

  • (sentence, "The {fox.speed} {fox.color} fox jumps over the {dog.emotion} dog")

then the call:

  • outputString = System.getModule("com.vmware.pso.vcac").parsePassByReferenceString("sentence",inputProperties) ;

produces the exact same result: The fast yellow fox jumps over the angry dog.



Sign in to be able to add comments.

Comments 0