VMware Cloud Community
improvingdaily
Enthusiast
Enthusiast
Jump to solution

What is the syntax to get a property of a variable in OGNL?

I am trying to figure out how to access the properties of a variable in an OGNL expression.  For example I know I can get the name of a vm by specifying ${vm.name}  where the vm is my vm object.  How would I get vm.guest.guestFullName?

0 Kudos
1 Solution

Accepted Solutions
improvingdaily
Enthusiast
Enthusiast
Jump to solution

OK so I may have found the answer to my own question.  If you go in the scripting tab of a scriptable task and search for a virtualmachine type and then go to that section it will tell you the properties you can access.  The only issue I noticed was if the property is not set then you will get an error.  I am not sure if this is all you can access or not but for now this solves my problem.

View solution in original post

0 Kudos
1 Reply
improvingdaily
Enthusiast
Enthusiast
Jump to solution

OK so I may have found the answer to my own question.  If you go in the scripting tab of a scriptable task and search for a virtualmachine type and then go to that section it will tell you the properties you can access.  The only issue I noticed was if the property is not set then you will get an error.  I am not sure if this is all you can access or not but for now this solves my problem.

0 Kudos