From d49aa9d629c70882e522f0bdc05dfb75c96bcd57 Mon Sep 17 00:00:00 2001 From: xugang Date: Thu, 6 Jul 2017 17:54:47 +0800 Subject: [PATCH] Add a description of the parameters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The content is as follows: class Console(object): :param force: Set to True to force on or False to force off def decode_eventdata(sensor_type, offset, eventdata, sdr): :param sdr: The sdr locator entry to help clarify how to parse data class EventHandler(object): :param ipmicmd: An ipmi command object to fetch data live Change-Id: Iddf06dadd585f1fc6185a9f599c30fec6051c055 --- pyghmi/ipmi/console.py | 1 + pyghmi/ipmi/events.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pyghmi/ipmi/console.py b/pyghmi/ipmi/console.py index 90ce2c88..cdb7267a 100644 --- a/pyghmi/ipmi/console.py +++ b/pyghmi/ipmi/console.py @@ -35,6 +35,7 @@ class Console(object): :param iohandler: Either a function to call with bytes, a filehandle to use for input and output, or a tuple of (input, output) handles + :param force: Set to True to force on or False to force off :param kg: optional parameter for BMCs configured to require it """ diff --git a/pyghmi/ipmi/events.py b/pyghmi/ipmi/events.py index 2df47954..86b57f46 100644 --- a/pyghmi/ipmi/events.py +++ b/pyghmi/ipmi/events.py @@ -200,6 +200,7 @@ def decode_eventdata(sensor_type, offset, eventdata, sdr): :param sensor_type: The sensor type number from the event :param offset: Sensor specific offset :param eventdata: The three bytes from the log or alert + :param sdr: The sdr locator entry to help clarify how to parse data """ if sensor_type == 5 and offset == 4: # link loss, indicates which port return 'Port {0}'.format(eventdata[1]) @@ -398,6 +399,7 @@ class EventHandler(object): manageable data. :param sdr: An SDR object (per pyghmi.ipmi.sdr) matching the target BMC SDR + :param ipmicmd: An ipmi command object to fetch data live """ def __init__(self, sdr, ipmicmd): self._sdr = sdr