com.adventnet.simulator.scripting
Interface SimScrIntf


public interface SimScrIntf


Method Summary
 void addAccessId(java.lang.String commandCode, java.lang.String accessId)
           Adds an accessId for a Command Code.
 void addAccessId(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode, java.lang.String accessId)
           Adds an accessId for a Command Code.
 void addLines(java.lang.String autoCode, java.lang.String alarmDescr, int lineType, java.lang.String[] paramNames, java.lang.String[] paramValues)
           Adds a line(quoted/unquoted) to an autonomous code and alarm description combination.
 void addLines(java.lang.String commandCode, java.lang.String accessId, java.lang.String msgPayLoad, boolean isValid, int lineType, java.lang.String[] paramNames, java.lang.String[] paramValues)
           Adds a line(quoted/unquoted) to a commandCode, accessId and msgPayLoad combination.
 void addLines(java.lang.String ipAddress, java.lang.String port, java.lang.String autoCode, java.lang.String alarmDescr, int lineType, java.lang.String[] paramNames, java.lang.String[] paramValues)
           Adds a line(quoted/unquoted) to an autonomous code and alarm description combination.
 void addLines(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode, java.lang.String accessId, java.lang.String msgPayLoad, boolean isValid, int lineType, java.lang.String[] paramNames, java.lang.String[] paramValues)
           Adds a line(quoted/unquoted) to a commandCode, accessId and msgPayLoad combination.
 boolean addMibFileToDevice(java.lang.String ipAddress, int port, java.lang.String mibFile)
          This method is used to add a MIB file to an already existing SNMP device.It is mandatory that the SNMP agent should exists in the network.
 void addMsgPayLoad(java.lang.String commandCode, java.lang.String accessId, java.lang.String msgPayLoad)
           Adds a new Message PayLoad.
 void addMsgPayLoad(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode, java.lang.String accessId, java.lang.String msgPayLoad)
           Adds a new Message PayLoad.
 void addParameters(java.lang.String paramKey, java.lang.String paramValue)
          This Method adds the paramvalue argument for the given paramkey in the base table Note : When the key specified is already present , new value will be updated for the key -Applicable Only in IOS Devices.
 boolean addSnmpAgent(java.lang.String devName, java.lang.String ipAddress, java.lang.String port, java.lang.String readCommunity, java.lang.String writeCommunity, java.lang.String tftpPort)
          This method is used to add an SNMP agent to an already existing network.
 boolean changeDirectory(java.lang.String dir)
          This method gives the current working directory.
 void changeMode(int mode)
          This Method changes the Mode to the specified level.(However from user mode you can move only to enable mode , which will ask for a password and not all those above it) -Applicable Only in IOS Devices.
 void clearAllAutonomousMessages()
           Clears all the autonomous messages that were sent previously from all the TL1 agents in the selected network
 void clearAutonomousMessagesInDevice(java.lang.String ipAddress, java.lang.String port)
           Clears all the autonomous messages that were sent previously from the TL1 agent whose IP Address is specified in the ipAddress variable and whose listening port is in the port variable.
 void deleteAccessId(java.lang.String commandCode, java.lang.String accessId)
           Deletes an accessId for a Command Code.
 void deleteAccessId(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode, java.lang.String accessId)
           Deletes an accessId for a Command Code.
 void deleteAllRows(java.lang.String tableEntryOid)
          Deletes all the rows in the table
 void deleteAllRows(java.lang.String ipAddress, java.lang.String port, java.lang.String tableEntryOid)
          Deletes all rows in the table
 void deleteLine(java.lang.String autoCode, java.lang.String alarmDescr, int lineType, java.lang.String uniquePName, java.lang.String uniquePValue)
           Deletes a line.
 void deleteLine(java.lang.String commandCode, java.lang.String accessID, java.lang.String msgPayLoad, boolean isValid, int lineType, java.lang.String uniquePName, java.lang.String uniquePValue)
           Deletes a line.
 void deleteLine(java.lang.String ipAddress, java.lang.String port, java.lang.String autoCode, java.lang.String alarmDescr, int lineType, java.lang.String uniquePName, java.lang.String uniquePValue)
           Deletes a line.
 void deleteLine(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode, java.lang.String accessID, java.lang.String msgPayLoad, boolean isValid, int lineType, java.lang.String uniquePName, java.lang.String uniquePValue)
           Deletes a line.
 void deleteParameters(java.lang.String paramKey)
          This method deletes the paramKey entry along with the paramValue in the base table -Applicable Only in IOS Devices.
 void deleteRow(java.lang.String tableEntryOid, java.lang.String instance)
          Deletes a row with the specified instance from the table
 void deleteRow(java.lang.String ipAddress, java.lang.String port, java.lang.String tableEntryOid, java.lang.String instance)
          Deletes a row with the specified instance from the table
 void deleteRowWithValue(java.lang.String tableEntryOid, java.lang.String columnName, java.lang.String value)
          Deletes the specified row in the table which will match with the column value specified
 void deleteRowWithValue(java.lang.String ipAddress, java.lang.String snmpPort, java.lang.String tableEntryOid, java.lang.String columnName, java.lang.String value)
          Deletes the specified row in the table which will match with the column value specified in the specified device.
 boolean deleteSnmpAgent(java.lang.String ipAddress, java.lang.String port)
          This method is used to delete the SNMP agent with IP Address and Port from the currently selected network in the Network Desginer.
 void delLines(java.lang.String autoCode, java.lang.String alarmDescr, int lineType, java.lang.String[] paramNames, java.lang.String[] paramValues)
           Deletes a line(quoted/unquoted) for a autonomouse code and alarm description combination.
 void delLines(java.lang.String commandCode, java.lang.String accessId, java.lang.String msgPayLoad, boolean responseType, int lineType, java.lang.String[] paramNames, java.lang.String[] paramValues)
           Deletes a line(quoted/unquoted) to a commandCode, accessId and msgPayLoad combination.
 void delLines(java.lang.String ipAddress, java.lang.String port, java.lang.String autoCode, java.lang.String alarmDescr, int lineType, java.lang.String[] paramNames, java.lang.String[] paramValues)
           Deletes a line(quoted/unquoted) for a autonomouse code and alarm description combination.
 void delLines(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode, java.lang.String accessId, java.lang.String msgPayLoad, boolean responseType, int lineType, java.lang.String[] paramNames, java.lang.String[] paramValues)
           Deletes a line(quoted/unquoted) to a commandCode, accessId and msgPayLoad combination.
 void delMsgPayLoad(java.lang.String commandCode, java.lang.String accessId, java.lang.String msgPayLoad)
           Deletes a Message PayLoad.
 void delMsgPayLoad(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode, java.lang.String accessId, java.lang.String msgPayLoad)
           Deletes a Message PayLoad.
 boolean downInterface(java.lang.String ifIndex)
          This method is used to shutdown the given interface of the SNMP Agent.The interface will be shutdown only when the SNMP Agent is running.
 boolean downInterface(java.lang.String ipAddress, int port, java.lang.String ifIndex)
          This method is used to shutdown the interface for an SNMP agent with IP Address and Port from the currently selected network in the Network Desginer.The interface will be shutdown only when the agent is running.
 boolean downloadFile(java.lang.String ipAddress, int port, java.lang.String source, java.lang.String target, int mode, java.lang.String protocol)
          The method will download the file from source to target in binary or ascii mode.
 boolean downloadFile(java.lang.String ipAddress, int port, java.lang.String source, java.lang.String target, int mode, java.lang.String protocol, java.lang.String userName, java.lang.String password)
          The method will download from source to target in binary or ascii mode.
 java.lang.String execDisplayCommand(java.lang.String cmd)
          This method can be used for commands which result in some output display.The output should be specific to the directory from which it is being executed.
 void execGlobalTelnetCmd(java.lang.String cmd)
          This method shall be used for commands that result in some action being executed in the system without any output display.The action should be executed globally.
 java.lang.String executeGlobalCmd(java.lang.String cmd)
          This method can be used for commands which result in some output display.The output should be irrespective to the directory from which it is being executed.
 java.lang.String executeScript(java.lang.String scriptFile)
          This method gives the response of a script and helps in executing a script within a script -Applicable Only in IOS Devices.
 void executeTelnetCmd(java.lang.String cmd)
          This method shall be used for commands that result in some action being executed in the system without any output display.The action executed should be within the specified directory.
 java.util.Vector getAllAids(java.lang.String commandCode)
           Gets all the Access Identifiers configured for a command code.
 java.util.Vector getAllAids(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode)
           Gets all the Access Identifiers configured for a command code.
 java.lang.String[] getAllColumnByNames(java.lang.String tableEntryOid)
          This method will return all the columnar node names of a particular table, in a String array
 java.lang.String[] getAllColumnByNames(java.lang.String ipAddress, java.lang.String port, java.lang.String tableEntryOid)
          This method will return all the columnar node names of a particular table, in a String array
 java.lang.String[] getAllColumnByOids(java.lang.String tableEntryOid)
          This method will return all the columnar node OIDs of a particular table, in a String array
 java.lang.String[] getAllColumnByOids(java.lang.String ipAddress, java.lang.String port, java.lang.String tableEntryOid)
          This method will return all the columnar node OIDs of a particular table, in a String array
 java.util.ArrayList getAllDeviceNames()
          This method is used to list all the names of the devices present in the Device Tree.
 java.lang.String[] getAllIndices(java.lang.String tableEntryOid)
          This method will return all the index column name of a particular table, in a String array
 java.lang.String[] getAllIndices(java.lang.String ipAddress, java.lang.String port, java.lang.String tableEntryOid)
          This method will return all the index column name of a particular table, in a String array
 java.util.Vector getAllMpbs(java.lang.String commandCode, java.lang.String accessID)
           Gets all the Message Payload configured for a command code and access identifier combination.
 java.util.Vector getAllMpbs(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode, java.lang.String accessID)
           Gets all the Message Payload configured for a command code and access identifier combination.
 java.util.Hashtable getAllTableValues(java.lang.String tableEntryOid)
          Get all the table values in the table.
 java.util.Hashtable getAllTableValues(java.lang.String ipAddress, java.lang.String port, java.lang.String tableEntryOid)
          Get all the table values in the table.
 java.util.Vector getAutonomousDetails()
           Gets all the autonomous messages details that were sent previously from all the TL1 agents in the selected network
 java.util.Vector getAutonomousDetailsForDevice(java.lang.String ipAddress, java.lang.String port)
           Gets all the autonomous messages details that were sent previously from the TL1 agent whose IP Address is specified in the ipAddress variable and whose listening port is in the port variable.
 java.lang.String getCmdWord(int index)
          This Method gives the part of the Command for the given index -Applicable Only in IOS Devices.
 java.lang.String getConfigDirectory()
           Gets the current working directory i.e.
 java.lang.String getCurrentAID()
           Gets the accessId that comes in the request.
 int getCurrentColumn()
          > Gets the current column i.e.
 java.lang.String getCurrentCommand()
          This Method will give the current Command which is being executed -Applicable Only in IOS Devices.
 java.lang.String getCurrentCommandCode()
           Gets the Command code that comes in the request.
 java.lang.String getCurrentInstance()
           Gets the current instance i.e.
 int getCurrentLevel()
          This Method gives the level at which the command is executed -Applicable Only in IOS Devices.
 java.lang.String getCurrentMPB()
           Gets the msgPayLoad that comes in the request.
 java.lang.String getCurrentOID()
           Gets the current OID
 java.lang.String getCurrentOIDWithInstance()
           Gets the current OID with the instance appended to it.
 java.lang.String getCurrentValue()
           Gets the current value i.e.
 java.lang.String getDeviceName()
          This method gets the device name for which the request has come.
 boolean getEnableFlag()
          This method returns whether the enable password is set or not in the device.
 java.lang.String getEnablePassword()
          This method gets the password for the enable mode for which the request has come - Applicable Only in IOS Devices
 java.lang.String getErrIndex()
          Gets the errIndex of the response to the Inform Request
 java.lang.String getErrStat()
          Gets the errStat value of the response to the Inform Request
 java.lang.String getHighestIPAddress(java.util.Vector ipAddr)
          This method returns the highest IPAddress present in the given Vector.
 java.util.Vector getInstances(java.lang.String tableOid)
           Gets all the instances in a table
 java.util.Vector getInstances(java.lang.String ipAddress, java.lang.String port, java.lang.String tableOid)
          Gets all the instances in a table
 java.lang.String getInterfaceStatus()
          This Method gives what interface is being configured -Applicable Only in IOS Devices.
 java.lang.String getIPAddress()
           Gets the IP Address of the agent for which the request has come
 java.util.Hashtable getLine(java.lang.String autoCode, java.lang.String alarmDescr, int lineType, java.lang.String uniquePName, java.lang.String uniquePValue)
           Gets a line information with parameter name as the key and the parameter value as the value.
 java.util.Hashtable getLine(java.lang.String commandCode, java.lang.String accessID, java.lang.String msgPayLoad, boolean isValid, int lineType, java.lang.String uniquePName, java.lang.String uniquePValue)
           Gets a line information with parameter name as the key and the parameter value as the value.
 java.util.Hashtable getLine(java.lang.String ipAddress, java.lang.String port, java.lang.String autoCode, java.lang.String alarmDescr, int lineType, java.lang.String uniquePName, java.lang.String uniquePValue)
           Gets a line information with parameter name as the key and the parameter value as the value.
 java.util.Hashtable getLine(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode, java.lang.String accessID, java.lang.String msgPayLoad, boolean isValid, int lineType, java.lang.String uniquePName, java.lang.String uniquePValue)
           Gets a line information with parameter name as the key and the parameter value as the value.
 int getMaxRoundTripTime()
          This method gives the maximum time taken by isInterfaceUp method to check whether a particular IPAddress is up or not and hence has to be called after isInterfaceUp method
 int getMinRoundTripTime()
          This method gives the minimum time taken by isInterfaceUp method to check whether a particular IPAddress is up or not and hence has to be called after isInterfaceUp method
 java.lang.String getMode()
          This Method gives the Current mode at which the commands are executed -Applicable Only in IOS Devices.
 java.lang.String getNetworkAddress(java.lang.String ipAddress)
          This method returns the Network Address for th given IPAddress.
 java.lang.String getNextInstance(java.lang.String tableOid, java.lang.String instance)
           Gets the instance next to the specified instance
 java.lang.String getNextInstance(java.lang.String ipAddress, java.lang.String port, java.lang.String tableOid, java.lang.String instance)
          Gets the instance next to the specified instance
 java.lang.String getNodeValue(java.lang.String objectId, java.lang.String instance)
          Gets the current value of a MIB node
 java.lang.String getNodeValue(java.lang.String ipAddress, java.lang.String port, java.lang.String objectId, java.lang.String instance)
          Gets the current value of a MIB node
 int getNoOfSnmpAgentsRunning()
          This method is used to return the number of Snmp Agents running
 int getNumberOfAids(java.lang.String commandCode)
           Gets the number of Access Identifiers configured for a command code.
 int getNumberOfAids(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode)
           Gets the number of Access Identifiers configured for a command code.
 int getNumberOfMpbs(java.lang.String commandCode, java.lang.String accessID)
           Gets the number of Message PayLoad configured for a command code and access identifier combination.
 int getNumberOfMpbs(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode, java.lang.String accessID)
           Gets the number of Message PayLoad configured for a command code and access identifier combination.
 java.util.Vector getParamKeyList(java.lang.String paramKey)
          This method will return all the paramKeys in the base table which start with the argument -Applicable Only in IOS Devices.
 java.util.Vector getParamListValues(java.lang.String paramKey)
          This function returns the paramValue for all the paramKeys (Which are the part of the argument ) -Applicable Only in IOS Devices.
 java.lang.String getParamValue(java.lang.String paramKey)
          This method returns the paramValue for the paramkey -Applicable Only in IOS Devices.
 java.lang.String getPassword()
          This method gets the password for the device for which the request has come
 int getRequestType()
           Gets the request type *
 int getRoundTripTime()
          This method gives the average time taken by isInterfaceUp method to check whether a particular IPAddress is up or not and hence has to be called after isInterfaceUp method
 int getRowCount(java.lang.String tableOid)
           Gets the total number of rows in a table.If the agent is not running it returns -1.
 int getRowCount(java.lang.String ipAddress, java.lang.String port, java.lang.String tableOid)
          Gets the total number of rows in a table
 int getScriptConditionForSnmpAgent()
           Gets the condition for the script in execution.
 int getScriptConditionForTL1Agent()
           Gets the condition for the script in execution.
 java.lang.String getScriptFile(java.lang.String command, java.lang.String modeis)
          This method returns the ScriptFile for the given Command -Applicable Only in IOS Devices.
 java.lang.String getSnmpIPAddress()
           Gets the IP Address of the agent for which the request has come
 java.lang.String getSnmpOidForNodeName(java.lang.String nodeName)
          This method will return the SNMP OID for the node name
 java.lang.String getSnmpOidForNodeName(java.lang.String ipAddress, int port, java.lang.String nodeName)
          This method will return the SNMP OID for the node name
 int getSnmpPort()
           Gets the port at which the agent is running
 java.lang.String getTelnetCommands(int dev)
          This method returns all the commands supported by the device.
 java.lang.String getTelnetRootDir()
          This method returns the working directory of the device for which the request has come.
 java.lang.String getTL1ConfigDirectory()
           Gets the current working directory i.e.
 java.lang.String getTL1IPAddress()
           Gets the current IPAddress of the agent being queried.
 int getTL1Port()
           Gets the current port of the agent being queried.
 int getTotalColumns(java.lang.String tableEntryOid)
          This method will return the total number of columns of a particular table.If the oid specified is not a table Entry Oid , -1 will be returned.
 int getTotalColumns(java.lang.String ipAddress, java.lang.String port, java.lang.String tableEntryOid)
          This method will return the total number of columns of a particular table.If the oid specified is not a table Entry Oid , -1 will be returned.
 java.lang.String getUserName()
          This method gets the user name for the device.
 void insertRow(java.lang.String tableOid, java.lang.String[] objectId, java.lang.String[] values, java.lang.String[] simTypes)
          Inserts a row in a table
 void insertRow(java.lang.String ipAddress, java.lang.String port, java.lang.String tableOid, java.lang.String[] objectId, java.lang.String[] values, java.lang.String[] simTypes)
          Inserts a row in a table
 boolean isAidExists(java.lang.String commandCode, java.lang.String accessID)
           Checks if the given access identifier already exists for the command code.
 boolean isAidExists(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode, java.lang.String accessID)
           Checks if the given access identifier already exists for the command code.
 boolean isInterfaceUp(java.lang.String ipAddress)
          This method checks whether a particular IPAddress is up or not
 boolean isMpbExists(java.lang.String commandCode, java.lang.String accessID, java.lang.String msgPayLoad)
           Checks if the given message payload already exists for the command code and access identifer combination.
 boolean isMpbExists(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode, java.lang.String accessID, java.lang.String msgPayLoad)
           Checks if the given message payload already exists for the command code and access identifer combination.
 boolean isSnmpAgentRunning(java.lang.String ipAddress, java.lang.String port)
          This method returns true if the SNMP Agent is running at the specified IP Address and Port , and returns false if the SNMP Agent is not running.
 boolean isTftpRunning(java.lang.String ipAddress, int port)
          The method to check if the TFTP server is running at the specified host and port
 void maskNode(java.lang.String objectId, java.lang.String instance, java.lang.String maskValue)
          Masks a node from the manager
 void maskNode(java.lang.String ipAddress, java.lang.String port, java.lang.String objectId, java.lang.String instance, java.lang.String maskValue)
          Masks a node from the manager
 boolean modifyTimerScriptParameters(java.lang.String ipAddress, int port, java.lang.String scriptFile, java.lang.String date, long timerInterval, int noOfTimes)
          This method is used to modify timer parameters for Timer Scripts in the SNMP agent with IP Address and Port from the currently selected network in the Network Desginer.
 boolean modifyTimerScriptParameters(java.lang.String scriptFile, java.lang.String date, long timerInterval, int noOfTimes)
          This method is used to modify timer parameters for Timer Scripts in the SNMP agent with IP Address and Port from the currently selected network in the Network Desginer.
 void noEnablePassword()
          This method sets the enable flag to be false and disables the enable password field For e.g
scriptinterface.noEnablePassword()
 void sendAutonomousMessage(java.lang.String autoCode, java.lang.String almDescr)
           Sends a single autonomous message for the given autoCode and almDescr.
 void sendAutonomousMessage(java.lang.String autoCode, java.lang.String almDescr, int numberOfTimes, int interval)
           Sends autonomous message a specified number of times with specified time interval .
 void sendAutonomousMessage(java.lang.String ipAddress, java.lang.String port, java.lang.String autoCode, java.lang.String almDescr)
           Sends a single autonomous message for the given autoCode and almDescr.
 void sendAutonomousMessage(java.lang.String ipAddress, java.lang.String port, java.lang.String autoCode, java.lang.String almDescr, int numberOfTimes, int interval)
           Sends autonomous message a specified number of times with specified time interval.
 void sendAutonomousMessages()
           Sends all the autonomous messages that were sent previously from all the TL1 agents in the selected network
 void sendAutonomousMessagesInDevice(java.lang.String ipAddress, java.lang.String port)
           Sends all the autonomous messages that were sent previously from the TL1 agent whose IP Address is specified in the ipAddress variable and whose listening port is in the port variable.
 void sendDenyMessage(java.lang.String errorCode, java.lang.String explanation)
           Sends a deny message with the provided errorCode and explanation
 void sendInform(java.lang.String mgrName, java.lang.String mgrPort, java.lang.String community, java.lang.String sysUpTime, java.lang.String snmpTrapOid)
          Sends an inform request without varbinds
 void sendInform(java.lang.String mgrName, java.lang.String mgrPort, java.lang.String community, java.lang.String sysUpTime, java.lang.String snmpTrapOid, java.lang.String[] varbindOid, java.lang.String[] varbindTypes, java.lang.String[] varbindValues)
          Sends an inform request with varbinds
 void sendResponseMessage(java.lang.String[] paramNames, java.lang.String[] paramPosType, java.lang.String[] delimiters, java.util.Vector paramValuesVector, java.lang.String[] lineTypes, int completionCode)
           Sends a Response Message with the parameters defined inside the script
 void sendTrap(java.lang.String associatedVariable)
          This method will send the trap corresponding to the associated variable specified
 void sendTrap(java.lang.String trapName, java.lang.String enterpriseOID)
          This method will send the trap corresponding to the associated variable with enterpriseOID specified.
 void sendTrap(java.lang.String associatedVariable, java.lang.String ipAddress, java.lang.String snmpPort)
           
 void sendV1Trap(java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String enterpriseOid, int genericType, int specificType)
          Sends a V1 Trap with no varbinds
 void sendV1Trap(java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String enterpriseOid, int genericType, int specificType, java.lang.String[] varbindOid, java.lang.String[] varbindTypes, java.lang.String[] varbindValues)
          Sends a V1 Trap with varbinds
 void sendV1Trap(java.lang.String ipAddress, java.lang.String port, java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String enterpriseOid, int genericType, int specificType)
          Sends a V1 Trap with no varbinds
 void sendV1Trap(java.lang.String ipAddress, java.lang.String port, java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String enterpriseOid, int genericType, int specificType, java.lang.String[] varbindOid, java.lang.String[] varbindTypes, java.lang.String[] varbindValues)
          Sends a V1 Trap with varbinds
 void sendV2Inform(java.lang.String agentAddress, int agentPort, java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String informOID)
          Sends a v2 Inform without any extra varbinds
 void sendV2Inform(java.lang.String agentAddress, int agentPort, java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String trapOID, java.lang.String[] varbindOid, java.lang.String[] varbindTypes, java.lang.String[] varbindValues)
          Sends a v2 Inform with extra varbinds
 void sendV2Inform(java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String informOID)
          Sends a v2 Inform without any extra varbinds
 void sendV2Inform(java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String trapOID, java.lang.String[] varbindOid, java.lang.String[] varbindTypes, java.lang.String[] varbindValues)
          Sends a v2 Inform with extra varbinds
 void sendV2Trap(java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String trapOID)
          Sends a v2 Trap without any extra varbinds
 void sendV2Trap(java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String trapOID, java.lang.String[] varbindOid, java.lang.String[] varbindTypes, java.lang.String[] varbindValues)
          Sends a v2 Trap with extra varbinds
 void sendV2Trap(java.lang.String ipAddress, java.lang.String port, java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String trapOID)
          Sends a v2 Trap without any extra varbinds
 void sendV2Trap(java.lang.String ipAddress, java.lang.String port, java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String trapOID, java.lang.String[] varbindOid, java.lang.String[] varbindTypes, java.lang.String[] varbindValues)
          Sends a v2 Trap with extra varbinds
 void sendV3Inform(java.lang.String agentAddress, int agentPort, java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String enterpriseOID, java.lang.String userName, java.lang.String contextName)
          Sends a v3 Inform without varbinds
 void sendV3Inform(java.lang.String agentAddress, int agentPort, java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String enterpriseOID, java.lang.String userName, java.lang.String contextName, java.lang.String[] varbindOid, java.lang.String[] varbindTypes, java.lang.String[] varbindValues)
          Sends a v3 Inform with varbinds
 void sendV3Inform(java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String enterpriseOID, java.lang.String userName, java.lang.String contextName)
          Sends a v3 Inform without varbinds
 void sendV3Inform(java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String enterpriseOID, java.lang.String userName, java.lang.String contextName, java.lang.String[] varbindOid, java.lang.String[] varbindTypes, java.lang.String[] varbindValues)
          Sends a v3 Trap with varbinds
 void sendV3Trap(java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String enterpriseOID, java.lang.String userName, java.lang.String contextName)
          Sends a v3 Trap without varbinds
 void sendV3Trap(java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String enterpriseOID, java.lang.String userName, java.lang.String contextName, java.lang.String[] varbindOid, java.lang.String[] varbindTypes, java.lang.String[] varbindValues)
          Sends a v3 Trap with varbinds
 void sendV3Trap(java.lang.String ipAddress, java.lang.String port, java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String enterpriseOID, java.lang.String userName, java.lang.String contextName)
          Sends a v3 Trap without varbinds
 void sendV3Trap(java.lang.String ipAddress, java.lang.String port, java.lang.String mgrName, int mgrPort, java.lang.String community, java.lang.String enterpriseOID, java.lang.String userName, java.lang.String contextName, java.lang.String[] varbindOid, java.lang.String[] varbindTypes, java.lang.String[] varbindValues)
          Sends a v3 Trap with varbinds
 void setAckMessage(java.lang.String commandCode, java.lang.String accessId, java.lang.String msgPayLoad, int ackNO)
           Sets the Acknowledgement Message for a commandCode, accessId, msgPayLoad combination.
 void setAckMessage(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode, java.lang.String accessId, java.lang.String msgPayLoad, int ackNO)
           Sets the Acknowledgement Message for a commandCode, accessId, msgPayLoad combination.
 void setComplCode(java.lang.String commandCode, java.lang.String accessId, java.lang.String msgPayLoad, int complCode)
           Sets the Completion Code(COMPLD,DENY) for a commandCode, accessId, msgPayLoad combination.
 void setComplCode(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode, java.lang.String accessId, java.lang.String msgPayLoad, int complCode)
           Sets the Completion Code(COMPLD,DENY) for a commandCode, accessId, msgPayLoad combination.
 void setConnectionTime(int time)
          This sets the session time of the telnet client.sessiontime : The time till which the client connection should be established while client is idle -Applicable Only in IOS Devices.
 void setEnablePassword(java.lang.String password)
          This method sets the Enable mode password for the device for which the request has come - Applicable Only in IOS Devices
 void setPassword(java.lang.String password)
          This method sets the password for the device for which the request has come
 void setSnmpCharacterEncoding(java.lang.String encode)
          Sets the character encoding
 void showHistory()
          This function lists the last 10 commands executed by the telnet client -Applicable Only in IOS Devices.
 boolean startAgent(java.lang.String uniqueName)
          Describe registerToRMI method here.
 boolean startAgent(java.lang.String ipAddress, java.lang.String snmpPort, java.lang.String tl1Port)
           This method is used to start a Snmp/Tl1 agent using the ipAddress and Port given.
 boolean startTftpServer(java.lang.String ipAddress, java.lang.String port, java.lang.String rootDir)
          This method will start the TFTP server at the specified host and port number with the root directory
 boolean stopAgent(java.lang.String uniqueName)
           
 boolean stopAgent(java.lang.String ipAddress, java.lang.String snmpPort, java.lang.String tl1Port)
           This method is used to stop a Snmp/Tl1 agent using the ipAddress and Port given.
 boolean stopAllTimerInforms()
          This method is used to stop Timer Informs for all SNMP agents from the currently selected network in the Network Desginer.
 boolean stopAllTimerScripts()
          This method is used to stop Timer Scripts for all SNMP agents from the currently selected network in the Network Desginer.
 boolean stopAllTimerTraps()
          This method is used to stop Timer Traps for all SNMP agents from the currently selected network in the Network Desginer.
 boolean stopTftpServer(java.lang.String ipAddress, java.lang.String port)
          This method will stop the TFTP server running at the specified host and port number
 boolean stopTimerScripts(java.lang.String ipAddress, java.lang.String port)
          This method is used to stop Timer Scripts for the SNMP agent with IP Address and Port from the currently selected network in the Network Desginer.
 boolean stopTimerTraps(java.lang.String ipAddress, java.lang.String port)
          This method is used to stop Timer Traps for the SNMP agent with IP Address and Port from the currently selected network in the Network Desginer.
 void strAppend(java.lang.String response)
          This method can be used to append any string as a response to be recieved for a command.This should be used only when the command is going to display an output without performing any other operation.To explain in brief, this method shall be used for displaying Inforamation and not for setting any configuration.
 void terminateOperation(int errorNumber)
           Terminates the current operation i.e.
 void updateHost(java.lang.String name)
          This Method updates the host name with the given Name -Applicable Only in IOS Devices.
 void updateIPAddress(java.lang.String ipAddress)
          This method is used to update the IPAddress of the device -Applicable Only in IOS Devices
 void updateNodeValue(java.lang.String ipAddress, java.lang.String port, java.lang.String objectId, java.lang.String instance, java.lang.String value)
          Updates the value of mib node
 void updateParamValue(java.lang.String autoCode, java.lang.String alarmDescr, int lineType, java.lang.String uniquePName, java.lang.String uniquePValue, java.lang.String pNameToModify, java.lang.String modifyValue)
           Updates the value of a parameter in a line.
 void updateParamValue(java.lang.String commandCode, java.lang.String accessID, java.lang.String msgPayLoad, boolean isValid, int lineType, java.lang.String uniquePName, java.lang.String uniquePValue, java.lang.String pNameToModify, java.lang.String modifyValue)
           Updates the value of a parameter in a line.
 void updateParamValue(java.lang.String ipAddress, java.lang.String port, java.lang.String autoCode, java.lang.String alarmDescr, int lineType, java.lang.String uniquePName, java.lang.String uniquePValue, java.lang.String pNameToModify, java.lang.String modifyValue)
           Updates the value of a parameter in a line.
 void updateParamValue(java.lang.String ipAddress, java.lang.String port, java.lang.String commandCode, java.lang.String accessID, java.lang.String msgPayLoad, boolean isValid, int lineType, java.lang.String uniquePName, java.lang.String uniquePValue, java.lang.String pNameToModify, java.lang.String modifyValue)
           Updates the value of a parameter in a line.
 void updateScriptFile(java.lang.String command, java.lang.String scriptFile, java.lang.String modeis)
          This method uploads the new ScriptFile for the given command -Applicable Only in IOS Devices.
 void updateValue(java.lang.String objectId, java.lang.String instance, java.lang.String value)
           Updates the value of a scalar or a columnar node The node being updated here will be assigned a simulation type of CONST
 void updateValue(java.lang.String objectId, java.lang.String instance, java.lang.String value, java.lang.String simType)
          Update the value of a scalar or a columnar node with a particular simulation type
 void updateValue(java.lang.String ipAddress, java.lang.String port, java.lang.String objectId, java.lang.String instance, java.lang.String value, java.lang.String simType)
          Updates the simtype & value of mib node
 boolean upInterface(java.lang.String ifIndex)
          This method is used to activate the given interface of the SNMP Agent.The interface will be activated only when the SNMP Agent is running.
 boolean upInterface(java.lang.String ipAddress, int port, java.lang.String ifIndex)
          This method is used to activate the interface IPAddress for an SNMP agent with IP Address and Port from the currently selected network in the Network Desginer.The interface will be activated only when the SNMP agent is running.
 boolean uploadFile(java.lang.String ipAddress, int port, java.lang.String source, java.lang.String target, int mode, java.lang.String protocol)
          The method will execute the command from source to target in binary or ascii mode.
 boolean uploadFile(java.lang.String ipAddress, int port, java.lang.String source, java.lang.String target, int mode, java.lang.String protocol, java.lang.String userName, java.lang.String password)
          The method will execute the command from source to target in binary or ascii mode.
 

Method Detail

updateValue

public void updateValue(java.lang.String objectId,
                        java.lang.String instance,
                        java.lang.String value)

Updates the value of a scalar or a columnar node The node being updated here will be assigned a simulation type of CONST

Parameters:
objectId - is the object identifier (without the instance) of the mib node whose value has to be updated
instance - is the instance of the node for which the value should be updated, for scalar nodes this should be ".0"
value - is the value to be assigned to the node

For e.g.
To update the value of the variable ' ifAdminStatus ' to 3 enter the following line in the script file
scriptinterface.updateValue(".1.3.6.1.2.1.2.2.1.7",".1","3")
where .1.3.6.1.2.1.2.2.1.7.1 is the object identifier of the node ifAdminStatus with instance .1 and 3 is the value to be updated


updateValue

public void updateValue(java.lang.String objectId,
                        java.lang.String instance,
                        java.lang.String value,
                        java.lang.String simType)
Update the value of a scalar or a columnar node with a particular simulation type

Parameters:
objectId - is the object identifier (without the instance) of the mib node whose value has to be updated
instance - is the instance of the node for which the value should be updated, for scalar nodes this should be ".0"
value - is the value to be assigned to the node. value should be given according to the simulation type
simType - is the type of simulation required. This should be one of the following

CONST - This would constantly respond with the given value
RANDOM - value should be in the format startingRange..endingRange (dots are included)
EXPONENTIAL - value should in the format "a|b" for the equation [y = a * e ^ ( b * x )]
WAVE - The wave type is generated using the formula [y = a * cos ( w * t ) ] the required input values are a and w
LINEAR - The Linear type is generated using the formula [y = m * x + c ] the required input values being m and c
SIN WAVE : The sine wave would generate using the formula [a * sin ( w * t )] the required input values would be a and w

For e.g.
scriptinterface.updateValue(".1.3.6.1.2.1.11.2",".0","400..500","RANDOM")
scriptinterface.updateValue(".1.3.6.1.2.1.11.3",".0","100|32","WAVE")
scriptinterface.updateValue(".1.3.6.1.2.1.11.4",".0","100|80","LINEAR")
scriptinterface.updateValue(".1.3.6.1.2.1.11.5",".0","400|30","SIN_WAVE")


insertRow

public void insertRow(java.lang.String tableOid,
                      java.lang.String[] objectId,
                      java.lang.String[] values,
                      java.lang.String[] simTypes)
Inserts a row in a table

Parameters:
tableOid - - the object identifier of the table in which the row has to be added
objectId - - A string array of object identifiers (object id of the columns in the table)
values - - A string array of values for the above given columns
simTypes - - A string array of simulation types for the above columns. This should be one of the following
CONST - This would constantly respond with the given value
RANDOM - value should be in the format startingRange..endingRange (dots are included)
EXPONENTIAL - value should in the format "a|b" for the equation [y = a * e ^ ( b * x )]
WAVE - The wave type is generated using the formula [y = a * cos ( w * t ) ] the required input values are a and w
LINEAR - The Linear type is generated using the formula [y = m * x + c ] the required input values being m and c
SIN WAVE : The sine wave would generate using the formula [a * sin ( w * t )] the required input values would be a and w

The objectId array should contain the object id of only those columns for which the user is interested in specifying a value. The rest of the columns in the table will be assigned default simulated values. Please note that the index columns are an exception and values for all the index columns have to be given

For e.g.
if an entry has to be added in the 'ifTable' but all the columns can be assigned default values then
objectid = array([".1.3.6.1.2.1.2.2.1.1"],String)
simtypes = array(["CONST"],String)
values = array(["3"],String)
scriptinterface.insertRow(".1.3.6.1.2.1.2.2",objectid,values,simtypes)
This will insert a row in the ifTable with the instance as ".3" and default values for all the columns


deleteRow

public void deleteRow(java.lang.String tableEntryOid,
                      java.lang.String instance)
Deletes a row with the specified instance from the table

Parameters:
tableEntryOid - is the Object Id of the table entry node
instance - is the instance of the entry to be deleted

For e.g. To delete the entry with instance ".1" from the ifTable specify the following line in the script file
scriptinterface.deleteRow(".1.3.6.1.2.1.2.2.1",".1")
where .1.3.6.1.2.1.2.2.1 is the object id of the ifEntry node and ".1" is the instance to be deleted


deleteAllRows

public void deleteAllRows(java.lang.String tableEntryOid)
Deletes all the rows in the table

Parameters:
tableEntryOid - is the Object Id of the table entry node

For e.g.
To delete all the entries in the 'ifTable' specify the following line in the script file
scriptinterface.deleteAllRows(".1.3.6.1.2.1.2.2.1")
where .1.3.6.1.2.1.2.2.1 is the object id of the ifEntry node


deleteRowWithValue

public void deleteRowWithValue(java.lang.String tableEntryOid,
                               java.lang.String columnName,
                               java.lang.String value)
Deletes the specified row in the table which will match with the column value specified

Parameters:
tableEntryOid - is the Object Id of the table entry node
columnName - is the name of the column in the table
value - is the value to be mathched with the value present in the column.

For e.g.
To delete the entry in the 'ifTable' having value 'descr' for the ifDescr column specify the following line in the script file
scriptinterface.deleteRowWithValue(".1.3.6.1.2.1.2.2.1","ifDescr","descr")
where .1.3.6.1.2.1.2.2.1 is the object id of the ifEntry node


deleteRowWithValue

public void deleteRowWithValue(java.lang.String ipAddress,
                               java.lang.String snmpPort,
                               java.lang.String tableEntryOid,
                               java.lang.String columnName,
                               java.lang.String value)
Deletes the specified row in the table which will match with the column value specified in the specified device.

Parameters:
ipAddress - is the ipAddress of the device
snmpPort - is the snmp port
tableEntryOid - is the Object Id of the table entry node
columnName - is the name of the column in the table
value - is the value to be mathched with the value present in the column.

For e.g.
To delete the entry in the 'ifTable' having value 'descr' for the ifDescr column specify the following line in the script file
scriptinterface.deleteRowWithValue("21.1.1.1","8001",".1.3.6.1.2.1.2.2.1","ifDescr","descr")
where .1.3.6.1.2.1.2.2.1 is the object id of the ifEntry node


getAllTableValues

public java.util.Hashtable getAllTableValues(java.lang.String tableEntryOid)
Get all the table values in the table.

Parameters:
tableEntryOid - is the Object Id of the table Entry node

For e.g.
To get all the values in the table specify the following details in the script file
scriptinterface.getAllTableValues(".1.3.6.1.2.1.2.2.1")
where .1.3.6.1.2.1.2.2.1 is the table entry oid of the ifTable ( oid of ifEntry node )


getAllTableValues

public java.util.Hashtable getAllTableValues(java.lang.String ipAddress,
                                             java.lang.String port,
                                             java.lang.String tableEntryOid)
Get all the table values in the table.

Parameters:
tableEntryOid - is the Object Id of the table Entry node
ipAddress - is the ipAddress of the device
port - - the port at which the agent is running

For e.g.
To get all the values in the table specify the following details in the script file
scriptinterface.getAllTableValues("192.168.1.129","8002",".1.3.6.1.2.1.2.2.1")
where .1.3.6.1.2.1.2.2.1 is the table entry oid of the ifTable ( oid of ifEntry node )


getRowCount

public int getRowCount(java.lang.String tableOid)

Gets the total number of rows in a table.If the agent is not running it returns -1.


getInstances

public java.util.Vector getInstances(java.lang.String tableOid)

Gets all the instances in a table


getNextInstance

public java.lang.String getNextInstance(java.lang.String tableOid,
                                        java.lang.String instance)

Gets the instance next to the specified instance

Parameters:
instance - - the instance value For e.g.
To get the instance next to '.3' in ifTable
scriptinterface.getNextInstance(".1.3.6.1.2.1.2.2",".3")

maskNode

public void maskNode(java.lang.String objectId,
                     java.lang.String instance,
                     java.lang.String maskValue)
Masks a node from the manager

Parameters:
objectId - is the object identifier (without the instance) of the mib node
instance - is the instance of the node that should be masked, for scalar nodes this should be ".0"
maskValue - can be either "True" or "False"

For e.g.
To enable the mask for the scalar node 'sysName'
scriptinterface.maskNode(".1.3.6.1.2.1.1.5",".0","True")
To disable the mask for the node 'ifAdminStatus' for the instance '.1'
scriptinterface.maskNode(".1.3.6.1.2.1.2.2.1.7",".1","False")


getNodeValue

public java.lang.String getNodeValue(java.lang.String objectId,
                                     java.lang.String instance)
Gets the current value of a MIB node

Parameters:
objectId - is the object identifier (without the instance) of the mib node This will return the value as a String
instance - is the instance of the node whose value should be obtained, for scalar nodes this should be ".0"

For e.g.
To get the current value of the counter 'snmpInPkts' include the following lines in the script file
value = scriptinterface.getNodeValue(".1.3.6.1.2.1.11.1",".0")
print "Value of SnmpInPkts is = ",value


getTotalColumns

public int getTotalColumns(java.lang.String ipAddress,
                           java.lang.String port,
                           java.lang.String tableEntryOid)
This method will return the total number of columns of a particular table.If the oid specified is not a table Entry Oid , -1 will be returned.

Parameters:
ipAddress - is the ipAddress of the device
port - - the port at which the agent is running
tableEntryOid - The oid of the tableEntry node

getAllColumnByNames

public java.lang.String[] getAllColumnByNames(java.lang.String ipAddress,
                                              java.lang.String port,
                                              java.lang.String tableEntryOid)
This method will return all the columnar node names of a particular table, in a String array

Parameters:
ipAddress - is the ipAddress of the device
port - - the port at which the agent is running
tableEntryOid - The oid of the tableEntry node

getAllColumnByOids

public java.lang.String[] getAllColumnByOids(java.lang.String ipAddress,
                                             java.lang.String port,
                                             java.lang.String tableEntryOid)
This method will return all the columnar node OIDs of a particular table, in a String array

Parameters:
ipAddress - is the ipAddress of the device
port - - the port at which the agent is running
tableEntryOid - The oid of the tableEntry node

getAllIndices

public java.lang.String[] getAllIndices(java.lang.String ipAddress,
                                        java.lang.String port,
                                        java.lang.String tableEntryOid)
This method will return all the index column name of a particular table, in a String array

Parameters:
ipAddress - is the ipAddress of the device
port - - the port at which the agent is running
tableEntryOid - The oid of the tableEntry node

sendV1Trap

public void sendV1Trap(java.lang.String mgrName,
                       int mgrPort,
                       java.lang.String community,
                       java.lang.String enterpriseOid,
                       int genericType,
                       int specificType)
Sends a V1 Trap with no varbinds

Parameters:
mgrName - - the name of the manager to which the trap has to be sent
mgrPort - - the port at which the manager is listening for incoming traps
community - - the snmp community
enterpriseOid - - the Enterprise OID
genericType - - the Generic Type
specificType - - the Specific Type

For e.g.
scriptinterface.sendV1Trap("localhost",162,"public",".1.3.6.1.4.1.2162.4.1.1",6,3)


sendV1Trap

public void sendV1Trap(java.lang.String mgrName,
                       int mgrPort,
                       java.lang.String community,
                       java.lang.String enterpriseOid,
                       int genericType,
                       int specificType,
                       java.lang.String[] varbindOid,
                       java.lang.String[] varbindTypes,
                       java.lang.String[] varbindValues)
Sends a V1 Trap with varbinds

Parameters:
mgrName - - the name of the manager to which the trap has to be sent
mgrPort - - the port at which the manager is listening for incoming traps
community - - the snmp community
enterpriseOid - - the Enterprise OID
genericType - - the Generic Type
specificType - - the Specific Type
varbindOid - - a string array giving the objectid of the varbinds to be sent with the trap
varbindValues - - a string array giving the values for the above specified varbinds
varbindTypes - - a string array giving the type of the above specified varbind. This should be one of the following :
String
BitString
IPAddress
ObjectIdentifier
Integer
Counter
Counter64
TimeTicks
Gauge

For e.g.
objectid = array([".1.3.6.1.2.1.1.4.0",".1.3.6.1.2.1.1.5.0",".1.3.6.1.2.1.1.7.0"],String)
nodetypes = array(["String","String","Integer"],String)
values = array(["aaaa","lucy","3"],String)
scriptinterface.sendV1Trap("localhost",162,"public",".1.3.6.1.4.1.2162.4.1.1",6,3,objectid,nodetypes,values)


sendV2Trap

public void sendV2Trap(java.lang.String mgrName,
                       int mgrPort,
                       java.lang.String community,
                       java.lang.String trapOID)
Sends a v2 Trap without any extra varbinds

Parameters:
mgrName - - the name of the manager to which the trap has to be sent
mgrPort - - the port at which the manager is listening for incoming traps
community - - the snmp community
trapOID - - the value for the SnmpTrapOid

For e.g.
scriptinterface.sendV2Trap("localhost",162,"public",".1.3.6.1.4.1.2162.4.1.1")


sendV2Trap

public void sendV2Trap(java.lang.String mgrName,
                       int mgrPort,
                       java.lang.String community,
                       java.lang.String trapOID,
                       java.lang.String[] varbindOid,
                       java.lang.String[] varbindTypes,
                       java.lang.String[] varbindValues)
Sends a v2 Trap with extra varbinds

Parameters:
mgrName - - the name of the manager to which the trap has to be sent
mgrPort - - the port at which the manager is listening for incoming traps
community - - the snmp community
trapOID - - the value for the SnmpTrapOid
varbindOid - - a string array giving the objectid of the varbinds to be sent with the trap
varbindValues - - a string array giving the values for the above specified varbinds
varbindTypes - - a string array giving the type of the above specified varbind. This should be one of the following :
String
BitString
IPAddress
ObjectIdentifier
Integer
Counter
Counter64
TimeTicks
Gauge

For e.g.
objectid = array([".1.3.6.1.2.1.1.4.0",".1.3.6.1.2.1.1.5.0",".1.3.6.1.2.1.1.7.0"],String)
nodetypes = array(["String","String","Integer"],String)
values = array(["sys-admin","test","3"],String)
scriptinterface.sendV2Trap(mgrName,mgrPort,community,trapOID,objectid,nodetypes,values)


sendV3Trap

public void sendV3Trap(java.lang.String mgrName,
                       int mgrPort,
                       java.lang.String community,
                       java.lang.String enterpriseOID,
                       java.lang.String userName,
                       java.lang.String contextName)
Sends a v3 Trap without varbinds

Parameters:
mgrName - - the name of the manager to which the trap has to be sent
mgrPort - - the port at which the manager is listening for incoming traps
community - - the snmp community
userName - - the snmp v3 user
contextName - - the context For e.g.
scriptinterface.sendV3Trap("localhost",3000,"public",".1.3.6.1.6.3.1.1.4.1","noAuthUser","noAuth")

sendV3Trap

public void sendV3Trap(java.lang.String mgrName,
                       int mgrPort,
                       java.lang.String community,
                       java.lang.String enterpriseOID,
                       java.lang.String userName,
                       java.lang.String contextName,
                       java.lang.String[] varbindOid,
                       java.lang.String[] varbindTypes,
                       java.lang.String[] varbindValues)
Sends a v3 Trap with varbinds

Parameters:
mgrName - - the name of the manager to which the trap has to be sent
mgrPort - - the port at which the manager is listening for incoming traps
community - - the snmp community
userName - - the snmp v3 user
contextName - - the context
varbindOid - - a string array giving the objectid of the varbinds to be sent with the trap
varbindValues - - a string array giving the values for the above specified varbinds
varbindTypes - - a string array giving the type of the above specified varbind. This should be one of the following :
String
BitString
IPAddress
ObjectIdentifier
Integer
Counter
Counter64
TimeTicks
Gauge

For e.g.
objectid = array([".1.3.6.1.2.1.1.4.0",".1.3.6.1.2.1.1.5.0",".1.3.6.1.2.1.1.7.0"],String)
nodetypes = array(["String","String","Integer"],String)
values = array(["sys-admin","test","3"],String)
scriptinterface.sendV3Trap("localhost",3000,"public",".1.3.6.1.6.3.1.1.4.1","noAuthUser","noAuth",objectid,nodetypes,values)


modifyTimerScriptParameters

public boolean modifyTimerScriptParameters(java.lang.String ipAddress,
                                           int port,
                                           java.lang.String scriptFile,
                                           java.lang.String date,
                                           long timerInterval,
                                           int noOfTimes)
This method is used to modify timer parameters for Timer Scripts in the SNMP agent with IP Address and Port from the currently selected network in the Network Desginer.

Parameters:
ipAddress - - IP Address of the SNMP agent in which parameters for timer scripts have to be modified
port - - Port of the SNMP agent in which parameters for timer scripts have to be modified
scriptFile - - The name of the script file to be modified.
date - - The time at which the script to be executed.
timerInterval - - The interval in milliseconds at which the script should be executed
noOfTimes - - The number of times the scriptFile should be executed
Returns:
returns true if the parameters for Timer Scripts are modified , false otherwise

modifyTimerScriptParameters

public boolean modifyTimerScriptParameters(java.lang.String scriptFile,
                                           java.lang.String date,
                                           long timerInterval,
                                           int noOfTimes)
This method is used to modify timer parameters for Timer Scripts in the SNMP agent with IP Address and Port from the currently selected network in the Network Desginer.

Parameters:
scriptFile - - The name of the script file to be modified.
date - - The time at which the script to be executed.
timerInterval - - The interval in milliseconds at which the script should be executed
noOfTimes - - The number of times the scriptFile should be executed
Returns:
returns true if the parameters for Timer Scripts are modified , false otherwise

sendInform

public void sendInform(java.lang.String mgrName,
                       java.lang.String mgrPort,
                       java.lang.String community,
                       java.lang.String sysUpTime,
                       java.lang.String snmpTrapOid)
Sends an inform request without varbinds

Parameters:
mgrName - - the name of the manager to which the inform has to be sent
mgrPort - - the port at which the manager is listening for incoming inform requests
community - - the snmp community
sysUpTime - - the System UpTime
snmpTrapOid - - the value of the snmpTrapOid

For e.g.
scriptinterface.sendInform("localhost","3000","public","10000",".1.3.6.1.6.3.1.1.4.1")


sendInform

public void sendInform(java.lang.String mgrName,
                       java.lang.String mgrPort,
                       java.lang.String community,
                       java.lang.String sysUpTime,
                       java.lang.String snmpTrapOid,
                       java.lang.String[] varbindOid,
                       java.lang.String[] varbindTypes,
                       java.lang.String[] varbindValues)
Sends an inform request with varbinds

Parameters:
mgrName - - the name of the manager to which the inform has to be sent
mgrPort - - the port at which the manager is listening for incoming inform requests
community - - the snmp community
sysUpTime - - the System UpTime
snmpTrapOid - - the value of the snmpTrapOid
varbindOid - - a string array giving the objectid of the varbinds to be sent with the inform
varbindValues - - a string array giving the values for the above specified varbinds
varbindTypes - - a string array giving the type of the above specified varbind. This should be one of the following :
String
BitString
IPAddress
ObjectIdentifier
Integer
Counter
Counter64
TimeTicks
Gauge

For e.g.
objectid = array([".1.3.6.1.2.1.1.4.0",".1.3.6.1.2.1.1.5.0",".1.3.6.1.2.1.1.7.0"],String)
nodetypes = array(["String","String","Integer"],String)
values = array(["sys-admin","test","3"],String)
scriptinterface.sendInform(mgrName,mgrPort,community,sysUpTime,snmpTrapOid,objectid,nodetypes,values)


sendV2Inform

public void sendV2Inform(java.lang.String mgrName,
                         int mgrPort,
                         java.lang.String community,
                         java.lang.String informOID)
Sends a v2 Inform without any extra varbinds

Parameters:
mgrName - - the name of the manager to which the inform has to be sent
mgrPort - - the port at which the manager is listening for incoming inform
community - - the snmp community
informOID - - the value for the InformTrapOid

For e.g.
scriptinterface.sendV2Inform("localhost",162,"public",".1.3.6.1.4.1.2162.4.1.1")


sendV2Inform

public void sendV2Inform(java.lang.String agentAddress,
                         int agentPort,
                         java.lang.String mgrName,
                         int mgrPort,
                         java.lang.String community,
                         java.lang.String informOID)
Sends a v2 Inform without any extra varbinds

Parameters:
agentAddress - - the name of the Agent from which the inform has to come
agentPort - - the port from which the Agent is sending inform
mgrName - - the name of the manager to which the inform has to be sent
mgrPort - - the port at which the manager is listening for incoming inform
community - - the snmp community
informOID - - the value for the InformTrapOid

For e.g.
scriptinterface.sendV2Inform("1.1.1.1", 8001, "localhost",162,"public",".1.3.6.1.4.1.2162.4.1.1")


sendV2Inform

public void sendV2Inform(java.lang.String mgrName,
                         int mgrPort,
                         java.lang.String community,
                         java.lang.String trapOID,
                         java.lang.String[] varbindOid,
                         java.lang.String[] varbindTypes,
                         java.lang.String[] varbindValues)
Sends a v2 Inform with extra varbinds

Parameters:
mgrName - - the name of the manager to which the inform has to be sent
mgrPort - - the port at which the manager is listening for incoming inform
community - - the snmp community
varbindOid - - a string array giving the objectid of the varbinds to be sent with the trap
varbindValues - - a string array giving the values for the above specified varbinds
varbindTypes - - a string array giving the type of the above specified varbind. This should be one of the following :
String
BitString
IPAddress
ObjectIdentifier
Integer
Counter
Counter64
TimeTicks
Gauge

For e.g.
objectid = array([".1.3.6.1.2.1.1.4.0",".1.3.6.1.2.1.1.5.0",".1.3.6.1.2.1.1.7.0"],String)
nodetypes = array(["String","String","Integer"],String)
values = array(["sys-admin","test","3"],String)
scriptinterface.sendV2Inform(mgrName,mgrPort,community,trapOID,objectid,nodetypes,values)


sendV2Inform

public void sendV2Inform(java.lang.String agentAddress,
                         int agentPort,
                         java.lang.String mgrName,
                         int mgrPort,
                         java.lang.String community,
                         java.lang.String trapOID,
                         java.lang.String[] varbindOid,
                         java.lang.String[] varbindTypes,
                         java.lang.String[] varbindValues)
Sends a v2 Inform with extra varbinds

Parameters:
agentAddress - - the name of the Agent from which the inform has to come
agentPort - - the port from which the Agent is sending inform
mgrName - - the name of the manager to which the inform has to be sent
mgrPort - - the port at which the manager is listening for incoming inform
community - - the snmp community
varbindOid - - a string array giving the objectid of the varbinds to be sent with the trap
varbindValues - - a string array giving the values for the above specified varbinds
varbindTypes - - a string array giving the type of the above specified varbind. This should be one of the following :
String
BitString
IPAddress
ObjectIdentifier
Integer
Counter
Counter64
TimeTicks
Gauge

For e.g.
objectid = array([".1.3.6.1.2.1.1.4.0",".1.3.6.1.2.1.1.5.0",".1.3.6.1.2.1.1.7.0"],String)
nodetypes = array(["String","String","Integer"],String)
values = array(["sys-admin","test","3"],String)
scriptinterface.sendV2Inform("localhost", 161, mgrName,mgrPort,community,trapOID,objectid,nodetypes,values)


sendV3Inform

public void sendV3Inform(java.lang.String mgrName,
                         int mgrPort,
                         java.lang.String community,
                         java.lang.String enterpriseOID,
                         java.lang.String userName,
                         java.lang.String contextName)
Sends a v3 Inform without varbinds

Parameters:
mgrName - - the name of the manager to which the inform has to be sent
mgrPort - - the port at which the manager is listening for incoming inform
community - - the snmp community
userName - - the snmp v3 user
contextName - - the context For e.g.
scriptinterface.sendV3Inform("public",".1.3.6.1.6.3.1.1.4.1","noAuthUser","noAuth")

sendV3Inform

public void sendV3Inform(java.lang.String agentAddress,
                         int agentPort,
                         java.lang.String mgrName,
                         int mgrPort,
                         java.lang.String community,
                         java.lang.String enterpriseOID,
                         java.lang.String userName,
                         java.lang.String contextName)
Sends a v3 Inform without varbinds

Parameters:
agentAddress - - the name of the Agent from which the inform has to come
agentPort - - the port from which the Agent is sending inform
mgrName - - the name of the manager to which the inform has to be sent
mgrPort - - the port at which the manager is listening for incoming inform
community - - the snmp community
userName - - the snmp v3 user
contextName - - the context For e.g.
scriptinterface.sendV3Inform("public",".1.3.6.1.6.3.1.1.4.1","noAuthUser","noAuth")

sendV3Inform

public void sendV3Inform(java.lang.String mgrName,
                         int mgrPort,
                         java.lang.String community,
                         java.lang.String enterpriseOID,
                         java.lang.String userName,
                         java.lang.String contextName,
                         java.lang.String[] varbindOid,
                         java.lang.String[] varbindTypes,
                         java.lang.String[] varbindValues)
Sends a v3 Trap with varbinds

Parameters:
mgrName - - the name of the manager to which the inform has to be sent
mgrPort - - the port at which the manager is listening for incoming inform
community - - the snmp community
userName - - the snmp v3 user
contextName - - the context
varbindOid - - a string array giving the objectid of the varbinds to be sent with the trap
varbindValues - - a string array giving the values for the above specified varbinds
varbindTypes - - a string array giving the type of the above specified varbind. This should be one of the following :
String
BitString
IPAddress
ObjectIdentifier
Integer
Counter
Counter64
TimeTicks
Gauge

For e.g.
objectid = array([".1.3.6.1.2.1.1.4.0",".1.3.6.1.2.1.1.5.0",".1.3.6.1.2.1.1.7.0"],String)
nodetypes = array(["String","String","Integer"],String)
values = array(["sys-admin","test","3"],String)
scriptinterface.sendV3Inform("localhost",3000,"public",".1.3.6.1.6.3.1.1.4.1","noAuthUser","noAuth",objectid,nodetypes,values)


sendV3Inform

public void sendV3Inform(java.lang.String agentAddress,
                         int agentPort,
                         java.lang.String mgrName,
                         int mgrPort,
                         java.lang.String community,
                         java.lang.String enterpriseOID,
                         java.lang.String userName,
                         java.lang.String contextName,
                         java.lang.String[] varbindOid,
                         java.lang.String[] varbindTypes,
                         java.lang.String[] varbindValues)
Sends a v3 Inform with varbinds

Parameters:
agentAddress - - the name of the Agent from which the inform has to come
agentPort - - the port from which the Agent is sending inform
mgrName - - the name of the manager to which the inform has to be sent
mgrPort - - the port at which the manager is listening for incoming inform
community - - the snmp community
userName - - the snmp v3 user
contextName - - the context
varbindOid - - a string array giving the objectid of the varbinds to be sent with the trap
varbindValues - - a string array giving the values for the above specified varbinds
varbindTypes - - a string array giving the type of the above specified varbind. This should be one of the following :
String
BitString
IPAddress
ObjectIdentifier
Integer
Counter
Counter64
TimeTicks
Gauge

For e.g.
objectid = array([".1.3.6.1.2.1.1.4.0",".1.3.6.1.2.1.1.5.0",".1.3.6.1.2.1.1.7.0"],String)
nodetypes = array(["String","String","Integer"],String)
values = array(["sys-admin","test","3"],String)
scriptinterface.sendV3Inform("localhost", 161, "localhost",3000,"public",".1.3.6.1.6.3.1.1.4.1","noAuthUser","noAuth",objectid,nodetypes,values)


getErrStat

public java.lang.String getErrStat()
Gets the errStat value of the response to the Inform Request

Returns:
the errStat value as a String

getErrIndex

public java.lang.String getErrIndex()
Gets the errIndex of the response to the Inform Request

Returns:
the errIndex value as a String

maskNode

public void maskNode(java.lang.String ipAddress,
                     java.lang.String port,
                     java.lang.String objectId,
                     java.lang.String instance,
                     java.lang.String maskValue)
Masks a node from the manager

Parameters:
ipAddress - is the agent address
port - is the agent port
See Also:
ScriptInterface#maskNode(String objectId,String instance,String maskValue)

deleteRow

public void deleteRow(java.lang.String ipAddress,
                      java.lang.String port,
                      java.lang.String tableEntryOid,
                      java.lang.String instance)
Deletes a row with the specified instance from the table

Parameters:
ipAddress - is the agent address
port - is the agent port
See Also:
ScriptInterface#deleteRow(String tableEntryOid,String instance)

deleteAllRows

public void deleteAllRows(java.lang.String ipAddress,
                          java.lang.String port,
                          java.lang.String tableEntryOid)
Deletes all rows in the table

Parameters:
ipAddress - is the agent address
port - is the agent port
See Also:
ScriptInterface#deleteAllRows(String tableEntryOid)

updateNodeValue

public void updateNodeValue(java.lang.String ipAddress,
                            java.lang.String port,
                            java.lang.String objectId,
                            java.lang.String instance,
                            java.lang.String value)
Updates the value of mib node

Parameters:
ipAddress - is the agent address
port - is the agent port
objectId - is the object identifier (including the instance) of the mib node whose value has to be updated
value - is the value to be assigned to the node
See Also:
ScriptInterface#updateValue(String objectId,String instance,String value)

updateValue

public void updateValue(java.lang.String ipAddress,
                        java.lang.String port,
                        java.lang.String objectId,
                        java.lang.String instance,
                        java.lang.String value,
                        java.lang.String simType)
Updates the simtype & value of mib node

Parameters:
ipAddress - is the agent address
port - is the agent port
See Also:
ScriptInterface#updateValue(String objectId,String instance,String value,String simType)

getNodeValue

public java.lang.String getNodeValue(java.lang.String ipAddress,
                                     java.lang.String port,
                                     java.lang.String objectId,
                                     java.lang.String instance)
Gets the current value of a MIB node

Parameters:
ipAddress - is the agent address
port - is the agent port
See Also:
ScriptInterface#getNodeValue(String objectId,String instance)

insertRow

public void insertRow(java.lang.String ipAddress,
                      java.lang.String port,
                      java.lang.String tableOid,
                      java.lang.String[] objectId,
                      java.lang.String[] values,
                      java.lang.String[] simTypes)
Inserts a row in a table

Parameters:
ipAddress - is the agent address
port - is the agent port
See Also:
ScriptInterface#insertRow(String tableOid,String[] objectId,String[] values,String[] simTypes)

getRowCount

public int getRowCount(java.lang.String ipAddress,
                       java.lang.String port,
                       java.lang.String tableOid)
Gets the total number of rows in a table

Parameters:
ipAddress - is the agent address
port - is the agent port
See Also:
ScriptInterface#getRowCount(String tableOid)

getInstances

public java.util.Vector getInstances(java.lang.String ipAddress,
                                     java.lang.String port,
                                     java.lang.String tableOid)
Gets all the instances in a table

Parameters:
ipAddress - is the agent address
port - is the agent port
See Also:
ScriptInterface#getInstances(String tableOid)

getNextInstance

public java.lang.String getNextInstance(java.lang.String ipAddress,
                                        java.lang.String port,
                                        java.lang.String tableOid,
                                        java.lang.String instance)
Gets the instance next to the specified instance

Parameters:
ipAddress - is the agent address
port - is the agent port
See Also:
ScriptInterface#getNextInstance(String tableOid,String instance)

getCurrentOID

public java.lang.String getCurrentOID()

Gets the current OID

Returns:
- returns the OID


getCurrentColumn

public int getCurrentColumn()
> Gets the current column i.e. the column number in the incoming OID

Returns:
- returns the column number


getCurrentInstance

public java.lang.String getCurrentInstance()

Gets the current instance i.e. the instance in the incoming OID

Returns:
- returns the instance


getRequestType

public int getRequestType()

Gets the request type *

Returns:
- 0 for getRequest - 1 for getNextRequest - 2 for setRequest


getScriptConditionForSnmpAgent

public int getScriptConditionForSnmpAgent()

Gets the condition for the script in execution. The condition can be before request or after request. The values returned will be any of the following : 0 - Before request 1 - After request

Returns:
the condition of the script

See Also:
examples/scripting/snmp/GetScriptCondition.py file.

getSnmpIPAddress

public java.lang.String getSnmpIPAddress()

Gets the IP Address of the agent for which the request has come

Returns:
- IP Address of the agent


getIPAddress

public java.lang.String getIPAddress()

Gets the IP Address of the agent for which the request has come

Returns:
- IP Address of the agent


getSnmpPort

public int getSnmpPort()

Gets the port at which the agent is running

Returns:
- Agent's port


getCurrentValue

public java.lang.String getCurrentValue()

Gets the current value i.e. the value in the incoming Set Request

Returns:
- returns the value


terminateOperation

public void terminateOperation(int errorNumber)

Terminates the current operation i.e. it terminates a Get, GetNext, Set operation

Parameters:
errorNumber - - the error to be thrown after terminating the operation. Should be a number between 0 and 7

case 0 - "too big" case 1 - "no such object" case 2 - "no such instance" case 3 - "end of mib view" case 4 - "bad value" case 5 - "read only" case 6 - "general error" case 7 - "no access"

For e.g.
To terminate the Get request on sysContact and return "general error" configure a script with the condition "Before Processing Get" on sysContact and enter the following line in the script
scriptinterface.terminateOperation(6)


startAgent

public boolean startAgent(java.lang.String uniqueName)
Describe registerToRMI method here. This method is to register the RMI interface Object AgentSimulatorListener. This method call be called at a startUp Script, so that the simulator registers its object reference to the RMI Registry.


stopAgent

public boolean stopAgent(java.lang.String uniqueName)

getSnmpOidForNodeName

public java.lang.String getSnmpOidForNodeName(java.lang.String nodeName)
This method will return the SNMP OID for the node name

Parameters:
nodeName - The nodeName of the SNMP node
Returns:
- returns the String OID of the nodeName .

getSnmpOidForNodeName

public java.lang.String getSnmpOidForNodeName(java.lang.String ipAddress,
                                              int port,
                                              java.lang.String nodeName)
This method will return the SNMP OID for the node name

Parameters:
nodeName - The nodeName of the SNMP node
Returns:
- returns the String OID of the nodeName .

getTotalColumns

public int getTotalColumns(java.lang.String tableEntryOid)
This method will return the total number of columns of a particular table.If the oid specified is not a table Entry Oid , -1 will be returned.

Parameters:
tableEntryOid - The oid of the tableEntry node

getAllColumnByNames

public java.lang.String[] getAllColumnByNames(java.lang.String tableEntryOid)
This method will return all the columnar node names of a particular table, in a String array

Parameters:
tableEntryOid - The oid of the tableEntry node

getAllColumnByOids

public java.lang.String[] getAllColumnByOids(java.lang.String tableEntryOid)
This method will return all the columnar node OIDs of a particular table, in a String array

Parameters:
tableEntryOid - The oid of the tableEntry node

getAllIndices

public java.lang.String[] getAllIndices(java.lang.String tableEntryOid)
This method will return all the index column name of a particular table, in a String array

Parameters:
tableEntryOid - The oid of the tableEntry node

sendTrap

public void sendTrap(java.lang.String associatedVariable)
This method will send the trap corresponding to the associated variable specified

Parameters:
associatedVariable - The associated variable name corresponding to the trap configured inside the trap configuration ui in simulator

sendTrap

public void sendTrap(java.lang.String trapName,
                     java.lang.String enterpriseOID)
This method will send the trap corresponding to the associated variable with enterpriseOID specified.

Parameters:
enterpriseOID - is the enterpriseOID of to be sent in trap pdu

sendTrap

public void sendTrap(java.lang.String associatedVariable,
                     java.lang.String ipAddress,
                     java.lang.String snmpPort)

getCurrentOIDWithInstance

public java.lang.String getCurrentOIDWithInstance()

Gets the current OID with the instance appended to it.

Returns:
- returns the entryOid+columnNo+instance.


getConfigDirectory

public java.lang.String getConfigDirectory()

Gets the current working directory i.e. if MIBs are loaded then it will point out to the latest instance directory and if configuration is loaded then it will point out to the configuration directory

Returns:
- returns the configuration directory name


sendV1Trap

public void sendV1Trap(java.lang.String ipAddress,
                       java.lang.String port,
                       java.lang.String mgrName,
                       int mgrPort,
                       java.lang.String community,
                       java.lang.String enterpriseOid,
                       int genericType,
                       int specificType)
Sends a V1 Trap with no varbinds

Parameters:
ipAddress - is the ipAddress of the device
port - - the port at which the agent is running
mgrName - - the name of the manager to which the trap has to be sent
mgrPort - - the port at which the manager is listening for incoming traps
community - - the snmp community
enterpriseOid - - the Enterprise OID
genericType - - the Generic Type
specificType - - the Specific Type

For e.g.
scriptinterface.sendV1Trap("192.168.1.109", "8001","localhost",162,"public",".1.3.6.1.4.1.2162.4.1.1",6,3)


sendV1Trap

public void sendV1Trap(java.lang.String ipAddress,
                       java.lang.String port,
                       java.lang.String mgrName,
                       int mgrPort,
                       java.lang.String community,
                       java.lang.String enterpriseOid,
                       int genericType,
                       int specificType,
                       java.lang.String[] varbindOid,
                       java.lang.String[] varbindTypes,
                       java.lang.String[] varbindValues)
Sends a V1 Trap with varbinds

Parameters:
ipAddress - is the ipAddress of the device
port - - the port at which the agent is running
mgrName - - the name of the manager to which the trap has to be sent
mgrPort - - the port at which the manager is listening for incoming traps
community - - the snmp community
enterpriseOid - - the Enterprise OID
genericType - - the Generic Type
specificType - - the Specific Type
varbindOid - - a string array giving the objectid of the varbinds to be sent with the trap
varbindValues - - a string array giving the values for the above specified varbinds
varbindTypes - - a string array giving the type of the above specified varbind. This should be one of the following :
String
BitString
IPAddress
ObjectIdentifier
Integer
Counter
Counter64
TimeTicks
Gauge

For e.g.
objectid = array([".1.3.6.1.2.1.1.4.0",".1.3.6.1.2.1.1.5.0",".1.3.6.1.2.1.1.7.0"],String)
nodetypes = array(["String","String","Integer"],String)
values = array(["aaaa","lucy","3"],String)
scriptinterface.sendV1Trap("192.168.1.109", "8001","localhost",162,"public",".1.3.6.1.4.1.2162.4.1.1",6,3,objectid,nodetypes,values)


sendV2Trap

public void sendV2Trap(java.lang.String ipAddress,
                       java.lang.String port,
                       java.lang.String mgrName,
                       int mgrPort,
                       java.lang.String community,
                       java.lang.String trapOID)
Sends a v2 Trap without any extra varbinds

Parameters:
ipAddress - is the ipAddress of the device
port - - the port at which the agent is running
mgrName - - the name of the manager to which the trap has to be sent
mgrPort - - the port at which the manager is listening for incoming traps
community - - the snmp community
trapOID - - the value for the SnmpTrapOid

For e.g.
scriptinterface.sendV2Trap("192.168.1.109", "8001","localhost",162,"public",".1.3.6.1.4.1.2162.4.1.1")


sendV2Trap

public void sendV2Trap(java.lang.String ipAddress,
                       java.lang.String port,
                       java.lang.String mgrName,
                       int mgrPort,
                       java.lang.String community,
                       java.lang.String trapOID,
                       java.lang.String[] varbindOid,
                       java.lang.String[] varbindTypes,
                       java.lang.String[] varbindValues)
Sends a v2 Trap with extra varbinds

Parameters:
ipAddress - is the ipAddress of the device
port - - the port at which the agent is running
mgrName - - the name of the manager to which the trap has to be sent
mgrPort - - the port at which the manager is listening for incoming traps
community - - the snmp community
trapOID - - the value for the SnmpTrapOid
varbindOid - - a string array giving the objectid of the varbinds to be sent with the trap
varbindValues - - a string array giving the values for the above specified varbinds
varbindTypes - - a string array giving the type of the above specified varbind. This should be one of the following :
String
BitString
IPAddress
ObjectIdentifier
Integer
Counter
Counter64
TimeTicks
Gauge

For e.g.
objectid = array([".1.3.6.1.2.1.1.4.0",".1.3.6.1.2.1.1.5.0",".1.3.6.1.2.1.1.7.0"],String)
nodetypes = array(["String","String","Integer"],String)
values = array(["sys-admin","test","3"],String)
scriptinterface.sendV2Trap("192.168.1.109", "8001", mgrName,mgrPort,community,trapOID,objectid,nodetypes,values)


sendV3Trap

public void sendV3Trap(java.lang.String ipAddress,
                       java.lang.String port,
                       java.lang.String mgrName,
                       int mgrPort,
                       java.lang.String community,
                       java.lang.String enterpriseOID,
                       java.lang.String userName,
                       java.lang.String contextName)
Sends a v3 Trap without varbinds

Parameters:
ipAddress - is the ipAddress of the device
port - - the port at which the agent is running
mgrName - - the name of the manager to which the trap has to be sent
mgrPort - - the port at which the manager is listening for incoming traps
community - - the snmp community
userName - - the snmp v3 user
contextName - - the context For e.g.
scriptinterface.sendV3Trap("192.168.1.109", "8001", "localhost",3000,"public",".1.3.6.1.6.3.1.1.4.1","noAuthUser","noAuth")

sendV3Trap

public void sendV3Trap(java.lang.String ipAddress,
                       java.lang.String port,
                       java.lang.String mgrName,
                       int mgrPort,
                       java.lang.String community,
                       java.lang.String enterpriseOID,
                       java.lang.String userName,
                       java.lang.String contextName,
                       java.lang.String[] varbindOid,
                       java.lang.String[] varbindTypes,
                       java.lang.String[] varbindValues)
Sends a v3 Trap with varbinds

Parameters:
ipAddress - is the ipAddress of the device
port - - the port at which the agent is running
mgrName - - the name of the manager to which the trap has to be sent
mgrPort - - the port at which the manager is listening for incoming traps
community - - the snmp community
userName - - the snmp v3 user
contextName - - the context
varbindOid - - a string array giving the objectid of the varbinds to be sent with the trap
varbindValues - - a string array giving the values for the above specified varbinds
varbindTypes - - a string array giving the type of the above specified varbind. This should be one of the following :
String
BitString
IPAddress
ObjectIdentifier
Integer
Counter
Counter64
TimeTicks
Gauge

For e.g.
objectid = array([".1.3.6.1.2.1.1.4.0",".1.3.6.1.2.1.1.5.0",".1.3.6.1.2.1.1.7.0"],String)
nodetypes = array(["String","String","Integer"],String)
values = array(["sys-admin","test","3"],String)
scriptinterface.sendV3Trap("192.168.1.109", "8001", "localhost",3000,"public",".1.3.6.1.6.3.1.1.4.1","noAuthUser","noAuth",objectid,nodetypes,values)


setSnmpCharacterEncoding

public void setSnmpCharacterEncoding(java.lang.String encode)
Sets the character encoding

Parameters:
encode - is the encoding of characters for SNMP agent


ISO8859_1 for English GB2312 for Chinese and ISO-2022-JP for Japanese


getScriptFile

public java.lang.String getScriptFile(java.lang.String command,
                                      java.lang.String modeis)
This method returns the ScriptFile for the given Command -Applicable Only in IOS Devices.

Parameters:
command - - Command for which we require the Script file
modeis - - The mode in which the command is present
Returns:
- returns the Script file if the command is complete For e.g
scriptInterface.getScriptFile("show terminal","enable")

updateScriptFile

public void updateScriptFile(java.lang.String command,
                             java.lang.String scriptFile,
                             java.lang.String modeis)
This method uploads the new ScriptFile for the given command -Applicable Only in IOS Devices.

Parameters:
command - - Command for which the Script file has to be uploaded
scriptFile - - ScriptFile to be uploaded
modeis - - The mode in which the command is present For e.g
scriptInterface.updateScriptFile("show version","show_term.py","enable")

getCurrentCommand

public java.lang.String getCurrentCommand()
This Method will give the current Command which is being executed -Applicable Only in IOS Devices.

Returns:
- returns the current command For e.g
scriptInterface.getCurrentCommand()

getCurrentLevel

public int getCurrentLevel()
This Method gives the level at which the command is executed -Applicable Only in IOS Devices.

Returns:
- returns the current level For e.g
scriptInterface.getCurrentLevel()

changeMode

public void changeMode(int mode)
This Method changes the Mode to the specified level.(However from user mode you can move only to enable mode , which will ask for a password and not all those above it) -Applicable Only in IOS Devices.

Parameters:
mode - - Mode to be changed (Note :Each and every mode is represented using an integer value ) The Integer value for the Modes are : User - 5 Enable - 6 Config - 7 Config-if - 9 Config-rip - 10 Config-line - 11 Config-vlan - 12 Config-bgp - 13 Config-ospf - 14 For e.g
scriptInterface.changeMode(7)

getCmdWord

public java.lang.String getCmdWord(int index)
This Method gives the part of the Command for the given index -Applicable Only in IOS Devices.

Parameters:
index - - Number indicating which part of the command is required.
Returns:
- returns the command at the specified index, If Specified Index exceeds the number of parts in the command , then returns NULL. For e.g
scriptinterface.getcmdWord(2)

updateHost

public void updateHost(java.lang.String name)
This Method updates the host name with the given Name -Applicable Only in IOS Devices.

Parameters:
name - - New Name for the host. For e.g
scriptinterface.updateHost("AdventNet")

getInterfaceStatus

public java.lang.String getInterfaceStatus()
This Method gives what interface is being configured -Applicable Only in IOS Devices.

Returns:
- returns the type of interface being configured . For e.g
scriptinterface.getInterfaceStatus()

getMode

public java.lang.String getMode()
This Method gives the Current mode at which the commands are executed -Applicable Only in IOS Devices.

Returns:
- Returns the current mode. For e.g
scriptinterface.getMode()

addParameters

public void addParameters(java.lang.String paramKey,
                          java.lang.String paramValue)
This Method adds the paramvalue argument for the given paramkey in the base table Note : When the key specified is already present , new value will be updated for the key -Applicable Only in IOS Devices.

Parameters:
paramKey - - The Key with which the value has to be stored.
paramValue - - Value to be stored . For e.g
scriptinterface.addParameters("acc_list_1" , "192.168.110.123_deny" )

getParamValue

public java.lang.String getParamValue(java.lang.String paramKey)
This method returns the paramValue for the paramkey -Applicable Only in IOS Devices.

Parameters:
paramKey - - The Key for the required value .
Returns:
- Returns the paramValue . For e.g
scriptinterface.getParamValue("clock_set_time")

deleteParameters

public void deleteParameters(java.lang.String paramKey)
This method deletes the paramKey entry along with the paramValue in the base table -Applicable Only in IOS Devices.

Parameters:
paramKey - - Key whose entity is to be deleted For e.g
scriptinterface.deleteParameters("clock_set_time")

getParamListValues

public java.util.Vector getParamListValues(java.lang.String paramKey)
This function returns the paramValue for all the paramKeys (Which are the part of the argument ) -Applicable Only in IOS Devices.

Parameters:
paramKey - - A part of the paramKey .
Returns:
- The paramValue for all the paramKeys starting with the given argument as a Vector. For e.g
scriptinterface.getParamListValues("clock_set");

setConnectionTime

public void setConnectionTime(int time)
This sets the session time of the telnet client.sessiontime : The time till which the client connection should be established while client is idle -Applicable Only in IOS Devices.

Parameters:
time - - New sessiontime in seconds. For e.g
scriptinterface.setConnectionTime(500)

showHistory

public void showHistory()
This function lists the last 10 commands executed by the telnet client -Applicable Only in IOS Devices. For e.g
scriptinterface.showHistory()


strAppend

public void strAppend(java.lang.String response)
This method can be used to append any string as a response to be recieved for a command.This should be used only when the command is going to display an output without performing any other operation.To explain in brief, this method shall be used for displaying Inforamation and not for setting any configuration.

Parameters:
response - - String which has to be recieved as the response. For e.g
scriptinterface.strAppend("To append a string");

executeScript

public java.lang.String executeScript(java.lang.String scriptFile)
This method gives the response of a script and helps in executing a script within a script -Applicable Only in IOS Devices.

Returns:
- The response for the scriptFile which has to be executed For e.g
scriptinterface.executeScript("./networks/newNet/Cisco36003/cli/help.py")

getParamKeyList

public java.util.Vector getParamKeyList(java.lang.String paramKey)
This method will return all the paramKeys in the base table which start with the argument -Applicable Only in IOS Devices.

Returns:
- A Vector of paramKey which contains the argument as the starting one For e.g
scriptinterface.getParamKeyList("clock_")

updateIPAddress

public void updateIPAddress(java.lang.String ipAddress)
This method is used to update the IPAddress of the device -Applicable Only in IOS Devices


setEnablePassword

public void setEnablePassword(java.lang.String password)
This method sets the Enable mode password for the device for which the request has come - Applicable Only in IOS Devices

Parameters:
password - - password to be set For e.g
scriptinterface.setEnablePassword("jk")

getEnablePassword

public java.lang.String getEnablePassword()
This method gets the password for the enable mode for which the request has come - Applicable Only in IOS Devices

Returns:
- Password for the Enable mode For e.g
scriptinterface.getEnablePassword()

isInterfaceUp

public boolean isInterfaceUp(java.lang.String ipAddress)
This method checks whether a particular IPAddress is up or not

Returns:
- true if Up and false otherwise For e.g
scriptinterface.isInterfaceUp("21.1.1.1");

getRoundTripTime

public int getRoundTripTime()
This method gives the average time taken by isInterfaceUp method to check whether a particular IPAddress is up or not and hence has to be called after isInterfaceUp method

Returns:
- Average time taken to search for a device For e.g
scriptinterface.getRoundTripTime();

getMaxRoundTripTime

public int getMaxRoundTripTime()
This method gives the maximum time taken by isInterfaceUp method to check whether a particular IPAddress is up or not and hence has to be called after isInterfaceUp method

Returns:
- Maximum time taken to search for a device For e.g
scriptinterface.getMaxRoundTripTime();

getMinRoundTripTime

public int getMinRoundTripTime()
This method gives the minimum time taken by isInterfaceUp method to check whether a particular IPAddress is up or not and hence has to be called after isInterfaceUp method

Returns:
- Minimum time taken to search for a device For e.g
scriptinterface.getMinRoundTripTime();

setPassword

public void setPassword(java.lang.String password)
This method sets the password for the device for which the request has come

Parameters:
password - - New password to be set For e.g
scriptinterface.setPassword("jkarthik");

getPassword

public java.lang.String getPassword()
This method gets the password for the device for which the request has come

Returns:
- Password of the device For e.g
scriptinterface.getPassword();

noEnablePassword

public void noEnablePassword()
This method sets the enable flag to be false and disables the enable password field For e.g
scriptinterface.noEnablePassword()


getUserName

public java.lang.String getUserName()
This method gets the user name for the device.

Returns:
- User name of the device For e.g
scriptinterface.getUserName();

getEnableFlag

public boolean getEnableFlag()
This method returns whether the enable password is set or not in the device.

Returns:
- true if enable password is set or else false. For e.g
scriptinterface.getEnableFlag()

getNetworkAddress

public java.lang.String getNetworkAddress(java.lang.String ipAddress)
This method returns the Network Address for th given IPAddress.

Parameters:
ipAddress - - IPAddress of the device
Returns:
- Network Address for the given IPAddress. Checks to which class the IPAddress this belongs to and returns the corresponding Network Address. For e.g
scriptinterface.getNetworkAddress("36.1.1.1") returns - 36.0.0.0

getHighestIPAddress

public java.lang.String getHighestIPAddress(java.util.Vector ipAddr)
This method returns the highest IPAddress present in the given Vector.

Parameters:
ipAddr - - The vector which contains a bunch of IPAddress
Returns:
- Retuns the highest IPAddress For e.g
scriptinterface.getHighestIPAddress(ipAddr)

getTelnetRootDir

public java.lang.String getTelnetRootDir()
This method returns the working directory of the device for which the request has come.

Returns:
- Telnet root directory For e.g
scriptinterface.getTelnetRootDir();

execDisplayCommand

public java.lang.String execDisplayCommand(java.lang.String cmd)
This method can be used for commands which result in some output display.The output should be specific to the directory from which it is being executed.

Parameters:
cmd - - Command which satisfies the above conditions.
Returns:
- Output display for the command. For e.g
scriptinterface.execDisplayCommand("ls");

executeGlobalCmd

public java.lang.String executeGlobalCmd(java.lang.String cmd)
This method can be used for commands which result in some output display.The output should be irrespective to the directory from which it is being executed.

Parameters:
cmd - - Command which satisfies the above conditions.
Returns:
- Output display for the command. For e.g
scriptinterface.executeGlobalCmd("free");

executeTelnetCmd

public void executeTelnetCmd(java.lang.String cmd)
This method shall be used for commands that result in some action being executed in the system without any output display.The action executed should be within the specified directory.

Parameters:
cmd - - Command which satisfies the above conditions. For e.g
scriptinterface.executeGlobalCmd("mkdir Advent");

changeDirectory

public boolean changeDirectory(java.lang.String dir)
This method gives the current working directory.

Parameters:
dir - - The directory to be changed .
Returns:
- true if the directory is present and false otherwise For e.g
scriptinterface.changeDirectory("/home/jkarthik/builds");

execGlobalTelnetCmd

public void execGlobalTelnetCmd(java.lang.String cmd)
This method shall be used for commands that result in some action being executed in the system without any output display.The action should be executed globally.

Parameters:
cmd - - Command which satisfies the above conditions. For e.g
scriptinterface.execGlobalTelnetCmd("export CLASSPATH=/home");

getDeviceName

public java.lang.String getDeviceName()
This method gets the device name for which the request has come.

Returns:
- The unique name For e.g
scriptinterface.getDeviceName();

getTelnetCommands

public java.lang.String getTelnetCommands(int dev)
This method returns all the commands supported by the device.

Parameters:
dev - - 1 For Linux/Solaris device 2 For Windows device
Returns:
- The list of commands For e.g
scriptinterface.getTelnetCommands(1);

addSnmpAgent

public boolean addSnmpAgent(java.lang.String devName,
                            java.lang.String ipAddress,
                            java.lang.String port,
                            java.lang.String readCommunity,
                            java.lang.String writeCommunity,
                            java.lang.String tftpPort)
This method is used to add an SNMP agent to an already existing network. The SNMP agent is added using the devices present in the device tree. It is mandatory that the SNMP agent being added should be of a device type that exists in the device tree. The SNMP agent will be added to the currently selected network in the Network Designer. By default any agent added to the network will support TFTP. Hence it is mandatory to specify a TFTP port also while adding the SNMP agent.

Parameters:
devName - - name of the device present in the Device Tree
ipAddress - - IP Address of the SNMP agent to be added
port - - Port at which the SNMP agent will start/listen
readCommunity - - The read community of the SNMP agent to be added
writeCommunity - - The write community of the SNMP agent to be added
tftpPort - - TFTP port at which the SNMP agent will listen for TFTP request
Returns:
returns true if the agent is added, false otherwise

deleteSnmpAgent

public boolean deleteSnmpAgent(java.lang.String ipAddress,
                               java.lang.String port)
This method is used to delete the SNMP agent with IP Address and Port from the currently selected network in the Network Desginer.

Parameters:
ipAddress - - IP Address of the SNMP agent to be deleted
port - - Port of the SNMP agent to be deleted
Returns:
returns true if the SNMP agent is deleted , false otherwise

getAllDeviceNames

public java.util.ArrayList getAllDeviceNames()
This method is used to list all the names of the devices present in the Device Tree.

Returns:
an ArrayList containing the names of the devices present in the Device Tree.

getNoOfSnmpAgentsRunning

public int getNoOfSnmpAgentsRunning()
This method is used to return the number of Snmp Agents running


isSnmpAgentRunning

public boolean isSnmpAgentRunning(java.lang.String ipAddress,
                                  java.lang.String port)
This method returns true if the SNMP Agent is running at the specified IP Address and Port , and returns false if the SNMP Agent is not running.


stopAllTimerTraps

public boolean stopAllTimerTraps()
This method is used to stop Timer Traps for all SNMP agents from the currently selected network in the Network Desginer.

Returns:
returns true if the Timer Traps are stopped, false otherwise

stopAllTimerInforms

public boolean stopAllTimerInforms()
This method is used to stop Timer Informs for all SNMP agents from the currently selected network in the Network Desginer.

Returns:
returns true if the Timer Informs are stopped, false otherwise

stopAllTimerScripts

public boolean stopAllTimerScripts()
This method is used to stop Timer Scripts for all SNMP agents from the currently selected network in the Network Desginer.

Returns:
returns true if the Timer Scripts are stopped, false otherwise

stopTimerScripts

public boolean stopTimerScripts(java.lang.String ipAddress,
                                java.lang.String port)
This method is used to stop Timer Scripts for the SNMP agent with IP Address and Port from the currently selected network in the Network Desginer.

Parameters:
ipAddress - - IP Address of the SNMP agent in which timer scripts have to be stopped
port - - Port of the SNMP agent in which timer scripts have to be stopped
Returns:
returns true if the Timer Scripts are stopped , false otherwise

stopTimerTraps

public boolean stopTimerTraps(java.lang.String ipAddress,
                              java.lang.String port)
This method is used to stop Timer Traps for the SNMP agent with IP Address and Port from the currently selected network in the Network Desginer.

Parameters:
ipAddress - - IP Address of the SNMP agent in which timer traps have to be stopped
port - - Port of the SNMP agent in which timer traps have to be stopped
Returns:
returns true if the Timer Traps are stopped , false otherwise

downInterface

public boolean downInterface(java.lang.String ipAddress,
                             int port,
                             java.lang.String ifIndex)
This method is used to shutdown the interface for an SNMP agent with IP Address and Port from the currently selected network in the Network Desginer.The interface will be shutdown only when the agent is running.

Parameters:
ipAddress - - IP Address of the SNMP agent in which the interface has to be shut down
port - - Port of the SNMP agent in which the interface has to be shut down
ifIndex - - The index of the interface which has to be shut down
Returns:
- true if the interface is shutdown, false otherwise For e.g
scriptinterface.downInterface("32.1.1.1",8001,".2")

upInterface

public boolean upInterface(java.lang.String ipAddress,
                           int port,
                           java.lang.String ifIndex)
This method is used to activate the interface IPAddress for an SNMP agent with IP Address and Port from the currently selected network in the Network Desginer.The interface will be activated only when the SNMP agent is running.

Parameters:
ipAddress - - IP Address of the SNMP agent in which the interface has to be activated
port - - Port of the SNMP agent in which the interface has to be activated
ifIndex - - The index of the interface which has to be activated
Returns:
- true if the interface is activated, false otherwise For e.g
scriptinterface.upInterface("32.1.1.1",8001,".2")

upInterface

public boolean upInterface(java.lang.String ifIndex)
This method is used to activate the given interface of the SNMP Agent.The interface will be activated only when the SNMP Agent is running.

Parameters:
ifIndex - - The index of the interface which has to be activated
Returns:
- true if activated, false otherwise For e.g
scriptinterface.upInterface(".2")

downInterface

public boolean downInterface(java.lang.String ifIndex)
This method is used to shutdown the given interface of the SNMP Agent.The interface will be shutdown only when the SNMP Agent is running.

Parameters:
ifIndex - - The index of the interface which has to be shutdown
Returns:
- true if shutdown, false otherwise For e.g
scriptinterface.downInterface(".2")

addAccessId

public void addAccessId(java.lang.String commandCode,
                        java.lang.String accessId)

Adds an accessId for a Command Code. If the accessId to be added has more than one parameters, then the accessId should be separated by commas/colon. If the accessId has parameters, namely, Termination Point 1 and Termination Point 2, then the accessId should hold the value such as "point1,point2".

For example,

to add a new accessId, add the following line to the script file

tl1scriptinterface.addAccessId("RTRV-EQPT", "ALL")

where "RTRV-EQPT" is the commandCode, "ALL" is the accessId.

Parameters:
commandCode - is the CommandCode present in the agent.
accessId - is the new accessId to add for the commandCode.

See Also:
examples/scripting/tl1/AddAccessID.py file.

deleteAccessId

public void deleteAccessId(java.lang.String commandCode,
                           java.lang.String accessId)

Deletes an accessId for a Command Code.

For example,

to delete an accessId for a commandCode, add the following line to the script file

tl1scriptinterface.deleteAccessId("RTRV-NE", "ALL")

where "RTRV-NE" is the commandCode, "ALL" is the accessId.

Parameters:
commandCode - is the CommandCode present in the agent.
accessId - is the accessId to be deleted.

See Also:
examples/scripting/tl1/DeleteAccessID.py file.

addMsgPayLoad

public void addMsgPayLoad(java.lang.String commandCode,
                          java.lang.String accessId,
                          java.lang.String msgPayLoad)

Adds a new Message PayLoad. This adds a MessagePayLoad for a commandCode, accessId combination. Certain command codes may not have accessId defined at all. In such cases, accessId parameter should be an empty string(""). While adding make sure you don't add a message payload block for a command code which doesn't define one.

For example,

to add a Message PayLoad, add the following line to the script file

tl1scriptinterface.addMsgPayLoad("ED-PID","AID", "OLDPWD,NEWPWD")

where "ED-PID" is the commandCode, "AID" is the accessId and "OLDPWD,NEWPWD" is the new MessagePayLoad to add.

This method will also add the accessId if it is not present.

Parameters:
commandCode - is the CommandCode present in the agent.
accessId - is the accessId to be added.
msgPayLoad - is the MessagePayLoad to be added.

See Also:
examples/scripting/tl1/AddMsgPayload.py file.

delMsgPayLoad

public void delMsgPayLoad(java.lang.String commandCode,
                          java.lang.String accessId,
                          java.lang.String msgPayLoad)

Deletes a Message PayLoad. This deletes a MessagePayLoad for a commandCode, accessId combination. Certain command codes may not have accessId defined at all. In such cases, accessId parameter should be an empty string("").

For example,

to delete a Message PayLoad, add the following line to the script file

tl1scriptinterface.delMsgPayLoad("ED-PID","AID", "OLDPWD,NEWPWD")

where "ED-PID" is the commandCode, "AID" is the accessId and "OLDPWD,NEWPWD" is the MessagePayLoad to delete.

Parameters:
commandCode - is the CommandCode present in the agent.
accessId - is the accessId corresponding to the MessagePayLoad.
msgPayLoad - is the MessagePayLoad to be deleted.

See Also:
examples/scripting/tl1/DeleteMsgPayload.py file.

setComplCode

public void setComplCode(java.lang.String commandCode,
                         java.lang.String accessId,
                         java.lang.String msgPayLoad,
                         int complCode)

Sets the Completion Code(COMPLD,DENY) for a commandCode, accessId, msgPayLoad combination.

For example, to set the completion code, add the following line to the the script file

tl1scriptinterface.setComplCode("ED-PID","AID", "OLDPWD,NEWPWD",1)

where "ED-PID" is the commandCode, "AID" is the accessId and "OLDPWD,NEWPWD" is the MessagePayLoad and 1 represents COMPLD. The list of values that can be supplied is :

Parameters:
commandCode - is the CommandCode present in the agent.
accessId - is the accessId corresponding to the commandCode.
msgPayLoad - is the MessagePayLoad corresponding to the accessId.
complCode - is the completion code to be set (COMPLD/DENY).
See Also:
examples/scripting/tl1/SetComplCode.py file.

setAckMessage

public void setAckMessage(java.lang.String commandCode,
                          java.lang.String accessId,
                          java.lang.String msgPayLoad,
                          int ackNO)

Sets the Acknowledgement Message for a commandCode, accessId, msgPayLoad combination.

For example, to set the acknowledgement message, add the following line to the the script file

tl1scriptinterface.setAckMessage("ED-PID","AID", "OLDPWD,NEWPWD",1)

where "ED-PID" is the commandCode, "AID" is the accessId and "OLDPWD,NEWPWD" is the MessagePayLoad and 1 represents IN PROGRESS. The list of values that can be supplied is :

Parameters:
commandCode - is the CommandCode present in the agent.
accessId - is the accessId corresponding to the commandCode.
msgPayLoad - is the MessagePayLoad corresponding to the accessId.
See Also:
examples/scripting/tl1/SetAckCode.py file.

addLines

public void addLines(java.lang.String commandCode,
                     java.lang.String accessId,
                     java.lang.String msgPayLoad,
                     boolean isValid,
                     int lineType,
                     java.lang.String[] paramNames,
                     java.lang.String[] paramValues)

Adds a line(quoted/unquoted) to a commandCode, accessId and msgPayLoad combination. You can add a line for a valid response or error response. The linetype can be quoted or unquoted. The list of paramter names depends on :


Certain command codes may not have the accessId or MessagePayLoad or both. In such cases, empty string should be substituted for accessId or MessagePayLoad.

lineType can have the following values :


isValid can have the following values :

Parameters:
commandCode - is the CommandCode present in the agent.
accessId - is the accessId corresponding to the commandCode.
msgPayLoad - is the MessagePayLoad corresponding to the accessId.
isValid - is a boolean representing whether the line is to be added for a valid response/error response.
lineType - represents whether the line is quoted/unquoted.
paramNames - is the list of parameter names available for line to be added.
paramValues - is the list of values for the parameter names.

See Also:
examples/scripting/tl1/AddLines.py file.

delLines

public void delLines(java.lang.String commandCode,
                     java.lang.String accessId,
                     java.lang.String msgPayLoad,
                     boolean responseType,
                     int lineType,
                     java.lang.String[] paramNames,
                     java.lang.String[] paramValues)

Deletes a line(quoted/unquoted) to a commandCode, accessId and msgPayLoad combination. You can delete a line for a valid response or error response. The linetype can be quoted or unquoted. The list of paramter names depends on :


Certain command codes may not have the accessId or MessagePayLoad or both. In such cases, empty string should be substituted for accessId or MessagePayLoad.

lineType can have the following values :


responseType can have the following values :

Parameters:
commandCode - is the CommandCode present in the agent.
accessId - is the accessId corresponding to the commandCode.
msgPayLoad - is the MessagePayLoad corresponding to the accessId.
responseType - is a boolean representing whether the line is to be deleted for a valid response/error response.
lineType - represents whether the line is quoted/unquoted.
paramNames - is the list of parameter names available for the line to be deleted
paramValues - is the list of values for the parameter names.

See Also:
examples/scripting/tl1/DeleteLines.py file

sendDenyMessage

public void sendDenyMessage(java.lang.String errorCode,
                            java.lang.String explanation)

Sends a deny message with the provided errorCode and explanation

See Also:
examples/scripting/tl1/sendDenyMessage.py file

sendResponseMessage

public void sendResponseMessage(java.lang.String[] paramNames,
                                java.lang.String[] paramPosType,
                                java.lang.String[] delimiters,
                                java.util.Vector paramValuesVector,
                                java.lang.String[] lineTypes,
                                int completionCode)

Sends a Response Message with the parameters defined inside the script

See Also:
examples/scripting/tl1/sendResponseMessage.py file

getCurrentCommandCode

public java.lang.String getCurrentCommandCode()

Gets the Command code that comes in the request.

Returns:
command code that comes in the request.

See Also:
examples/scripting/tl1/GetCurrentCommandCode.py file.

getCurrentAID

public java.lang.String getCurrentAID()

Gets the accessId that comes in the request. If the accessId is not given in the request, this method returns an empty string.

Returns:
accessId that comes in the request.

See Also:
examples/scripting/tl1/GetCurrentAID.py file.

getCurrentMPB

public java.lang.String getCurrentMPB()

Gets the msgPayLoad that comes in the request. If the msgPayLoad is not given in the request, this method returns an empty string.

Returns:
msgPayLoad that comes in the request.

See Also:
examples/scripting/tl1/GetCurrentMPB.py file.

getTL1ConfigDirectory

public java.lang.String getTL1ConfigDirectory()

Gets the current working directory i.e. if TCS are loaded then it will point out to the latest instance directory and if configuration is loaded then it will point out to the configuration directory

Returns:
- returns the configuration directory name


startAgent

public boolean startAgent(java.lang.String ipAddress,
                          java.lang.String snmpPort,
                          java.lang.String tl1Port)

This method is used to start a Snmp/Tl1 agent using the ipAddress and Port given. This will be used only through Network Designer. tl1Port can be left blank if you are not going to start the snmp agent. snmpPort can be left blank if you are going to start the Tl1 agent.

Parameters:
ipAddress - the IP Address of the TL1 agent to be started.
snmpPort - the port at which the snmp agent should start.
tl1Port - the port at which the tl1 agent should start.
Returns:
boolean representing whether the agent is started or not.

See Also:
examples/scripting/tl1/StartTL1Agent.py file - to start only TL1 agent, examples/scripting/snmp/startSnmpAgent.py file - to start only SNMP agent.

stopAgent

public boolean stopAgent(java.lang.String ipAddress,
                         java.lang.String snmpPort,
                         java.lang.String tl1Port)

This method is used to stop a Snmp/Tl1 agent using the ipAddress and Port given. This will be used only through Network Designer. tl1Port can be left blank if you are not going to stop the snmp agent. snmpPort can be left blank if you are going to stop the TL1 agent.

Parameters:
ipAddress - the IP Address of the TL1 agent to be stopped.
snmpPort - the port at which the snmp agent is listening.
tl1Port - the port at which the tl1 agent is listening.
Returns:
boolean representing whether the agent is stopped or not.

See Also:
examples/scripting/tl1/StopTL1Agent.py file - to stop only TL1 agent., examples/scripting/snmp/StopSnmpAgent.py file - to stop only SNMP agent.

getNumberOfAids

public int getNumberOfAids(java.lang.String commandCode)

Gets the number of Access Identifiers configured for a command code.

Returns:
number of access identifiers.
See Also:
examples/scripting/tl1/GetNumberOfAIDs.py file.

getNumberOfMpbs

public int getNumberOfMpbs(java.lang.String commandCode,
                           java.lang.String accessID)

Gets the number of Message PayLoad configured for a command code and access identifier combination.

Returns:
number of message payload
See Also:
examples/scripting/tl1/GetNumberOfMPBs.py file.

getAllAids

public java.util.Vector getAllAids(java.lang.String commandCode)

Gets all the Access Identifiers configured for a command code.

Returns:
vector of access identifiers
See Also:
examples/scripting/tl1/GetAllAIDs.py file.

getAllMpbs

public java.util.Vector getAllMpbs(java.lang.String commandCode,
                                   java.lang.String accessID)

Gets all the Message Payload configured for a command code and access identifier combination.

Returns:
vector of message payload.
See Also:
examples/scripting/tl1/GetAllMPBs.py file.

isAidExists

public boolean isAidExists(java.lang.String commandCode,
                           java.lang.String accessID)

Checks if the given access identifier already exists for the command code.

Returns:
true, if access identifier exists, false otherwise.
See Also:
examples/scripting/tl1/IsAIDExists.py file.

isMpbExists

public boolean isMpbExists(java.lang.String commandCode,
                           java.lang.String accessID,
                           java.lang.String msgPayLoad)

Checks if the given message payload already exists for the command code and access identifer combination.

Returns:
true, if message payload exists, false otherwise.
See Also:
examples/scripting/tl1/IsMPBExists.py file.

sendAutonomousMessage

public void sendAutonomousMessage(java.lang.String autoCode,
                                  java.lang.String almDescr,
                                  int numberOfTimes,
                                  int interval)

Sends autonomous message a specified number of times with specified time interval .

See Also:
examples/scripting/tl1/SendAutonomousMessage.py

sendAutonomousMessage

public void sendAutonomousMessage(java.lang.String autoCode,
                                  java.lang.String almDescr)

Sends a single autonomous message for the given autoCode and almDescr.

See Also:
examples/scripting/tl1/SendAutonomousMessage.py

getTL1IPAddress

public java.lang.String getTL1IPAddress()

Gets the current IPAddress of the agent being queried.

Returns:
IPAddress of the agent

See Also:
examples/scripting/tl1/GetIPAddress.py file.

getTL1Port

public int getTL1Port()

Gets the current port of the agent being queried.

Returns:
port of the agent

See Also:
examples/scripting/tl1/GetAgentPort.py file.

updateParamValue

public void updateParamValue(java.lang.String commandCode,
                             java.lang.String accessID,
                             java.lang.String msgPayLoad,
                             boolean isValid,
                             int lineType,
                             java.lang.String uniquePName,
                             java.lang.String uniquePValue,
                             java.lang.String pNameToModify,
                             java.lang.String modifyValue)

Updates the value of a parameter in a line. A particular line is retrieved using the uniquePName and uniquePValue variabled. Once a line is chosen for updation, the pNameToModify denotes the parameter name to modify and the modifyValue denotes the value to be updated for the paramter name, pNameToModify.

Parameters:
commandCode - is the CommandCode present in the agent.
msgPayLoad - is the MessagePayLoad corresponding to the accessId.
isValid - is a boolean representing whether the line is to be added for a valid response/error response.
lineType - represents whether the line is quoted/unquoted.
uniquePName - denotes the unqiue parameter name
uniquePValue - denotes the unique parameter value
pNameToModify - denotes the paramter name to modify
modifyValue - denotes the paramter value to be updated.

See Also:
examples/scripting/tl1/UpdateParamValue.py file.

deleteLine

public void deleteLine(java.lang.String commandCode,
                       java.lang.String accessID,
                       java.lang.String msgPayLoad,
                       boolean isValid,
                       int lineType,
                       java.lang.String uniquePName,
                       java.lang.String uniquePValue)

Deletes a line. The line to be deleted is chosen by the uniquePName and uniquePValue variables.

Parameters:
commandCode - is the CommandCode present in the agent.
msgPayLoad - is the MessagePayLoad corresponding to the accessId.
isValid - is a boolean representing whether the line is to be added for a valid response/error response.
lineType - represents whether the line is quoted/unquoted.
uniquePName - denotes the unqiue parameter name
uniquePValue - denotes the unique parameter value

See Also:
examples/scripting/tl1/DeleteLineWithValue.py file.

getLine

public java.util.Hashtable getLine(java.lang.String commandCode,
                                   java.lang.String accessID,
                                   java.lang.String msgPayLoad,
                                   boolean isValid,
                                   int lineType,
                                   java.lang.String uniquePName,
                                   java.lang.String uniquePValue)

Gets a line information with parameter name as the key and the parameter value as the value. The line to be returned is chosen by the uniquePName and uniquePValue variables.

Parameters:
commandCode - is the CommandCode present in the agent.
msgPayLoad - is the MessagePayLoad corresponding to the accessId.
isValid - is a boolean representing whether the line is to be added for a valid response/error response.
lineType - represents whether the line is quoted/unquoted.
uniquePName - denotes the unqiue parameter name
uniquePValue - denotes the unique parameter value
Returns:
hashtable containing the paramter name and parameter values as key,value pair.

See Also:
examples/scripting/tl1/GetLine.py file.

getScriptConditionForTL1Agent

public int getScriptConditionForTL1Agent()

Gets the condition for the script in execution. The condition can be before request or after request. The values returned will be any of the following : 1 - Before request 2 - After request

Returns:
the condition of the script

See Also:
examples/scripting/tl1/GetScriptCondition.py file.

addLines

public void addLines(java.lang.String autoCode,
                     java.lang.String alarmDescr,
                     int lineType,
                     java.lang.String[] paramNames,
                     java.lang.String[] paramValues)

Adds a line(quoted/unquoted) to an autonomous code and alarm description combination. You can add a line only for a valid autonomous response. The linetype can be quoted or unquoted. The list of paramter names depends on :

lineType can have the following values :


Parameters:
autoCode - is the autonomous code present in the agent.
alarmDescr - is the alarm description corresponding to the autoCode.
lineType - represents whether the line is quoted/unquoted.
paramNames - is the list of parameter names available for line to be added.
paramValues - is the list of values for the parameter names.

See Also:
examples/scripting/tl1/AddAutoLines.py file.

delLines

public void delLines(java.lang.String autoCode,
                     java.lang.String alarmDescr,
                     int lineType,
                     java.lang.String[] paramNames,
                     java.lang.String[] paramValues)

Deletes a line(quoted/unquoted) for a autonomouse code and alarm description combination. You can delete a line for a valid response only . The linetype can be quoted or unquoted. The list of paramter names depends on :

lineType can have the following values :

a valid response/error response.

Parameters:
autoCode - is the autonomous code present in the agent.
alarmDescr - is the alarm description corresponding to the autoCode.
lineType - represents whether the line is quoted/unquoted.
paramNames - is the list of parameter names available for the line to be deleted
paramValues - is the list of values for the parameter names.

See Also:
examples/scripting/tl1/DeleteAutoLines.py file

getLine

public java.util.Hashtable getLine(java.lang.String autoCode,
                                   java.lang.String alarmDescr,
                                   int lineType,
                                   java.lang.String uniquePName,
                                   java.lang.String uniquePValue)

Gets a line information with parameter name as the key and the parameter value as the value. The line to be returned is chosen by the uniquePName and uniquePValue variables.

Parameters:
autoCode - is the autonomous code present in the agent.
alarmDescr - is the alarm description corresponding to the autoCode.
lineType - represents whether the line is quoted/unquoted.
uniquePName - denotes the unqiue parameter name
uniquePValue - denotes the unique parameter value
Returns:
hashtable containing the paramter name and parameter values as key,value pair.

See Also:
examples/scripting/tl1/GetAutoLine.py file.

updateParamValue

public void updateParamValue(java.lang.String autoCode,
                             java.lang.String alarmDescr,
                             int lineType,
                             java.lang.String uniquePName,
                             java.lang.String uniquePValue,
                             java.lang.String pNameToModify,
                             java.lang.String modifyValue)

Updates the value of a parameter in a line. A particular line is retrieved using the uniquePName and uniquePValue variables. Once a line is chosen for updation, the pNameToModify denotes the parameter name to modify and the modifyValue denotes the value to be updated for the paramter name, pNameToModify.

Parameters:
autoCode - is the autonomous code present in the agent.
alarmDescr - is the alarm description corresponding to the autoCode.
lineType - represents whether the line is quoted/unquoted.
uniquePName - denotes the unqiue parameter name
uniquePValue - denotes the unique parameter value
pNameToModify - denotes the paramter name to modify
modifyValue - denotes the paramter value to be updated.

See Also:
examples/scripting/tl1/UpdateAutoParamValue.py file.

deleteLine

public void deleteLine(java.lang.String autoCode,
                       java.lang.String alarmDescr,
                       int lineType,
                       java.lang.String uniquePName,
                       java.lang.String uniquePValue)

Deletes a line. The line to be deleted is chosen by the uniquePName and uniquePValue variables.

Parameters:
autoCode - is the autonomous code present in the agent.
alarmDescr - is the alarm description corresponding to the autoCode.
lineType - represents whether the line is quoted/unquoted.
uniquePName - denotes the unqiue parameter name
uniquePValue - denotes the unique parameter value

See Also:
examples/scripting/tl1/DeleteAutoLineWithValue.py file.

getNumberOfAids

public int getNumberOfAids(java.lang.String ipAddress,
                           java.lang.String port,
                           java.lang.String commandCode)

Gets the number of Access Identifiers configured for a command code.

Returns:
number of access identifiers.

getNumberOfMpbs

public int getNumberOfMpbs(java.lang.String ipAddress,
                           java.lang.String port,
                           java.lang.String commandCode,
                           java.lang.String accessID)

Gets the number of Message PayLoad configured for a command code and access identifier combination.

Returns:
number of message payload

getAllAids

public java.util.Vector getAllAids(java.lang.String ipAddress,
                                   java.lang.String port,
                                   java.lang.String commandCode)

Gets all the Access Identifiers configured for a command code.

Returns:
vector of access identifiers

getAllMpbs

public java.util.Vector getAllMpbs(java.lang.String ipAddress,
                                   java.lang.String port,
                                   java.lang.String commandCode,
                                   java.lang.String accessID)

Gets all the Message Payload configured for a command code and access identifier combination.

Returns:
vector of message payload.

isAidExists

public boolean isAidExists(java.lang.String ipAddress,
                           java.lang.String port,
                           java.lang.String commandCode,
                           java.lang.String accessID)

Checks if the given access identifier already exists for the command code.

Returns:
true, if access identifier exists, false otherwise.

isMpbExists

public boolean isMpbExists(java.lang.String ipAddress,
                           java.lang.String port,
                           java.lang.String commandCode,
                           java.lang.String accessID,
                           java.lang.String msgPayLoad)

Checks if the given message payload already exists for the command code and access identifer combination.

Returns:
true, if message payload exists, false otherwise.

getLine

public java.util.Hashtable getLine(java.lang.String ipAddress,
                                   java.lang.String port,
                                   java.lang.String commandCode,
                                   java.lang.String accessID,
                                   java.lang.String msgPayLoad,
                                   boolean isValid,
                                   int lineType,
                                   java.lang.String uniquePName,
                                   java.lang.String uniquePValue)

Gets a line information with parameter name as the key and the parameter value as the value. The line to be returned is chosen by the uniquePName and uniquePValue variables.

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
commandCode - is the CommandCode present in the agent.
msgPayLoad - is the MessagePayLoad corresponding to the accessId.
isValid - is a boolean representing whether the line is to be added for a valid response/error response.
lineType - represents whether the line is quoted/unquoted.
uniquePName - denotes the unqiue parameter name
uniquePValue - denotes the unique parameter value
Returns:
hashtable containing the paramter name and parameter values as key,value pair.

deleteLine

public void deleteLine(java.lang.String ipAddress,
                       java.lang.String port,
                       java.lang.String commandCode,
                       java.lang.String accessID,
                       java.lang.String msgPayLoad,
                       boolean isValid,
                       int lineType,
                       java.lang.String uniquePName,
                       java.lang.String uniquePValue)

Deletes a line. The line to be deleted is chosen by the uniquePName and uniquePValue variables.

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
commandCode - is the CommandCode present in the agent.
msgPayLoad - is the MessagePayLoad corresponding to the accessId.
isValid - is a boolean representing whether the line is to be added for a valid response/error response.
lineType - represents whether the line is quoted/unquoted.
uniquePName - denotes the unqiue parameter name
uniquePValue - denotes the unique parameter value

updateParamValue

public void updateParamValue(java.lang.String ipAddress,
                             java.lang.String port,
                             java.lang.String commandCode,
                             java.lang.String accessID,
                             java.lang.String msgPayLoad,
                             boolean isValid,
                             int lineType,
                             java.lang.String uniquePName,
                             java.lang.String uniquePValue,
                             java.lang.String pNameToModify,
                             java.lang.String modifyValue)

Updates the value of a parameter in a line. A particular line is retrieved using the uniquePName and uniquePValue variabled. Once a line is chosen for updation, the pNameToModify denotes the parameter name to modify and the modifyValue denotes the value to be updated for the paramter name, pNameToModify.

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
commandCode - is the CommandCode present in the agent.
msgPayLoad - is the MessagePayLoad corresponding to the accessId.
isValid - is a boolean representing whether the line is to be added for a valid response/error response.
lineType - represents whether the line is quoted/unquoted.
uniquePName - denotes the unqiue parameter name
uniquePValue - denotes the unique parameter value
pNameToModify - denotes the paramter name to modify
modifyValue - denotes the paramter value to be updated.

addLines

public void addLines(java.lang.String ipAddress,
                     java.lang.String port,
                     java.lang.String autoCode,
                     java.lang.String alarmDescr,
                     int lineType,
                     java.lang.String[] paramNames,
                     java.lang.String[] paramValues)

Adds a line(quoted/unquoted) to an autonomous code and alarm description combination. You can add a line only for a valid autonomous response. The linetype can be quoted or unquoted. The list of paramter names depends on :

lineType can have the following values :


Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
autoCode - is the autonomous code present in the agent.
alarmDescr - is the alarm description corresponding to the autoCode.
lineType - represents whether the line is quoted/unquoted.
paramNames - is the list of parameter names available for line to be added.
paramValues - is the list of values for the parameter names.

delLines

public void delLines(java.lang.String ipAddress,
                     java.lang.String port,
                     java.lang.String autoCode,
                     java.lang.String alarmDescr,
                     int lineType,
                     java.lang.String[] paramNames,
                     java.lang.String[] paramValues)

Deletes a line(quoted/unquoted) for a autonomouse code and alarm description combination. You can delete a line for a valid response only . The linetype can be quoted or unquoted. The list of paramter names depends on :

lineType can have the following values :

a valid response/error response.

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
autoCode - is the autonomous code present in the agent.
alarmDescr - is the alarm description corresponding to the autoCode.
lineType - represents whether the line is quoted/unquoted.
paramNames - is the list of parameter names available for the line to be deleted
paramValues - is the list of values for the parameter names.

getLine

public java.util.Hashtable getLine(java.lang.String ipAddress,
                                   java.lang.String port,
                                   java.lang.String autoCode,
                                   java.lang.String alarmDescr,
                                   int lineType,
                                   java.lang.String uniquePName,
                                   java.lang.String uniquePValue)

Gets a line information with parameter name as the key and the parameter value as the value. The line to be returned is chosen by the uniquePName and uniquePValue variables.

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
autoCode - is the autonomous code present in the agent.
alarmDescr - is the alarm description corresponding to the autoCode.
lineType - represents whether the line is quoted/unquoted.
uniquePName - denotes the unqiue parameter name
uniquePValue - denotes the unique parameter value
Returns:
hashtable containing the paramter name and parameter values as key,value pair.

updateParamValue

public void updateParamValue(java.lang.String ipAddress,
                             java.lang.String port,
                             java.lang.String autoCode,
                             java.lang.String alarmDescr,
                             int lineType,
                             java.lang.String uniquePName,
                             java.lang.String uniquePValue,
                             java.lang.String pNameToModify,
                             java.lang.String modifyValue)

Updates the value of a parameter in a line. A particular line is retrieved using the uniquePName and uniquePValue variables. Once a line is chosen for updation, the pNameToModify denotes the parameter name to modify and the modifyValue denotes the value to be updated for the paramter name, pNameToModify.

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
autoCode - is the autonomous code present in the agent.
alarmDescr - is the alarm description corresponding to the autoCode.
lineType - represents whether the line is quoted/unquoted.
uniquePName - denotes the unqiue parameter name
uniquePValue - denotes the unique parameter value
pNameToModify - denotes the paramter name to modify
modifyValue - denotes the paramter value to be updated.

deleteLine

public void deleteLine(java.lang.String ipAddress,
                       java.lang.String port,
                       java.lang.String autoCode,
                       java.lang.String alarmDescr,
                       int lineType,
                       java.lang.String uniquePName,
                       java.lang.String uniquePValue)

Deletes a line. The line to be deleted is chosen by the uniquePName and uniquePValue variables.

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
autoCode - is the autonomous code present in the agent.
alarmDescr - is the alarm description corresponding to the autoCode.
lineType - represents whether the line is quoted/unquoted.
uniquePName - denotes the unqiue parameter name
uniquePValue - denotes the unique parameter value

addAccessId

public void addAccessId(java.lang.String ipAddress,
                        java.lang.String port,
                        java.lang.String commandCode,
                        java.lang.String accessId)

Adds an accessId for a Command Code. If the accessId to be added has more than one parameters, then the accessId should be separated by commas/colon. If the accessId has parameters, namely, Termination Point 1 and Termination Point 2, then the accessId should hold the value such as "point1,point2".

For example,

to add a new accessId, add the following line to the script file

tl1scriptinterface.addAccessId("RTRV-EQPT", "ALL")

where "RTRV-EQPT" is the commandCode, "ALL" is the accessId.

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
commandCode - is the CommandCode present in the agent.
accessId - is the new accessId to add for the commandCode.

deleteAccessId

public void deleteAccessId(java.lang.String ipAddress,
                           java.lang.String port,
                           java.lang.String commandCode,
                           java.lang.String accessId)

Deletes an accessId for a Command Code.

For example,

to delete an accessId for a commandCode, add the following line to the script file

tl1scriptinterface.deleteAccessId("RTRV-NE", "ALL")

where "RTRV-NE" is the commandCode, "ALL" is the accessId.

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
commandCode - is the CommandCode present in the agent.
accessId - is the accessId to be deleted.

addMsgPayLoad

public void addMsgPayLoad(java.lang.String ipAddress,
                          java.lang.String port,
                          java.lang.String commandCode,
                          java.lang.String accessId,
                          java.lang.String msgPayLoad)

Adds a new Message PayLoad. This adds a MessagePayLoad for a commandCode, accessId combination. Certain command codes may not have accessId defined at all. In such cases, accessId parameter should be an empty string(""). While adding make sure you don't add a message payload block for a command code which doesn't define one.

For example,

to add a Message PayLoad, add the following line to the script file

tl1scriptinterface.addMsgPayLoad("ED-PID","AID", "OLDPWD,NEWPWD")

where "ED-PID" is the commandCode, "AID" is the accessId and "OLDPWD,NEWPWD" is the new MessagePayLoad to add.

This method will also add the accessId if it is not present.

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
commandCode - is the CommandCode present in the agent.
accessId - is the accessId to be added.
msgPayLoad - is the MessagePayLoad to be added.

delMsgPayLoad

public void delMsgPayLoad(java.lang.String ipAddress,
                          java.lang.String port,
                          java.lang.String commandCode,
                          java.lang.String accessId,
                          java.lang.String msgPayLoad)

Deletes a Message PayLoad. This deletes a MessagePayLoad for a commandCode, accessId combination. Certain command codes may not have accessId defined at all. In such cases, accessId parameter should be an empty string("").

For example,

to delete a Message PayLoad, add the following line to the script file

tl1scriptinterface.delMsgPayLoad("ED-PID","AID", "OLDPWD,NEWPWD")

where "ED-PID" is the commandCode, "AID" is the accessId and "OLDPWD,NEWPWD" is the MessagePayLoad to delete.

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
commandCode - is the CommandCode present in the agent.
accessId - is the accessId corresponding to the MessagePayLoad.
msgPayLoad - is the MessagePayLoad to be deleted.

setComplCode

public void setComplCode(java.lang.String ipAddress,
                         java.lang.String port,
                         java.lang.String commandCode,
                         java.lang.String accessId,
                         java.lang.String msgPayLoad,
                         int complCode)

Sets the Completion Code(COMPLD,DENY) for a commandCode, accessId, msgPayLoad combination.

For example, to set the completion code, add the following line to the the script file

tl1scriptinterface.setComplCode("ED-PID","AID", "OLDPWD,NEWPWD",1)

where "ED-PID" is the commandCode, "AID" is the accessId and "OLDPWD,NEWPWD" is the MessagePayLoad and 1 represents COMPLD. The list of values that can be supplied is :

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
commandCode - is the CommandCode present in the agent.
accessId - is the accessId corresponding to the commandCode.
msgPayLoad - is the MessagePayLoad corresponding to the accessId.
complCode - is the completion code to be set (COMPLD/DENY).

setAckMessage

public void setAckMessage(java.lang.String ipAddress,
                          java.lang.String port,
                          java.lang.String commandCode,
                          java.lang.String accessId,
                          java.lang.String msgPayLoad,
                          int ackNO)

Sets the Acknowledgement Message for a commandCode, accessId, msgPayLoad combination.

For example, to set the acknowledgement message, add the following line to the the script file

tl1scriptinterface.setAckMessage("ED-PID","AID", "OLDPWD,NEWPWD",1)

where "ED-PID" is the commandCode, "AID" is the accessId and "OLDPWD,NEWPWD" is the MessagePayLoad and 1 represents IN PROGRESS. The list of values that can be supplied is :

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
commandCode - is the CommandCode present in the agent.
accessId - is the accessId corresponding to the commandCode.
msgPayLoad - is the MessagePayLoad corresponding to the accessId.

addLines

public void addLines(java.lang.String ipAddress,
                     java.lang.String port,
                     java.lang.String commandCode,
                     java.lang.String accessId,
                     java.lang.String msgPayLoad,
                     boolean isValid,
                     int lineType,
                     java.lang.String[] paramNames,
                     java.lang.String[] paramValues)

Adds a line(quoted/unquoted) to a commandCode, accessId and msgPayLoad combination. You can add a line for a valid response or error response. The linetype can be quoted or unquoted. The list of paramter names depends on :


Certain command codes may not have the accessId or MessagePayLoad or both. In such cases, empty string should be substituted for accessId or MessagePayLoad.

lineType can have the following values :


isValid can have the following values :

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
commandCode - is the CommandCode present in the agent.
accessId - is the accessId corresponding to the commandCode.
msgPayLoad - is the MessagePayLoad corresponding to the accessId.
isValid - is a boolean representing whether the line is to be added for a valid response/error response.
lineType - represents whether the line is quoted/unquoted.
paramNames - is the list of parameter names available for line to be added.
paramValues - is the list of values for the parameter names.

delLines

public void delLines(java.lang.String ipAddress,
                     java.lang.String port,
                     java.lang.String commandCode,
                     java.lang.String accessId,
                     java.lang.String msgPayLoad,
                     boolean responseType,
                     int lineType,
                     java.lang.String[] paramNames,
                     java.lang.String[] paramValues)

Deletes a line(quoted/unquoted) to a commandCode, accessId and msgPayLoad combination. You can delete a line for a valid response or error response. The linetype can be quoted or unquoted. The list of paramter names depends on :


Certain command codes may not have the accessId or MessagePayLoad or both. In such cases, empty string should be substituted for accessId or MessagePayLoad.

lineType can have the following values :


responseType can have the following values :

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
commandCode - is the CommandCode present in the agent.
accessId - is the accessId corresponding to the commandCode.
msgPayLoad - is the MessagePayLoad corresponding to the accessId.
responseType - is a boolean representing whether the line is to be deleted for a valid response/error response.
lineType - represents whether the line is quoted/unquoted.
paramNames - is the list of parameter names available for the line to be deleted
paramValues - is the list of values for the parameter names.

sendAutonomousMessage

public void sendAutonomousMessage(java.lang.String ipAddress,
                                  java.lang.String port,
                                  java.lang.String autoCode,
                                  java.lang.String almDescr,
                                  int numberOfTimes,
                                  int interval)

Sends autonomous message a specified number of times with specified time interval. The autonomous message will be sent from the TL1 agent whose IP Address is specified in the ipAddress variable and whose listening port is in the port variable.


sendAutonomousMessage

public void sendAutonomousMessage(java.lang.String ipAddress,
                                  java.lang.String port,
                                  java.lang.String autoCode,
                                  java.lang.String almDescr)

Sends a single autonomous message for the given autoCode and almDescr. The autonomous message will be sent from the TL1 agent whose IP Address is specified in the ipAddress variable and whose listening port is in the port variable.


clearAllAutonomousMessages

public void clearAllAutonomousMessages()

Clears all the autonomous messages that were sent previously from all the TL1 agents in the selected network


clearAutonomousMessagesInDevice

public void clearAutonomousMessagesInDevice(java.lang.String ipAddress,
                                            java.lang.String port)

Clears all the autonomous messages that were sent previously from the TL1 agent whose IP Address is specified in the ipAddress variable and whose listening port is in the port variable.

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running

sendAutonomousMessagesInDevice

public void sendAutonomousMessagesInDevice(java.lang.String ipAddress,
                                           java.lang.String port)

Sends all the autonomous messages that were sent previously from the TL1 agent whose IP Address is specified in the ipAddress variable and whose listening port is in the port variable.


sendAutonomousMessages

public void sendAutonomousMessages()

Sends all the autonomous messages that were sent previously from all the TL1 agents in the selected network


getAutonomousDetails

public java.util.Vector getAutonomousDetails()

Gets all the autonomous messages details that were sent previously from all the TL1 agents in the selected network

Returns:
Vector a Vector of Hashtable of autonomous parameter and value

getAutonomousDetailsForDevice

public java.util.Vector getAutonomousDetailsForDevice(java.lang.String ipAddress,
                                                      java.lang.String port)

Gets all the autonomous messages details that were sent previously from the TL1 agent whose IP Address is specified in the ipAddress variable and whose listening port is in the port variable.

Parameters:
ipAddress - is the ipAddress of the device
port - is the port at which the agent is running
Returns:
Vector a Vector of Hashtable of autonomous parameter and value

startTftpServer

public boolean startTftpServer(java.lang.String ipAddress,
                               java.lang.String port,
                               java.lang.String rootDir)
This method will start the TFTP server at the specified host and port number with the root directory

Parameters:
ipAddress - The IP address at which the TFTP server to be started
port - The port in the host at which TFTP server to be started
Returns:
- returns whether the server is started at the host and port

stopTftpServer

public boolean stopTftpServer(java.lang.String ipAddress,
                              java.lang.String port)
This method will stop the TFTP server running at the specified host and port number

Parameters:
ipAddress - The IP address at which the TFTP server is running
port - The port in the host at which TFTP server is running
Returns:
- returns whether the server is stopped at the host and port

uploadFile

public boolean uploadFile(java.lang.String ipAddress,
                          int port,
                          java.lang.String source,
                          java.lang.String target,
                          int mode,
                          java.lang.String protocol)
The method will execute the command from source to target in binary or ascii mode.

Parameters:
ipAddress - - The host at which the TFTP server is running
port - - The port in the host at which the TFTP server is running
source - - The source file to be get or put
target - - The destination file name
mode - - The mode of transfer either '0 for ascii' or '1 for binary'
protocol - - The protocol to be used for uploading file
Returns:
- returns whether the file is uploaded or not

uploadFile

public boolean uploadFile(java.lang.String ipAddress,
                          int port,
                          java.lang.String source,
                          java.lang.String target,
                          int mode,
                          java.lang.String protocol,
                          java.lang.String userName,
                          java.lang.String password)
The method will execute the command from source to target in binary or ascii mode.

Parameters:
ipAddress - - The host at which the FTP server is running
port - - The port in the host at which the FTP server is running
source - - The source file to be uploaded
target - - The destination file name
mode - - The mode of transfer either '0 for ascii' or '1 for binary'
protocol - - The protocol to be used for uploading file
password - - The password for the user for the protocol connection
Returns:
- returns whether the file is uploaded or not

downloadFile

public boolean downloadFile(java.lang.String ipAddress,
                            int port,
                            java.lang.String source,
                            java.lang.String target,
                            int mode,
                            java.lang.String protocol)
The method will download the file from source to target in binary or ascii mode.

Parameters:
ipAddress - - The host at which the TFTP server is running
port - - The port in the host at which the TFTP server is running
source - - The source file to be downloaded
target - - The destination file name
mode - - The mode of transfer either '0 for ascii' or '1 for binary'
protocol - - The protocol to be used for uploading file
Returns:
- returns whether the file is uploaded or not

downloadFile

public boolean downloadFile(java.lang.String ipAddress,
                            int port,
                            java.lang.String source,
                            java.lang.String target,
                            int mode,
                            java.lang.String protocol,
                            java.lang.String userName,
                            java.lang.String password)
The method will download from source to target in binary or ascii mode.

Parameters:
ipAddress - - The host at which the FTP server is running
port - - The port in the host at which the FTP server is running
source - - The source file to be downloaded
target - - The destination file name
mode - - The mode of transfer either '0 for ascii' or '1 for binary'
protocol - - The protocol to be used for uploading file
Returns:
- returns whether the file is uploaded or not

isTftpRunning

public boolean isTftpRunning(java.lang.String ipAddress,
                             int port)
The method to check if the TFTP server is running at the specified host and port

Parameters:
ipAddress - - The host at which the TFTP server is running or not
port - - The port in host at which the TFTP server is running or not
Returns:
- returns whether TFTP server is running or not at the ipAddress and port

addMibFileToDevice

public boolean addMibFileToDevice(java.lang.String ipAddress,
                                  int port,
                                  java.lang.String mibFile)
This method is used to add a MIB file to an already existing SNMP device.It is mandatory that the SNMP agent should exists in the network.

Parameters:
ipAddress - - IP Address of the SNMP agent to be added
port - - Port at which the SNMP agent will start/listen
mibFile - - The mib file to be added to the device
Returns:
returns true if the mib file is added, false otherwise