1
2
3
4
5
6
7
8
9
10
11
12
13
14 from ZenModelRM import ZenModelRM
15 from ZenPackable import ZenPackable
16
17 -class MibBase(ZenModelRM, ZenPackable):
18
19 default_catalog = 'mibSearch'
20
21 _relations = ZenPackable._relations[:]
22
23 moduleName = ""
24 nodetype = ""
25 oid = ""
26 status = ""
27 description = ""
28
29 _properties = (
30 {'id':'moduleName', 'type':'string', 'mode':'w'},
31 {'id':'nodetype', 'type':'string', 'mode':'w'},
32 {'id':'oid', 'type':'string', 'mode':'w'},
33 {'id':'status', 'type':'string', 'mode':'w'},
34 {'id':'description', 'type':'string', 'mode':'w'},
35 )
36
37
38 - def __init__(self, id, title="", **kwargs):
43
44
46 """Return full value name in form MODULE::attribute.
47 """
48 return "%s::%s" % (self.moduleName, self.id)
49
50
52 """Return summary string for Mib objects.
53 """
54 return [str(getattr(self, p)) for p in self.propertyIds() \
55 if str(getattr(self, p))]
56
57
64
65
70
71
73 """
74 Device only propagates beforeDelete if we are being deleted or copied.
75 Moving and renaming don't propagate.
76 """
77 super(MibBase,self).manage_beforeDelete(item, container)
78 self.unindex_object()
79