Package Products :: Package ZenModel :: Module CPU
[hide private]
[frames] | no frames]

Source Code for Module Products.ZenModel.CPU

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