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 AccessControl import Permissions as permissions 
26   
27  from Products.ZenRelations.RelSchema import * 
28   
29  from ProductClass import ProductClass 
30   
31 -def manage_addHardwareClass(context, id, title = None, REQUEST = None):
32 """make a HardwareClass""" 33 d = HardwareClass(id, title) 34 context._setObject(id, d) 35 36 if REQUEST is not None: 37 REQUEST['RESPONSE'].redirect(context.absolute_url() 38 +'/manage_main')
39 40 addHardwareClass = DTMLFile('dtml/addHardwareClass',globals()) 41
42 -class HardwareClass(ProductClass):
43 """HardwareClass object""" 44 portal_type = meta_type = 'HardwareClass'
45 46 # factory_type_information = ( 47 # { 48 # 'id' : 'HardwareClass', 49 # 'meta_type' : 'HardwareClass', 50 # 'description' : """Class to manage product information""", 51 # 'icon' : 'HardwareClass_icon.gif', 52 # 'product' : 'ZenModel', 53 # 'factory' : 'manage_addHardwareClass', 54 # 'immediate_view' : 'viewProductOverview', 55 # 'actions' : 56 # ( 57 # { 'id' : 'overview' 58 # , 'name' : 'Overview' 59 # , 'action' : 'viewHardwareClassOverview' 60 # , 'permissions' : ( 61 # permissions.view, ) 62 # }, 63 # { 'id' : 'viewHistory' 64 # , 'name' : 'Modifications' 65 # , 'action' : 'viewHistory' 66 # , 'permissions' : ( 67 # permissions.view, ) 68 # }, 69 # ) 70 # }, 71 # ) 72 73 InitializeClass(HardwareClass) 74