Package ZenModel :: Module HardwareClass
[hide private]
[frames] | no frames]

Source Code for Module ZenModel.HardwareClass

 1  ########################################################################### 
 2  # 
 3  # This program is part of Zenoss Core, an open source monitoring platform. 
 4  # Copyright (C) 2007, Zenoss Inc. 
 5  # 
 6  # This program is free software; you can redistribute it and/or modify it 
 7  # under the terms of the GNU General Public License version 2 as published by 
 8  # the Free Software Foundation. 
 9  # 
10  # For complete information please visit: http://www.zenoss.com/oss/ 
11  # 
12  ########################################################################### 
13   
14  __doc__="""HardwareClass 
15   
16  HardwareClass represents a software vendor's product. 
17   
18  $Id: HardwareClass.py,v 1.5 2003/03/08 18:34:24 edahl Exp $""" 
19   
20  __version__ = "$Revision: 1.5 $"[11:-2] 
21   
22  from Globals import DTMLFile 
23  from Globals import InitializeClass 
24   
25  from Products.ZenRelations.RelSchema import * 
26   
27  from ProductClass import ProductClass 
28   
29 -def manage_addHardwareClass(context, id, title = None, REQUEST = None):
30 """make a HardwareClass""" 31 d = HardwareClass(id, title) 32 context._setObject(id, d) 33 34 if REQUEST is not None: 35 REQUEST['RESPONSE'].redirect(context.absolute_url() 36 +'/manage_main')
37 38 addHardwareClass = DTMLFile('dtml/addHardwareClass',globals()) 39
40 -class HardwareClass(ProductClass):
41 """HardwareClass object""" 42 portal_type = meta_type = 'HardwareClass'
43 44 # factory_type_information = ( 45 # { 46 # 'id' : 'HardwareClass', 47 # 'meta_type' : 'HardwareClass', 48 # 'description' : """Class to manage product information""", 49 # 'icon' : 'HardwareClass_icon.gif', 50 # 'product' : 'ZenModel', 51 # 'factory' : 'manage_addHardwareClass', 52 # 'immediate_view' : 'viewProductOverview', 53 # 'actions' : 54 # ( 55 # { 'id' : 'overview' 56 # , 'name' : 'Overview' 57 # , 'action' : 'viewHardwareClassOverview' 58 # , 'permissions' : ( 59 # permissions.view, ) 60 # }, 61 # { 'id' : 'viewHistory' 62 # , 'name' : 'Modifications' 63 # , 'action' : 'viewHistory' 64 # , 'permissions' : ( 65 # permissions.view, ) 66 # }, 67 # ) 68 # }, 69 # ) 70 71 InitializeClass(HardwareClass) 72