Next / Previous / Contents / TCC Help System / NM Tech homepage

1. Overview

This document describes the implementation of the system described in hwscan3 3.0: TCC processor inventory report. It includes the entire source code in lightweight literate programming style.

This script is run as a cron job once a day. It generates two kinds of pages:

In general, the execution proceeds in two phases:

  1. Extract all the input information from three sources: LDAP, the XML-RPC GetHardware interface, and the scanreport.xml file.

    • TCC's ldap0 server will provide us with a complete list of all the hosts (servers and clients). For particulars, see LDAP attribute cross-reference.

      Note that servers such as login are considered clients by LDAP.

    • The XML-RPC interface GetHardware is the primary source for hardware configuration data. See the TCC internal Wiki under Software/HomeGrown/Forge/ForgeWeb/GetHardware.

      Any client in LDAP that is an office machine (tccOfficeMachine is true), or is not known to GetHardware, such as a Macintosh, will not appear in the report.

    • The scanreport.xml file characterizes rooms, and explicitly lists the rooms, services, and peripheral devices of interest.

  2. Generate the start page. While generating the start page content for each open lab and classroom, generate the room page for that room.

Before considering what classes we need, let's look at the order in which we need to access the data.

These needs suggest that there be two top-level class instances to represent all the input sources:

Hence, the two main phases of execution become: