~ubuntu-branches/ubuntu/lucid/landscape-client/lucid-updates

« back to all changes in this revision

Viewing changes to landscape/monitor/processorinfo.py

  • Committer: Package Import Robot
  • Author(s): Andreas Hasenack
  • Date: 2012-04-10 14:28:48 UTC
  • mfrom: (1.1.27)
  • mto: This revision was merged to the branch mainline in revision 35.
  • Revision ID: package-import@ubuntu.com-20120410142848-7xsy4g2xii7y7ntc
ImportĀ upstreamĀ versionĀ 12.04.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    In order to deal with the vagaries of parsing /proc/cpu
27
27
    information on the various platforms we support, message
28
28
    generation is deferred to per-platform message factories.
 
29
 
 
30
    @param delay: Set the starting delay.
 
31
    @param machine_name: The machine name to report.
 
32
    @param source_filename: The filesystem path to read information from.
29
33
    """
30
34
 
31
35
    persist_name = "processor-info"
34
38
 
35
39
    def __init__(self, delay=2, machine_name=None,
36
40
                 source_filename="/proc/cpuinfo"):
37
 
        """Initialize plugin with starting delay and source filename."""
38
41
        self._delay = delay
39
42
        self._source_filename = source_filename
40
43
 
115
118
 
116
119
 
117
120
class PowerPCMessageFactory:
118
 
    """Factory for ppc-based processors provides processor information."""
 
121
    """Factory for ppc-based processors provides processor information.
 
122
 
 
123
    @param source_filename: The file name of the data source.
 
124
    """
119
125
 
120
126
    def __init__(self, source_filename):
121
 
        """Initialize reader with filename of data source."""
122
127
        self._source_filename = source_filename
123
128
 
124
129
    def create_message(self):
145
150
 
146
151
 
147
152
class ARMMessageFactory:
148
 
    """Factory for arm-based processors provides processor information."""
 
153
    """Factory for arm-based processors provides processor information.
 
154
 
 
155
    @param source_filename: The file name of the data source.
 
156
    """
149
157
 
150
158
    def __init__(self, source_filename):
151
 
        """Initialize reader with filename of data source."""
152
159
        self._source_filename = source_filename
153
160
 
154
161
    def create_message(self):
183
190
 
184
191
 
185
192
class SparcMessageFactory:
186
 
    """Factory for sparc-based processors provides processor information."""
 
193
    """Factory for sparc-based processors provides processor information.
 
194
 
 
195
    @param source_filename: The file name of the data source.
 
196
    """
187
197
 
188
198
    def __init__(self, source_filename):
189
 
        """Initialize reader with filename of data source."""
190
199
        self._source_filename = source_filename
191
200
 
192
201
    def create_message(self):
216
225
 
217
226
 
218
227
class X86MessageFactory:
219
 
    """Factory for x86-based processors provides processor information."""
 
228
    """Factory for x86-based processors provides processor information.
 
229
 
 
230
    @param source_filename: The file name of the data source.
 
231
    """
220
232
 
221
233
    def __init__(self, source_filename):
222
 
        """Initialize reader with filename of data source."""
223
234
        self._source_filename = source_filename
224
235
 
225
236
    def create_message(self):