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 InitializeClass
24
25 from Products.ZenRelations.RelSchema import *
26
27 from HWComponent import HWComponent
28
29 from Products.ZenModel.ZenossSecurity import *
30
31 -class CPU(HWComponent):
32 """CPU object"""
33
34 portal_type = meta_type = 'CPU'
35
36 socket = 0
37 clockspeed = 0
38 extspeed = 0
39 voltage = 0
40 cacheSizeL1 = 0
41 cacheSizeL2 = 0
42
43 _properties = (
44 {'id':'socket', 'type':'int', 'mode':'w'},
45 {'id':'clockspeed', 'type':'int', 'mode':'w'},
46 {'id':'extspeed', 'type':'int', 'mode':'w'},
47 {'id':'voltage', 'type':'int', 'mode':'w'},
48 {'id':'cacheSizeL1', 'type':'int', 'mode':'w'},
49 {'id':'cacheSizeL2', 'type':'int', 'mode':'w'},
50 )
51
52 _relations = HWComponent._relations + (
53 ("hw", ToOne(ToManyCont, "Products.ZenModel.DeviceHW", "cpus")),
54 )
55
56
57 factory_type_information = (
58 {
59 'id' : 'CPU',
60 'meta_type' : 'CPU',
61 'description' : """Arbitrary device grouping class""",
62 'icon' : 'CPU_icon.gif',
63 'product' : 'ZenModel',
64 'factory' : 'manage_addCPU',
65 'immediate_view' : 'viewCPU',
66 'actions' :
67 (
68 { 'id' : 'status'
69 , 'name' : 'Status'
70 , 'action' : 'viewCPU'
71 , 'permissions' : ('View',)
72 },
73 { 'id' : 'viewHistory'
74 , 'name' : 'Modifications'
75 , 'action' : 'viewHistory'
76 , 'permissions' : (ZEN_VIEW_MODIFICATIONS,)
77 },
78 )
79 },
80 )
81
82 InitializeClass(CPU)
83