I am trying to create a catalog to provision the VM. I have created a service plan with customisation enabled for memory and CPU and added that to inputs. The generated configuration in the catalog expects the plan as follows
I am inserting my customOptions here to replace the maxcores and maxMemory.
Here The value for memory is expected to be provided in bytes whereas I want the user to enter in GB
Is there any way to insert arithmetic operations in order to convert GB to bytes.
Also, life get’s easier if you update to the 6.1.X branch where we introduced form builder. There is a native disk and plan form field. Additionally, we have a Byte Size field that will do the arithmetic for you.
It’s important to note, if you need a value to be passed as an integer like the above example of @vsenthilkarasu you should add a toLong() on it so it’s evaluated properly like:
Yes I’m still getting the 500 error. I’m creating a catalog to create 2 VMs that refer to an existing blueprint, and the only input field I want to change is ‘maxMemory’ inside ‘ServicePlanOptions’. I try some of the formats but it’s returned 500. The only format that can be done is <%=customOptions.memGB%> without quotes or toLong().*1024*1024*1024 like this: