16.01.2013 Views

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Ipswitch</strong> <strong>WhatsUp</strong> <strong>Gold</strong> <strong>User</strong> <strong>Guide</strong><br />

Keywords<br />

Note: To comment out a line, use the # symbol as the first character of the line.<br />

To send a string to a port, use the Send (on page 168)= keyword.<br />

To expect a string from a port, use the SimpleExpect (on page 167)= or the Expect (on<br />

page 167)= keyword.<br />

To receive a conditional response for an error or success, use Flow Control Keywords<br />

(on page 171).<br />

Examples<br />

If you have a TCP service to check, you need to do the following:<br />

expect something on connection<br />

send a command<br />

check for a response<br />

send something to disconnect<br />

b. Script Syntax: Expect=Keyword<br />

Expect=Keyword gives you flexibility to accept variable responses and pick out crucial<br />

information using special control characters and regular expressions. If you do not need<br />

flexibility, or are new to writing your own custom TCP/UDP scripts, you may want to use the<br />

SimpleExpect (on page 167) keyword.<br />

There are 4 variations of the Expect Keyword:<br />

Expect. Returns true when the expected value is matched.<br />

Expect(MatchCase). Only returns true when the case matches the expected value.<br />

DontExpect. Returns true when the value is not found.<br />

DontExpect(MatchCase). Returns true when the value is not found.<br />

The Expect syntax is Expect=Response, where the Response is either specified as an exact<br />

text string, or a mixture of regular expression rules (on page 172) and text. The Add/Edit<br />

Expect Rule button helps you construct and test a regular expression response string. It<br />

automatically chooses the variation of Expect for you based on options you select.<br />

Note: Add/Edit Expect Rule does not aid in the generation of SimpleExpect keywords.<br />

<strong>WhatsUp</strong> <strong>Gold</strong> v7 or v8 users: The ~, ^, ! and = = codes have been replaced with variations<br />

on the Expect keyword itself. Migrated definitions are automatically converted.<br />

167

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!