Package Products :: Package DataCollector :: Package CommandParsers :: Module Uname_A |
[hide private]
[frames] | no frames]

# Source Code for Module Products.DataCollector.CommandParsers.Uname_A

     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__ = """CommandParser
    15
    16  CommandParser parses the output of a command to return a datamap
    17
    18  $Id: Uname_A.py,v 1.2 2003/10/01 23:40:51 edahl Exp $"""
    19
    20  __version__ = '$Revision: 1.2 $'[11:-2]
    21
    22  from CommandParser import CommandParser
    23
    24 -class Uname_A(CommandParser):
    25
    26      command = 'uname -a'
    27
    28 -    def condition(self, device, log):
    29          return "Servers" in device.getPrimaryPath()
    30
    31 -    def parse(self, device, results, log):
    32          om = self.newObjectMap()
    33          om['comments'] = results.strip()
    34          return om
    35
    36 -    def description(self):
    37          return "get uname -a from server and put in description"
    38