How to verify a variable input before runbook execution | Nutanix Community
Skip to main content

Hi,

My challenge is to verify a user’s input before she clicks ‘execute’ 

For example: I’ve created a variable named MyNumber with Data type = integer

I want to verify that the provided value should not be higher than 3

Using input type as Escript, I’ve tried:
if @@{MyNumber}@@ > 3:

    print(3)

But when executing the runbook I get the warning that I have a cyclic dependency and the input is not available.

Is there a way to achieve this input verification?

Thanks

Hi Avico,

My suggestion is to use the regular expressions option available in variables.


Thanks Jose,

I really hope Nutanix is working on improving the coding environment for developers. It is definitely lagging behind…

 

Avi


Hi Avico,

We’d like to hear more about what sort of capabilities you are looking for, since we have been actively improving our DevEx with many developments happening at the moment around our v4 APIs, Terraform provider, Ansible collection, PowerShell, Calm DSL and more.

Looking forward to hear more from you!


Thank you Jose!

Will write you an email with the things I think Self-Service’s coding environment can improve on… :-)

Avi