11 years ago
Passing arguments to Groovy Script
Can I pass host properties from the portal into a groovy script?
for example, in the \'\'Access remote servers via SSH session\'\' documentation example, the example code starts:
Line 1. import com.santaba.collector.groovyapi.expect.Expect
Line 2. cli = Expect.open(\'\'192.168.211.129\'\', \'\'root\'\', \'\'xxxxxxx\'\')
...
I\'d like to set some host parameters like
myservice.user = user
myservice.pass = 12345
and access them with something like the following:
Line 2. cli = Expect.open( some_hostname_variable , some_properties_map[\'\'myservice.user\'\'], some_properties_map[\'\'myservice.pass\'\'])
does some syntax like that exist? if so, where can I read more about it?