Figure 157:Checkopenports.py Script - Extreme Networks AG200 User Manual

Version 5.0
Table of Contents

Advertisement

System Administration
2
Figure 157
Sentriant AG CD as
each section of the code.
Figure 157: checkOpenPorts.py script
#!/usr/bin/python
from BaseClasses.SABase import SABase as SABase
#
# This allows a script to be tested from the command line.
#
if __name__ == '__main__':
import checkOpenPorts
t = checkOpenPorts.CheckOpenPorts()
t.processCommandLine()
#
# The class definition. All classes must be derived from the SABase class.
#
class CheckOpenPorts(SABase):
#
# Make up a test id. Just make sure it doesn't match any existing test
ids
#
testId = "CheckOpenPorts"
#
# Make up test name. Just make sure it doesn't match any existing test
names.
#
testName = "Open ports"
#
# Assign the test to an existing group or create a new group.
# Groups are configured and created in the policies.xml file <group>
# section (See the Adding new groups section).
#
testGroupId = "MyCustomTests"
#
# This is the HTML that will be displayed in the test properties page
# in the policy editor. All this HTML isn't REALLY necessary, but we
# to keep the Sentriant AG Web UI pretty.
#
314
shows the code for the new
/sampleTests/checkOpenPorts.py
test. The file is included on the
checkOpenPorts.py
. Review the code. The comments explain
Sentriant AG Users' Guide, Version 5.0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sentriant ag

Table of Contents