1
2
3
4
5
6
7
8
9
10
11
12
13
14 from Globals import DTMLFile
15 from Globals import InitializeClass
16
17 from AccessControl import Permissions
18 from AccessControl import ClassSecurityInfo
19 from Products.ZenModel.ZenossSecurity import *
20
21 from Products.ZenRelations.RelSchema import *
22
23 from ServiceClass import ServiceClass
24
25
33
34
35 addIpServiceClass = DTMLFile('dtml/addIpServiceClass',globals())
36
38 """IpServiceClass object.
39 """
40 __pychecker__='no-override'
41
42 sendString = ""
43 expectRegex = ""
44
45 portal_type = meta_type = 'IpServiceClass'
46
47 _properties = ServiceClass._properties + (
48 {'id':'sendString', 'type':'string', 'mode':'w'},
49 {'id':'expectRegex', 'type':'string', 'mode':'w'},
50 )
51
52 factory_type_information = (
53 {
54 'immediate_view' : 'ipServiceClassStatus',
55 'actions' :
56 (
57 { 'id' : 'status'
58 , 'name' : 'Status'
59 , 'action' : 'ipServiceClassStatus'
60 , 'permissions' : (
61 Permissions.view, )
62 },
63 { 'id' : 'edit'
64 , 'name' : 'Edit'
65 , 'action' : 'ipServiceClassEdit'
66 , 'permissions' : ("Manage DMD", )
67 },
68 { 'id' : 'manage'
69 , 'name' : 'Administration'
70 , 'action' : 'ipServiceClassManage'
71 , 'permissions' : ("Manage DMD",)
72 },
73 { 'id' : 'zproperties'
74 , 'name' : 'zProperties'
75 , 'action' : 'zPropertyEdit'
76 , 'permissions' : ("Change Device",)
77 },
78 )
79 },
80 )
81
82 security = ClassSecurityInfo()
83
84 - def __init__(self, id, serviceKeys=(), description="", port=0):
87
88
89 security.declareProtected('Manage DMD', 'manage_editServiceClass')
90 - def manage_editServiceClass(self, name="", monitor=False, serviceKeys="",
91 port=0, description="", sendString="",
92 expectRegex="", REQUEST=None):
101
102
103
104 InitializeClass(IpServiceClass)
105