Novell ZENWORKS NETWORK ACCESS CONTROL 5.0 - 09-22-2008 User Manual page 345

Table of Contents

Advertisement

testName = "My check software not allowed"
_____________________________________________________________________________
#
# All test classes must define the runTest method with the self and debug
# parameters
#
def runTest(self,debug=0):
#
# Get the result hash from the CheckSoftwareNotAllowed test
# and modify the result message based on the result code.
#
result = CheckSoftwareNotAllowed.runTest(self,debug)
if result["result_code"] == "fail":
result["result_message"] = "The MyCheckSoftwareNotAllowed test
failed."
elif result["result_code"] == "pass":
result["result_message"] = "The MyCheckSoftwareNotAllowed test
passed."
return result
4 You can change the result["result_message"] to whatever text you want. This
message is what the end-user sees in the access windows. This text also appears in the
management user interface when you run reports.
5 Every test must return a hash with the following keys:
status_code – 0 test did not run, error occurred, 1 test ran
result_code – pass, fail
result_message – the text to display to the user
NOTE: Do not change the status_code or the result_code for this example.
6 Once you have completed your edits and saved the myCheckSoftwareNotAllowed.py
file, copy it to the following directory on the Novell ZENworks Network Access Control MS:
/usr/local/nac/scripts/Custom/Tests
7 If you have created new base classes, copy them to the following directory on the Novell
ZENworks Network Access Control MS:
/usr/local/nac/scripts/Custom/BaseClasses
IMPORTANT: When updating or modifying files, use the Custom directory tree (Custom/
BaseClasses, Custom/Tests). The Custom directory tree is a mirror (with symbolic links) to the
live test tree (scripts/BaseClasses and scripts/Tests). The live tree is not modified directly, but is
modified with the installCustomTests script and the RPM mechanism.
8 Once your custom test script is complete, and you are ready to push it out to all of the ESs,
verify that the scripts and base classes are under the Custom directory tree as specified above,
and enter the following on the command line of the Novell ZENworks Network Access Control
MS:
installCustomTests
System Administration 345

Advertisement

Table of Contents
loading

This manual is also suitable for:

Zenworks network access control 5.0

Table of Contents