Forum Discussion
import com.santaba.agent.groovyapi.expect.Expect
host = hostProps.get("system.hostname");
user = hostProps.get("config.user");
pass = hostProps.get("config.pass");
prompt = /.+\#\s/
cli=Expect.open(host, user, pass);
cli.expect(prompt);
cli.send("terminal length 0\n");
cli.expect(prompt);
cli.send("show running-config\n");
cli.expect(prompt);
println(cli.before())
cli.send("exit\n");
cli.expectClose();
Result:
Success: There would be no instances discovered for the selected device.
Not sure what is happening, was expecting a print out of show run to return. Maybe my Config Checks are stopping it?
---------------------------------------------------------------------------------------------------------------
I have the following Config Checks (took from Cisco_IOS):
Related Content
- 2 years ago
- 4 months ago
- 2 years ago