1
2
3
4
5
6
7
8
9
10
11
12
13
14 __doc__="""HardDisk
15
16 HardDisk is a collection of devices and subsystems that make
17 up a business function
18
19 $Id: HardDisk.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 from Products.ZenModel.ZenossSecurity import *
31
41
42 addHardDisk = DTMLFile('dtml/addHardDisk',globals())
43
44
46 """HardDisk object"""
47
48 portal_type = meta_type = 'HardDisk'
49
50 manage_editHardDiskForm = DTMLFile('dtml/manageEditHardDisk',globals())
51
52 description = ""
53 hostresindex = 0
54
55 _properties = HWComponent._properties + (
56 {'id':'description', 'type':'string', 'mode':'w'},
57 {'id':'hostresindex', 'type':'int', 'mode':'w'},
58 )
59
60 _relations = HWComponent._relations + (
61 ("hw", ToOne(ToManyCont, "Products.ZenModel.DeviceHW", "harddisks")),
62 )
63
64
65 factory_type_information = (
66 {
67 'id' : 'HardDisk',
68 'meta_type' : 'HardDisk',
69 'description' : """Arbitrary device grouping class""",
70 'icon' : 'HardDisk_icon.gif',
71 'product' : 'ZenModel',
72 'factory' : 'manage_addHardDisk',
73 'immediate_view' : 'viewHardDisk',
74 'actions' :
75 (
76 { 'id' : 'status'
77 , 'name' : 'Status'
78 , 'action' : 'viewHardDisk'
79 , 'permissions' : ('View',)
80 },
81 { 'id' : 'perfConf'
82 , 'name' : 'Template'
83 , 'action' : 'objTemplates'
84 , 'permissions' : ("Change Device", )
85 },
86 { 'id' : 'viewHistory'
87 , 'name' : 'Modifications'
88 , 'action' : 'viewHistory'
89 , 'permissions' : (ZEN_VIEW_MODIFICATIONS,)
90 },
91 )
92 },
93 )
94
96
97
98 InitializeClass(HardDisk)
99