Jul 8, 2009 2:39 PM
Thresholds and custom class properties
-
Like (0)
class LinuxFileSystem(FileSystem):
_relations = OSComponent._relations + (
("os", ToOne(ToManyCont, "ZenPacks.atrawog.HelloLinux.zenmodel.LinuxOperatingSystem", "filesystems")),
)
_properties = OSComponent._properties + (
{'id':'mount', 'type':'string', 'mode':''},
{'id':'storageDevice', 'type':'string', 'mode':''},
{'id':'type', 'type':'string', 'mode':''},
{'id':'blockSize', 'type':'int', 'mode':''},
{'id':'totalFiles', 'type':'long', 'mode':''},
{'id':'maxNameLen', 'type':'int', 'mode':''},
)
def getTotalBlocks(self, default = None):
"""
Return the number of total blocks stored in the filesystem's rrd file
"""
blocks = self.cacheRRDValue('totalBlocks', default)
if blocks:
return long(blocks)
else:
return 0
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||