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

26. class ClientConfig: Configuration data for one client

An instance of this class represents all the pertinent information about a particular client.

hwscan3.py
# - - - - -   c l a s s   C l i e n t C o n f i g

class ClientConfig:
    '''Describes the hardware configuration of one client.

      Exports:
        ClientConfig ( reportInfo, hostName, os, hardMap ):
          [ (reportInfo is a ReportInfo instance) and
            (hostName is a client host name string) and
            (os is the client's tccSpecialOS value) and
            (hardMap is the result returned by GetHardware for
            the client) ->
              return a new ClientConfig instance representing
              those values, with device types from reportInfo ]
        .hostName:      [ as passed to constructor, read-only ]
        .os:            [ as passed to constructor, read-only ]
        .nCpus:         [ number of processors, an int ]
        .speed:         [ speed in MHz, an int ]
        .arch:          [ architecture, a str ]
        .memory:        [ memory in MB, an int ]
        .deviceList:
          [ a list of two-element lists [device type, description] ]
    '''

These class constants define the keys in hardMap.

hwscan3.py
    N_CPUS   =  'numCpus'
    SPEED    =  'cpuSpeed'
    ARCH     =  'arch'
    MEMORY   =  'systemMemory'
    DEVICES  =  'devices'