The singleton class ClientSet holds
the configuration data for all TCC client systems
(including login servers). Here is the interface:
# - - - - - c l a s s C l i e n t S e t
class ClientSet(Singleton):
'''Represents all available public client configuration data.
Exports:
ClientSet(reportInfo):
[ (ldap0.nmt.edu contains client info) and
(the GetHardware XML-RPC interface has hardware
configuration data) and
(reportInfo is a ReportInfo instance) ->
return the singleton ClientSet() instance representing
the publicly accessible clients from ldap0.nmt.edu
known to GetHardware with peripheral configurations
as described by reportInfo ]
.genClients():
[ generate a sequence of ClientConfig instances representing
the clients in self, in alphabetical order by host name ]
.lookupClient(hostName):
[ type(hostName) is str ->
if self contains a client whose name matches hostName ->
return a ClientConfig instance representing the
configuration of that client
else -> raise KeyError ]
State/Invariants:
.__clientMap:
[ a dictionary whose keys are the host names of clients
in self, and each corresponding value is a ClientConfig
instance containing the configuration of that client ]
'''