• Support
  • Articles
  • Resources
  • Products

Asistance in TTLeditor scripting for automated CLI provision

Moderator: boris

3 postsPage 1 of 1


Joined: Tue Nov 11, 2014 11:10 am
by aalakhras » Tue Nov 11, 2014 11:30 am
I am trying to automate a mass provisioning on a device ( similar to a
switch / router) and the thing is that i need to have this done by
scripting using ttl editor and call the macro fro teraterm.

I will take a chunk as an example that I want to execute on teraterm cli

interface ont-13-2-31
grant 1 2000 IPTV
grant 2 1000 VOIP
grant 3 2000 Internet
grant 4 1000 FA_IM_IR_GL
grant 5 1000 Outdoor_Internet
grant 6 1000 IPCAMs
sdv 456
sdvprofile SDV_ALL

there are two variables ( ont-13-2-31, sdv 456 )
the variable that change ont-13-2-31 --> ( 13 can be any number from 1 to 20, 2 can any be any number from 1 to 8, and 31 can be any number from 1 to 64) , sdv also is a number between 255 and 4096 ,( example here uses 456 )

the grand and sdv commands are executed under ont-x-y-z command

. starting point is ont-1-1-1, ont-1-1-2,...ont-1-1-64 , then ont-1-2-1, ont-1-2-2,...ont-1-2-64, till ont-1-8-64, then ont-2-1-1,... and so on so the last will be ont-20-8-64..

please advise how to do this on ttl editor to be called to teraterm

Joined: Mon Apr 02, 2012 2:53 pm
by rgaiken » Tue Nov 11, 2014 6:49 pm
It's been well over a year since I've touched TT scripting (got a new job where we don't use TT). But I'll try to get you pointed in the right direction. I don't have this installed, so I can't test the code to see if it'll work:

You'll want three nested for loops, if I'm reading your post correctly:

If you have any questions about any of the commands I used, look [url=http://ttssh2.sourceforge.jp/manual/en/macro/command/index.html]here[/url] and [url=http://logmett.com/forum/viewtopic.php?t=2133]here[/url] first
If one of my posts helped you out, do me a favor:
Next time anyone asks you for help, go out of your way to help them.


Joined: Tue Nov 11, 2014 11:10 am
by aalakhras » Wed Nov 12, 2014 8:32 am
Massive thanks for this . I applied this on a switch that doesnt support such commands, just to see if the commands execute or not and the if is working and it does :) put low value for x and y just to see if it works and get appropriate outputs. I really appreciate that

Display posts from previous:
Sort by:

3 postsPage 1 of 1

Users browsing this forum: No registered users