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