C++ guidlines

Version 1
    This document was generated from CDN thread

    Created by: ILIAS TZIMOURAKAS on 26-04-2011 10:13:44 AM
    Hello. I have a UC520 and an SR520 cisco routers. I use Visual C++ on windows OS. I want to develop a program that will configure my routers. So i will need to be able to configure all IOS CLI comamands. As far as i understand i can use XML API to configure CM (i believe CME also) related options and commands. Is it possible maybe with anohter API to develop a program that configures my routers. Speciffically i want to manage to configure my directory entries of the UC520. But it is something that will later expand to others configuration tasks. So any guidlines available are accepted. What are my option. Please be a little specific because i am not so experienced programmer.
     
    Thank you.

    Subject: RE: C++ guidlines
    Replied by: Tanner Ezell on 31-05-2011 02:41:17 PM
    You'd need to write an application which open a connection (telnet/ssh) and send ios commands. There is no specific API I am aware of for what you want.

    I believe you can push changes with SMTP but I'm not 100% certain.

    Subject: RE: C++ guidlines
    Replied by: Aaron Graham on 17-06-2011 09:28:43 AM
    The company I work for has developed a C++ application that uses ssh connection to automatically send CLI commands that are executed using the control provided by TCL (Tool Command Language). In some of the Cisco devices a onboard TCL interpreter is provided. When it wasn't provided (for example the embedded 3750 switches or ASA firewall or even 3rd party PEPs), we used a TCL interpreter on the PC that would run the scripts and (when appropriate) send the IOS commands via the SSH connection to any router/switch that uses a k9 (SSH) IOS build.

    I used a state machine (implemented as a C++ thread) for each piece of equipment that we wanted to configure automatically. These state machines look for particular text that was returned from the CLI to determine transition(s) from state to state.

    If your devices accept the "tclsh" command from the ¿enable¿ prompt, then they will support TCL. You will most likely be able to do all you want with TCL on the devices themselves. You can load TCL scripts via a TFTP server if you wish and execute them on the Router.

    The Tanner Ezell may have meant SNMP instead of  SMTP. SNMP can also push configuration changes from a remote location.

    Good luck.
    Aaron