Figure 180: Checkopenports.py Script - Extreme Networks Sentriant AG Software User's Manual

Hide thumbs Also See for Sentriant AG:
Table of Contents

Advertisement

System Administration
All tests contain a reference to the
access to commonly used functions for testing endpoints including registry operations and
service operations. See
API. This example does not use this API.
2
Figure 180
Sentriant AG CD as
each section of the code.

Figure 180: 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.
#
330
"BasicTests API" on page 334
shows the code for the new
/sampleScripts/checkOpenPorts.py
class called
BasicTests
self.bt
for more information on the
test. The file is included on the
checkOpenPorts.py
. Review the code. The comments explain
. The
class gives you
self.bt
BasicTests
Sentriant AG Software Users Guide, Version 5.3

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sentriant ag 5.3

Table of Contents