Adding Custom Tests; Introduction; References; Changing The Error Messages In A Test Script - HP 800 User Manual

Network access controller
Hide thumbs Also See for 800:
Table of Contents

Advertisement

CAUTION:

Adding Custom Tests

Introduction

NAC 800 is an efficient, flexible and extensible testing platform. All tests are
implemented in the object oriented programming language called Python.
Python is a well- respected, clean, and efficient scripting language. Because
the language is object oriented and the NAC 800 test platform is extensible,
new tests can be developed easily.
Existing tests can also be extended using inheritance—a programming lan-
guage's ability to derive one class/script from another class and override and
extend methods of that class.
You need some programming experience to extend and add tests. If you have
previously used Perl to complete these tasks, you might find that Python is a
better choice as a programming language for the tasks described in the
following sections.
You should familiarize yourself with Python and with the rest of the NAC 800
product before attempting to create custom test scripts.

References

This version of NAC 800 uses Python v2.4.1.
Python home:
http://www.python.org/
Python 2.4.1 tutorial:
http://www.python.org/doc/2.4.1/tut/tut.html
Python language reference:
http://www.python.org/doc/2.4.1/
Sample test scripts are on the NAC 800 CD in the /sampleTests folder.

Changing the Error Messages in a Test Script

Using Python, try changing the error messages in an existing test script. This
task can help you to familiarize yourself with the NAC 800 scripting API. Each
NAC 800 test script defines a test class. To change an error message, create a
new script that derives a new test class from an existing test class and modify
the return hash of the runTest method. For example:
System Administration

Adding Custom Tests

13-13

Advertisement

Table of Contents
loading

This manual is also suitable for:

Procurve nac 800

Table of Contents