Installation guide
System Administration
Adding Custom Tests
13-28
4. Save any new classes as described in step 7 on page 13-15.
5. Push the new test out to all ESs as described in step 8 on page 13-16.
6. For the final test, connect to:
http://<NAC 800 ip>:88
and test your Windows endpoint. If you have ports open that are not
allowed, this test fails.
BasicTests API
Every NAC 800 test has a base functionality described as follows:
…
try:
self.bt.getregKeyExists(
“HKEY_LOCAL_MACHINE\\Software\\America Online\\AIM”)
except:
import sys
returnHash["status_code"] = 0
returnHash["result_code"] =
"unknown_error"
returnHash["result_message"] =
sys.exc_type, sys.exc_value
…
The following table describes the BasicTests API.
The BasicTests API accesses these functions with the SABase self.bt member. All methods throw an
exception that should be caught if an unexpected error occurs.
Return Value Public Method
Network API
String getMacAddresses(debug = 0)
Retrieves the MAC addresses for all interfaces on an endpoint. Returns
a carriage return separated string. Each line is in the following format:
<IP address> <MAC address> <internal transport name> <true if
configured for DHCP|false if not>
String getNetBIOSName(debug=0)
Returns the NetBIOS name of the specified host.
Table 13-2.BasicTests API