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