Groovy web console

subscribe to the feed Subscribe
to this
site

Task 3

Published 5 months ago by Gokul
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def COMMAND_RESULT = """define contactgroup{ contactgroup_name webio-admins
alias UIM:NAGIOS-TEST-WEBIO;
members emusic
}
define contactgroup{
contactgroup_name voice_ops
alias UIM:NAGIOS-TEST-WEBIO1;
members emusic,mkopitsch,gmohan
}"""
def list=COMMAND_RESULT.split(" ");
if(COMMAND_RESULT.contains('UIM:NAGIOS-TEST-WEBIO;'))
{
    if(COMMAND_RESULT.contains('afasiolo'))
    {
        exit();
    }
    else
    {
      str = 'afasiolo';
      finallist = COMMAND_RESULT + str;
      print finallist;
    }
}