Information required for this report comes from three places:
For an overview of the TCC LDAP directory, see LDAP attribute cross-reference.
The LDAP tree for TCC client systems (including login servers) is:
ou=clients,ou=machines,dc=tcc,dc=nmt,dc=edu
The entries in this tree have class tccHardware. Attributes of interest from these
objects are:
cn
The client name, e.g., “speare4a-2-2”.
tccOfficeMachine
TRUE if the machine is in someone's
office and not publicly accessible.
tccSpecialOS
Undefined for dual-boot machines. Permissible
values are “Linux” or
“Mac OS X”.
Most of the information for this report comes from an
XML-RPC service described in the TCC Wiki under Software/Local/Forge/ForgeWeb/GetHardware.
In order to generate the specified report, we need certain pieces of information over and above the set of SysInfo reports:
A way to differentiate classroom workstations from open lab workstations.
A way to differentiate Linux-only systems from dual-boot workstations.
A list of servers that users need to know about.
Most servers (e.g., ldap0)
are nothing users need to access directly.
Which device types (e.g., scanner) should appear in the device
report.
Ideally, these bits of information should live in our LDAP directory. However, for the moment, we'll need to maintain a small data file. Keeping it in XML allows us to use standard tools, such as nxml-emacs, to maintain the file in a valid state.
Here's the schema, scanreport.rnc,
expressed in Relax
NG format. The root element is called
scanreport:
start = scanreport
scanreport = element scanreport
{ roomlist,
systemlist,
devicelist
}
The roomlist element defines the
set of room prefixes, differentiating them as type
class for classrooms and
open for open labs.
The type is “c” for classrooms, “o” for open labs.
The prefix attribute is used to match
rooms against client names. For example, the names
of all the clients in MSEC-III room 187 building start with
“msec187-”. In the
attribute here, we'll omit the trailing hyphen.
The full attribute is the formal name
of the room, e.g., “MSEC-III 187”.
roomlist = element roomlist
{ room*
}
room = element room
{ attribute type { 'c' | 'o' },
attribute prefix { text },
attribute full { text },
empty
}
The systemlist element is a list
of systems. Each system element
names one system that is either a public server, a
Linux-only box, or both.
systemlist = element systemlist { system* }
system = element system
{ attribute nodename { text },
attribute server { '0' | '1' }?,
attribute linux-only { '0' | '1' }?,
empty
}
The devicelist element
enumerates which device types are of interest to users.
The order of the included device
elements dictates the order of their presentation in the
device report. The kind attribute must be
uppercase, since its values must correspond to device
information returned by the GetHardware()
interface.
devicelist = element devicelist
{ device*
}
device = element device
{ attribute kind { text },
empty
}
Here is the entire scanreport.xml file. Typing a
make command in the directory
containing this document will generate the file.
<!--Do not edit this file directly. The original is
! in file hwscan3.xml, and 'make' will rebuild it.
!-->
<scanreport>
<roomlist>
<room type='c' prefix='cramer101' full='Cramer 101'/>
<room type='c' prefix='cramer120' full='Cramer 120'/>
<room type='o' prefix='fidel130' full='Fidel 130'/>
<room type='c' prefix='jonesa101' full='Jones A101'/>
<room type='c' prefix='jonesa104' full='Jones A104'/>
<room type='c' prefix='jonesa106' full='Jones A106'/>
<room type='o' prefix='library122' full='Library 122'/>
<room type='c' prefix='library207' full='Library 207'/>
<room type='c' prefix='library208' full='Library 208'/>
<room type='c' prefix='msec101' full='MSEC-III 101'/>
<room type='c' prefix='msec103' full='MSEC-III 103'/>
<room type='c' prefix='msec105' full='MSEC-III 105'/>
<room type='c' prefix='msec187' full='MSEC-III 187'/>
<room type='c' prefix='msec195' full='MSEC-III 195'/>
<room type='c' prefix='speare4' full='Speare 4'/>
<room type='c' prefix='speare4a' full='Speare 4A'/>
<room type='c' prefix='speare4b' full='Speare 4B'/>
<room type='o' prefix='speare5' full='Speare 5'/>
<room type='o' prefix='speare15' full='Speare 15'/>
<room type='c' prefix='speare23' full='Speare 23'/>
<room type='c' prefix='speare23a' full='Speare 23A'/>
<room type='c' prefix='speare23b' full='Speare 23B'/>
<room type='c' prefix='speare102' full='Speare 102'/>
<room type='c' prefix='speare113' full='Speare 113'/>
<room type='c' prefix='speare116' full='Speare 116'/>
<room type='o' prefix='speare142' full='Speare 142'/>
<room type='c' prefix='weir102' full='Weir 102'/>
<room type='c' prefix='weir128' full='Weir 128'/>
<room type='c' prefix='weir209' full='Weir 209'/>
<room type='c' prefix='workman101' full='Workman 101'/>
</roomlist>
<systemlist>
<system nodename='speare5-1-9' linux-only='1'/> <!--pi-->
<system nodename='speare5-1-14' linux-only='1'/> <!--corvette-->
<system nodename='speare5-1-15' linux-only='1'/> <!--cobra-->
<system nodename='speare5-1-16' linux-only='1'/> <!--boardwalk-->
<system nodename='speare5-1-17' linux-only='1'/> <!--eldorado-->
<system nodename='speare142-1-5' linux-only='1'/> <!--underdog-->
<system nodename='login' server='1'/>
<system nodename='login64' server='1'/>
<system nodename='rainbow' server='1'/>
</systemlist>
<devicelist>
<device kind='VIDEO'/>
<device kind='MONITOR'/>
<device kind='OPTICAL'/>
<device kind='SCANNER'/>
</devicelist>
</scanreport>