cc/td/doc/product/rtrmgmt/ana/4_0
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table Of Contents

Bean Shell Commands

Telnet Examples

SNMP Examples


Bean Shell Commands


This appendix describes the methods for using Bean Shell in ANA commands used to interact with devices. In addition, it provides Telnet and SNMP environment object examples.


Note Unlike ANA Macro Language, in Bean Shell, user arguments inventory properties should not be embedded within $...$ symbols.


This appendix includes the following sections:

Telnet Examples

SNMP Examples

The following diagram shows the methods to use for Bean Shell in ANA commands when interacting with devices for Telnet and SNMP interfaces.

Figure E-1 Bean Shell Methods


Note For setStatus 1=success and 2=failure.


Telnet Examples

This section provides examples of the available predefined Telnet environment objects that you can use to interact with a device:

telnetInterface.config ("prompt","telnet command")—Where "prompt" is the expected prompt after the command completes and "telnet command" is the actual command to be executed.

telnetInterface.setStatus (1 or 2)—Where 1=success and 2=fail, used (for example) to signal to workflow manager that a configuration command has succeeded or failed.

SNMP Examples

This section provides examples of the available predefined SNMP environment objects that you can use to interact with a device:

snmpInterface.get ("OID",true/false);

Gets OID, and displays or hides results.

snmpInterface.getNext ("OID",true/false);

Gets next OID, and displays or hides results.

snmpInterface.set ("OID",variable type,"value");

Sets OID to the specified value.

snmpInterface.walk("OID",true/false);

Returns a vector of strings.

snmpInterface.setStatus (1 or 2);

Where 1=success and 2=fail, used (for example) to signal to the workflow manager that a configuration command has succeeded or failed.

For additional information about general scripting language, refer to http://www.beanshell.org/.


hometocprevnextglossaryfeedbacksearchhelp

Posted: Mon Sep 24 07:17:21 PDT 2007
All contents are Copyright © 1992--2007 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.