1
2
3
4
5
6
7
8
9
10
11
12
13
14 __doc__="""CPU
15
16 CPU is a collection of devices and subsystems that make
17 up a business function
18
19 $Id: CPU.py,v 1.7 2004/04/06 22:33:24 edahl Exp $"""
20
21 __version__ = "$Revision: 1.7 $"[11:-2]
22
23 from Globals import DTMLFile
24 from Globals import InitializeClass
25
26 from Products.ZenRelations.RelSchema import *
27
28 from HWComponent import HWComponent
29
30 -class CPU(HWComponent):
31 """CPU object"""
32
33 portal_type = meta_type = 'CPU'
34
35 socket = 0
36 clockspeed = 0
37 extspeed = 0
38 voltage = 0
39 cacheSizeL1 = 0
40 cacheSizeL2 = 0
41
42 _properties = (
43 {'id':'socket', 'type':'int', 'mode':'w'},
44 {'id':'clockspeed', 'type':'int', 'mode':'w'},
45 {'id':'extspeed', 'type':'int', 'mode':'w'},
46 {'id':'voltage', 'type':'int', 'mode':'w'},
47 {'id':'cacheSizeL1', 'type':'int', 'mode':'w'},
48 {'id':'cacheSizeL2', 'type':'int', 'mode':'w'},
49 )
50
51 _relations = HWComponent._relations + (
52 ("hw", ToOne(ToManyCont, "Products.ZenModel.DeviceHW", "cpus")),
53 )
54
55
56 factory_type_information = (
57 {
58 'id' : 'CPU',
59 'meta_type' : 'CPU',
60 'description' : """Arbitrary device grouping class""",
61 'icon' : 'CPU_icon.gif',
62 'product' : 'ZenModel',
63 'factory' : 'manage_addCPU',
64 'immediate_view' : 'viewCPU',
65 'actions' :
66 (
67 { 'id' : 'status'
68 , 'name' : 'Status'
69 , 'action' : 'viewCPU'
70 , 'permissions' : ('View',)
71 },
72 { 'id' : 'viewHistory'
73 , 'name' : 'Modifications'
74 , 'action' : 'viewHistory'
75 , 'permissions' : ('View',)
76 },
77 )
78 },
79 )
80
81 InitializeClass(CPU)
82