Avaya Writing Technician Interface Scripts User Manual

Browse online or download User Manual for Software Avaya Writing Technician Interface Scripts. Avaya Writing Technician Interface Scripts User's Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 116
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
Part No. 117382-A Rev. A
September 1997
BayRS Version 12.00
Site Manager Software Version 6.00
Writing Technician
Interface Scripts
Page view 0
1 2 3 4 5 6 ... 115 116

Summary of Contents

Page 1 - Interface Scripts

Part No. 117382-A Rev. ASeptember 1997BayRS Version 12.00Site Manager Software Version 6.00 Writing Technician Interface Scripts

Page 3

Writing Technician Interface ScriptsA-28 117382-A Rev. A################################################################## Sample screen (samples par

Page 4

Sample Scripts117382-A Rev. A A-29 :FI_SAMP_CKVAL:if $period <= 0 then; \echo “Period of $period seconds is too low.” ; \goto :FI_HELP_SHOW:## Chec

Page 5 - Contents

Writing Technician Interface ScriptsA-30 117382-A Rev. A:FI_SAMP1_LP:on error :FI_SAMP1_SKP:if $i > $list_0 then; goto :FI_SAMP_WT:if “$matchcct” =

Page 6

Sample Scripts117382-A Rev. A A-31 if $i > $list_0 then; goto :FI_SAMP_PRT:if “$matchcct” = “” then ; goto :FI_SAMP2_NOW:let cctnum = $(wfFddiEntry

Page 7

Writing Technician Interface ScriptsA-32 117382-A Rev. A:FI_SAMP_MATCH:on error :FI_NEXT_TRY:if ${s1instid_[$i]} != ${s2instid_[$j]} then; goto :FI_NE

Page 8

Sample Scripts117382-A Rev. A A-33 ################################################################## Hardware Filter screen...# #####################

Page 9

Writing Technician Interface ScriptsA-34 117382-A Rev. A## Enable circuit...#:FI_ENBLC:if $# != 3 then ; goto :FI_HELP_ENBL:instenv list_ wfFddiEntryi

Page 10

Sample Scripts117382-A Rev. A A-35 :FI_ENBLI:if $# != 3 then ; goto :FI_HELP_ENBL:# Sanity check <slot.connector> parameter...if “$ver” < “x7

Page 11 - About This Guide

Writing Technician Interface ScriptsA-36 117382-A Rev. A## Gosubs shared by enable and disable...#:ERR_MSG1:cutenv -c $invalch ugly_ “$3”echo “Inappro

Page 12 - Conventions

Sample Scripts117382-A Rev. A A-37 ## Disable circuit...#:FI_DSBLC:if $# != 3 then ; goto :FI_HELP_DSBL:instenv list_ wfFddiEntryif $list_0 = 0 then;

Page 13 - Acronyms

117382-A Rev. A xi About This Guide If you are interested in creating and editing Technician Interface scripts, refer to this guide for• An overview

Page 14 - How to Get Help

Writing Technician Interface ScriptsA-38 117382-A Rev. A:FI_DSBLI:if $# != 3 then ; goto :FI_HELP_DSBL:# Sanity check <slot.connector> parameter

Page 15 - Creating a Script File

Sample Scripts117382-A Rev. A A-39 ################################################################## Version command#################################

Page 17

117382-A Rev. A Index-1Symbols#, inserting comments using, 1-13$, referencing variable using, 1-2Aarrayenv command, 1-10, 2-3arrays, 1-8BBay Networks

Page 18 - Special Variables

Index-2 117382-A Rev. Afunctions, 2-20, 2-21Ggetenv command, 1-8, 2-9global variablesoverview of, 1-4PWD, 1-11gosub command, 1-11, 2-10goto command, 1

Page 19 - Prompting for Input

117382-A Rev. A Index-3suspending Technician Interface operation, 2-29system variables, 1-4TTechnical Solutions Centers, xivTFTP, 1-1timeout values, s

Page 21 - Formatting a MIB Entry

Writing Technician Interface Scriptsxii 117382-A Rev. A Conventions angle brackets (< >) Indicate that you choose the text to enter based on th

Page 22 - Creating and Using Variables

About This Guide 117382-A Rev. A xiii Acronyms ANSI American National Standards InstituteARP Address Resolution ProtocolASCII American Standard Code

Page 23 - Setting Variables

Writing Technician Interface Scriptsxiv 117382-A Rev. A Bay Networks Customer Service You can purchase a support contract from your Bay Networks dist

Page 24 - Deleting Variables

117382-A Rev. A 1-1 Chapter 1Creating a Script File The Technician Interface script facility allows you to read and execute Technician Interface com

Page 25 - Controlling Program Flow

Writing Technician Interface Scripts1-2 117382-A Rev. A • Writing messages to the console, using the echo and the printf commands• Recording cons

Page 26 - Performing Error Recovery

Creating a Script File117382-A Rev. A 1-3 To prevent a variable from being expanded, enter two dollar signs ($$) before the variable name, as shown in

Page 27 - Debugging a Script File

Writing Technician Interface Scripts1-4 117382-A Rev. ALocal, Global, and System VariablesWhen you first define a variable, the computer stores it in th

Page 28 - Creating Menus

Creating a Script File117382-A Rev. A 1-5 Prompting for InputThe input prompt variable allows you to create a prompt that accepts user input from the

Page 29 - Command Reference

ii 117382-A Rev. A4401 Great America Parkway 8 Federal StreetSanta Clara, CA 95054 Billerica, MA 01821 Copyright © 1997 Bay Networks, Inc. All rights

Page 30 - Table 2-1. Script Commands

Writing Technician Interface Scripts1-6 117382-A Rev. AIn the following script, if the user does not press Return before the time specified for SYS_IO_

Page 31

Creating a Script File117382-A Rev. A 1-7 The variable values <object>, <attribute>, and <instance> are defined as follows:<object

Page 32

Writing Technician Interface Scripts1-8 117382-A Rev. ADefining a Pseudo-Variable ArrayThe Technician Interface script facility allows you to define a p

Page 33 - <text_string>

Creating a Script File117382-A Rev. A 1-9 If you access the Technician Interface via Telnet, the Technician Interface also displays the variables in t

Page 34 - <variable_name>

Writing Technician Interface Scripts1-10 117382-A Rev. A• To convert and format text, and save the result in a specified variable for later use, use th

Page 35 - 117382-A Rev. A 2-7

Creating a Script File117382-A Rev. A 1-11 Setting the Current Volume or DirectoryWhen you set the current working volume or directory using the cd (c

Page 36

Writing Technician Interface Scripts1-12 117382-A Rev. AWriting Messages to the ConsoleThe Technician Interface provides two commands to display messa

Page 37

Creating a Script File117382-A Rev. A 1-13 Inserting CommentsYou can insert comments into the script file. Comments begin with a pound sign (#) in colu

Page 38 - <subroutine_name>

Writing Technician Interface Scripts1-14 117382-A Rev. ARunning a Script FileTo read and execute the commands in a Technician Interface script file, an

Page 39 - Examples

117382-A Rev. A 2-1 Chapter 2Command ReferenceIn the following pages you can find the function, syntax, and examples of all the script commands you nee

Page 40

117382-A Rev. A iii Bay Networks, Inc. Software License Agreement NOTICE: Please carefully read this license agreement before copying or using the

Page 41 - Example 1

Writing Technician Interface Scripts2-2 117382-A Rev. Aon error Specifies an error handler label within a script filepause Suspends the Technician Inter

Page 42 - Example 4

Command Reference117382-A Rev. A 2-3 arrayenv The arrayenv command allows you to write a list of command line arguments <text_string> to a pseud

Page 43 - Example 7

Writing Technician Interface Scripts2-4 117382-A Rev. Acutenv The cutenv command allows you to select portions of a <text_string> (as specified b

Page 44

Command Reference117382-A Rev. A 2-5 <text_string> with no field delimiters is normally passed through in its entirety.ExampleThe following sampl

Page 45 - command

Writing Technician Interface Scripts2-6 117382-A Rev. Aecho The echo command allows you to display its command line arguments to the user’s terminal.S

Page 46

Command Reference117382-A Rev. A 2-7 enumenv The enumenv command lets you assign a sequence of values to a list of variables. You assign a starting nu

Page 47

Writing Technician Interface Scripts2-8 117382-A Rev. Aexport The export command allows you to move one or more local variables to the global environm

Page 48 - <string>

Command Reference117382-A Rev. A 2-9 getenv The getenv command allows you to view the current list of variables stored in the local and global environ

Page 49 - The string

Writing Technician Interface Scripts2-10 117382-A Rev. Agosub The gosub command calls a subroutine inside the same script file. It must be the last com

Page 50 - More Examples

Command Reference117382-A Rev. A 2-11 goto The goto command lets you specify the next line to be executed from the script file. Within the script file,

Page 51 - 117382-A Rev. A 2-23

iv 117382-A Rev. A its own data and information and for maintaining adequate procedures apart from the Software to reconstruct lost or altered files,

Page 52

Writing Technician Interface Scripts2-12 117382-A Rev. AifThe if command allows you to evaluate whether an expression is true. The expression can be a

Page 53

Command Reference117382-A Rev. A 2-13 <string1> <string2> are ASCII character strings or numbers.<operand> is one of the following c

Page 54

Writing Technician Interface Scripts2-14 117382-A Rev. AThe backslash character (\) allows you to continue a command line on the following physical li

Page 55 - <MIB_object>

Command Reference117382-A Rev. A 2-15 Example 5For example, the following script tests whether variable a has been defined:setenv a 5if $?a=1 t

Page 56 - <label>

Writing Technician Interface Scripts2-16 117382-A Rev. AinstenvThe instenv command allows you to define a pseudo-variable array that contains the list

Page 57 - <no._of_seconds>

Command Reference117382-A Rev. A 2-17 Example 2The following example is an excerpt from a script file showing how to use the instenv command.instenv ip

Page 58

Writing Technician Interface Scripts2-18 117382-A Rev. Alet The let command allows you to evaluate a simple arithmetical or logical expression and ass

Page 59

Command Reference117382-A Rev. A 2-19 Example 2In the following script, variable name b is assigned the sum of variable name a plus 1.setenv a 1le

Page 60

Writing Technician Interface Scripts2-20 117382-A Rev. AThe let command provides the following string functions:• strlen( )• strindex( )• strrindex( )

Page 61 - <filename>

Command Reference117382-A Rev. A 2-21 You can also get the ASCII code for a given character (indicated as one character within single quotes, such as

Page 62

117382-A Rev. A v Contents About This Guide Audience ...

Page 63

Writing Technician Interface Scripts2-22 117382-A Rev. Alet -date -time localtime = date() + time()echo $localtime10/11/95 15:24:05let -date -time lon

Page 64

Command Reference117382-A Rev. A 2-23 mibget The mibget command lets you search a MIB object table one record at a time and retrieve a set of attribut

Page 65 - 117382-A Rev. A 2-37

Writing Technician Interface Scripts2-24 117382-A Rev. A<value_variable_array> is the name of an environmental array variable that stores the va

Page 66

Command Reference117382-A Rev. A 2-25 # First instance ID to read, wildcard.setenv nextid “*”# Begin loop to read entire set of records :IP_RT_LOOP:mi

Page 67 - <variable_value>

Writing Technician Interface Scripts2-26 117382-A Rev. Aoctetfmt The octetfmt command formats a MIB entry with an Octet or Opaque data type using the

Page 68

Command Reference117382-A Rev. A 2-27 MAC2_ADDRESS formats the data as a noncanonical MAC address.SIGNED_INTEGER or INTEGER formats the data as a 4-by

Page 69

Writing Technician Interface Scripts2-28 117382-A Rev. Aon error The on error command allows you to specify an error handler label within a script file

Page 70

Command Reference117382-A Rev. A 2-29 pause The pause command allows you to suspend operation of the Technician Interface for a given interval. During

Page 71

Writing Technician Interface Scripts2-30 117382-A Rev. Aprintf The printf command converts, formats, and prints the input arguments (<p1>,. . .,

Page 72

Command Reference117382-A Rev. A 2-31 A summary of the flags and conversion codes follows:<format> = %<flag><width>.<precision

Page 73 - Appendix A

vi 117382-A Rev. A Inserting Comments ...1-13Debug

Page 74 - FDDI.MNU Script

Writing Technician Interface Scripts2-32 117382-A Rev. A<conversion_specification> can be one of the following:•d or i indicates signed decimal n

Page 75 - FDDI.BAT Script

Command Reference117382-A Rev. A 2-33 recordThe record command saves to an open file all messages written to the console terminal. Use this command whe

Page 76 - A-4 117382-A Rev. A

Writing Technician Interface Scripts2-34 117382-A Rev. AYou can stop saving messages to a snapshot file temporarily by using the pause option with the

Page 77

Command Reference117382-A Rev. A 2-35 return You use the return command in a subroutine to return to the calling routine. When the return command exec

Page 78 - A-6 117382-A Rev. A

Writing Technician Interface Scripts2-36 117382-A Rev. Arun The run command allows you to read and execute the Technician Interface commands in a Tech

Page 79

Command Reference117382-A Rev. A 2-37 The special variable $# contains the number of parameters entered on the command line following the script file n

Page 80 - A-8 117382-A Rev. A

Writing Technician Interface Scripts2-38 117382-A Rev. Asave env The save env command allows you to save the current list of local and global variable

Page 81

Command Reference117382-A Rev. A 2-39 setenv The setenv command allows you to assign an ASCII string value or a numeric value to a variable in the loc

Page 82 - A-10 117382-A Rev. A

Writing Technician Interface Scripts2-40 117382-A Rev. Asource env The source env command allows you to read and execute the Technician Interface comm

Page 83

Command Reference117382-A Rev. A 2-41 sprintf The sprintf command converts and formats text, and saves the result in a specified variable for later use

Page 84 - A-12 117382-A Rev. A

117382-A Rev. A vii Appendix A Sample Scripts Menu Script ...

Page 85

Writing Technician Interface Scripts2-42 117382-A Rev. Aunsetenv The unsetenv command allows you to delete one or more variables from the local or glo

Page 86 - A-14 117382-A Rev. A

Command Reference117382-A Rev. A 2-43 ExamplesIf you enter: The system:unsetenv slotDeletes the variable slot from either the local or the global tabl

Page 87

Writing Technician Interface Scripts2-44 117382-A Rev. Averbose The verbose command allows you to enable the debug trace facility. When you enable the

Page 88 - A-16 117382-A Rev. A

117382-A Rev. A A-1 Appendix ASample ScriptsTo help you create your own scripts, this appendix contains three sample scripts:• Menu script• FDDI.mnu s

Page 89

Writing Technician Interface ScriptsA-2 117382-A Rev. Alet vol=$<Enter new TFTP Default Value #: >;\set wfTftp.wfTftpDefaultVolume.0 $vol;\go to

Page 90 - A-18 117382-A Rev. A

Sample Scripts117382-A Rev. A A-3 FDDI.BAT ScriptThe following example shows a protocol script for a Bay Networks router. You view output from the

Page 91

Writing Technician Interface ScriptsA-4 117382-A Rev. A################################################################## Sub-command vectoring...####

Page 92 - A-20 117382-A Rev. A

Sample Scripts117382-A Rev. A A-5 ################################################################## Parse for “show” command...#####################

Page 93

Writing Technician Interface ScriptsA-6 117382-A Rev. Alet i = strindex(“hwfilters”, cmd)if $i = 1 then ; goto :FI_HWF:let i = strindex(“version”, cmd

Page 94 - A-22 117382-A Rev. A

Sample Scripts117382-A Rev. A A-7 :FI_BASE_NM:setenv nextflag “”setenv pattern “”setenv nextid “*”array attr wfFDDICct wfFDDIState wfFDDIEnable

Page 96 - A-24 117382-A Rev. A

Writing Technician Interface ScriptsA-8 117382-A Rev. A################################################################## Show Alerts screen...#######

Page 97

Sample Scripts117382-A Rev. A A-9 # Do next circuit...#:FI_SKIPA:let i = $i + 1goto :FI_ALOOP:########################################################

Page 98 - A-26 117382-A Rev. A

Writing Technician Interface ScriptsA-10 117382-A Rev. A################################################################## Show Enabled screen...#####

Page 99

Sample Scripts117382-A Rev. A A-11 ################################################################## Print header for base/alerts/disabled/enabled sc

Page 100 - A-28 117382-A Rev. A

Writing Technician Interface ScriptsA-12 117382-A Rev. A:FI_STATE_ESC:printf “%-17.17s” “${value[$Madr]}”if ${value[$Bofl]} = 2 then ; \printf “%-4s”

Page 101 - Sample Scripts

Sample Scripts117382-A Rev. A A-13 :FI_STAT_NM:setenv nextflag “”setenv pattern “”setenv nextid “*”array attr wfFDDICct wfFDDICrcErrRx wfFDDIOve

Page 102 - A-30 117382-A Rev. A

Writing Technician Interface ScriptsA-14 117382-A Rev. A:FI_STLOOP:mibget -n wfFddiEntry attr $nextid value nextidif “$nextid” = “END” then; let i =

Page 103

Sample Scripts117382-A Rev. A A-15 ################################################################## Receive Errors screen...########################

Page 104 - A-32 117382-A Rev. A

Writing Technician Interface ScriptsA-16 117382-A Rev. Aprintf “%-4.4s %-4.4s %-8.8s %-10.10s %-10.10s %-10.10s %-10.10s\n” \“Slot” “Conn” “Circuit”

Page 105

Sample Scripts117382-A Rev. A A-17 array mac_attr wfFddiMacErrorCts/HEX_BYTES wfFddiMacLostCts/HEX_BYTESenum 1 errorcts lostctsmibget wfFddiMacEntry

Page 106 - A-34 117382-A Rev. A

117382-A Rev. A ix Tables Table 2-1. Script Commands ...2-1Table 2-

Page 107

Writing Technician Interface ScriptsA-18 117382-A Rev. Asetenv nextid “*”array attr wfFDDICct wfFDDISlot wfFDDINode wfFDDIAbortTx \wfFDDIUnderrunTx

Page 108 - A-36 117382-A Rev. A

Sample Scripts117382-A Rev. A A-19 :FI_SYSTEM:if $# < 3 then; goto :FI_Sy1:let cmdlen = strlen(“$3”)let i = strindex(“errors”, “$3”)if $i = 1 then

Page 109

Writing Technician Interface ScriptsA-20 117382-A Rev. A printf “%-4.4s %-4.4s %-8.8s %-10.10s %-10.10s %-10.10s %-10.10s \ %-10.10s\n” “----” “----”

Page 110 - A-38 117382-A Rev. A

Sample Scripts117382-A Rev. A A-21 # check for circuit name to match on...#if $# = 2 then ; goto :FI_SMT_NM:setenv cmd “$3”let len = strlen(cmd)if $le

Page 111

Writing Technician Interface ScriptsA-22 117382-A Rev. Aprintf “%4d %4d ” $(wfFddiEntry.wfFDDISlot.${list_[$i]}) \$(wfFddiEntry.wfFDDINode.${list_[$i]

Page 112

Sample Scripts117382-A Rev. A A-23 let state = $(wfFddiSmtEntry.wfFddiSmtCfState.${list_[$i]})if $state = 1 then ; printf “%-8s ” “Isolated”if $state

Page 113 - 117382-A Rev. A Index-1

Writing Technician Interface ScriptsA-24 117382-A Rev. A################################################################## MAC screen...# ############

Page 114 - 117382-A Rev. A

Sample Scripts117382-A Rev. A A-25 :FI_MAC_LP:on error :FI_MAC_NXT:if $i > $list_0 then; goto :FOOTER_AND_END: let cctnum = $(wfFddiEntry.wfFDDIC

Page 115 - 117382-A Rev. A Index-3

Writing Technician Interface ScriptsA-26 117382-A Rev. Aprintf “%10u\n” $(wfFddiMacExtEntry.wfFddiMacRingOpCts.${list_[$i]})cutenv -c9-15 name2 “$cct

Page 116

Sample Scripts117382-A Rev. A A-27 :FI_PORT_LP:on error :FI_PORT_NXT:if $i > $list_0 then; goto :FOOTER_AND_END:printf “%4d %4d ” $(wfFddiPortEntry

Comments to this Manuals

No comments