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  # Copyright (C) Zenoss, Inc. 2007, all rights reserved.
     4  #
     5  # This content is made available according to terms specified in
     6  # License.zenoss under the directory where your Zenoss product is installed.
     7  #
     8  ##############################################################################
     9
    10
    11  __doc__ = """CommandParser
    12
    13  CommandParser parses the output of a command to return a datamap
    14
    15  $Id: Uname_A.py,v 1.2 2003/10/01 23:40:51 edahl Exp $"""
    16
    17  __version__ = '$Revision: 1.2 $'[11:-2]
    18
    19  from CommandParser import CommandParser
    20
    21 -class Uname_A(CommandParser):
    22
    23      command = 'uname -a'
    24
    25 -    def condition(self, device, log):
    26          return "Servers" in device.getPrimaryPath()
    27
    28 -    def parse(self, device, results, log):
    29          om = self.newObjectMap()
    30          om['comments'] = results.strip()
    31          return om
    32
    33 -    def description(self):
    34          return "get uname -a from server and put in description"
    35