TCL with CSM

Unanswered Question
Aug 13th, 2008

Hi All

I try to use TCL script with CSM Netconfig.

My script start with the tclsh command, but each time I try to use a function (ex.: while) that required to lets the brace open I have the following error

ex.:

tclsh

set x 0

while {$x < 10} {+>missing close-brace

...

...

...

incr x

}

If I put this with CLI everythings goes OK. I don't have the "+>missing close-brace" error, but it's appear that the Netconfig want to have the { and the } on the same line.

Does anyone already have this issue ?

Thanks you very much for your help.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Gilles Dufour Thu, 08/14/2008 - 00:04

you should not put tclsh at the beginning.

You can download sample scripts from the software download page.

Look at the file c6slb-apc.4-2-1.tcl

Gilles

martindesrosiers Thu, 08/14/2008 - 04:25

Thanks for your reply

But if I remove the tclsh command, how can I enter in the embedded tcl cisco's interpreter ?

Does it exist another way to call tcl script ?

Does the way to call tcl script from CSM is different from router CLI ways ?

Thanks Gilles

Gilles Dufour Thu, 08/14/2008 - 04:42

The script can only be used for creating probes and nothing else.

When you define the probe type to be script, the CSM knows this is a TCL script.

No need for tclsh.

Gilles.

martindesrosiers Tue, 08/26/2008 - 04:44

But, If i want to modify the router's running config based on a TCL condition, how can I do that without tclsh command ?

Thank you very much for your help Gilles

Actions

This Discussion