EasyManua.ls Logo

Cisco 11503 - CSS Content Services Switch

Cisco 11503 - CSS Content Services Switch
392 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
8-61
Cisco Content Services Switch Administration Guide
OL-5647-02
Chapter 8 Using the CSS Scripting Language
Script Keepalive Examples
! Defines:
set HostName “${ARGS}[1]”
set nProtocol “tcp”
! See if the user has specified a protocol
if ${ARGS}[#] “==” “2”
! The user specified a protocol, so reset the value
set nProtocol “${ARGS}[2]”
endbranch
set EXIT_MSG “Connection Failed”
! Connect to the remote host (use default timeout)
socket connect host ${HostName} port 7 ${nProtocol}
set EXIT_MSG “Send: Failed”
! Send the text to echo...
socket send ${SOCKET} “Hello Cisco!\n”
set EXIT_MSG “Waitfor: Failed”
! Wait for the reply from the echo (should be the same)
socket waitfor ${SOCKET} “Hello Cisco!” 200
! We've successfully logged in, the server is up and going.
! The job was done successfully.
socket disconnect ${SOCKET}
no set EXIT_MSG
exit script 0
HTTP Host Tag Keepalive
!no echo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Filename: ap-kal-httptag
! Parameters: HostName WebPage HostTag
!
! Description:
! This script will connect to the remote host and do an HTTP
! GET method upon the web page that the user has asked for.
! This script also adds a host tag to the GET request.
!
! Failure Upon:
! 1. Not establishing a connection with the host.
! 2. Not receiving an HTTP status “200 OK”
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Table of Contents

Other manuals for Cisco 11503 - CSS Content Services Switch

Related product manuals