Giter Site home page Giter Site logo

python-ipmi's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-ipmi's Issues

How to get sdr/ sensor

shell command:
ipmitool -I lanplus -H $hostname -U admin -P xxxxxx sensor

The document was not found.
How in the python implementation? thx ~

show methods or show class for py-ipmi

Based on your example I made an created the following code:
`

def show_device_id(device_id):
"""
Function printing the result of the get_device_id() in the order
as presented in the IPMI 2.0 standard. The only exception is the
'Additional Device Support' which is placed at the end and shows
all possible functions marking with [X] which are supported.
"""
functions = (
        ('SENSOR', 'Sensor Device', 11),
        ('SDR_REPOSITORY', 'SDR Repository Device', 3),
        ('SEL', 'SEL Device', 14),
        ('FRU_INVENTORY', 'FRU Inventory Device', 4),
        ('IPMB_EVENT_RECEIVER', 'IPMB Event Receiver', 5),
        ('IPMB_EVENT_GENERATOR', 'IPMB Event Generator', 4),
        ('BRIDGE', 'Bridge', 18),
        ('CHASSIS', 'Chassis Device', 10))
ChkBox=['[ ]','[X]']
print('''\n
Device ID:                  %(device_id)s
Provides Device SDRs:       %(provides_sdrs)s
Device Revision:            %(revision)s
Device Available:           %(available)d
Firmware Revision:          %(fw_revision)s
IPMI Version:               %(ipmi_version)s
Manufacturer ID:            %(manufacturer_id)d (0x%(manufacturer_id)04x)
Product ID:                 %(product_id)d (0x%(product_id)04x)
Aux Firmware Rev Info:      %(aux)s
Additional Device Support: '''[1:-1] % device_id.__dict__)
for n, s, l in functions:
    if device_id.supports_function(n):
        print('        %s%s%s' % (s,l*' ',ChkBox[1]))
    else:
        print('        %s%s%s' % (s,l*' ',ChkBox[0]))`

similarly I created another one:
`

def show_watchdog_timer(watchdog_timer):
"""
Function printing the result of the get_watchdog_timer().
"""
timer_use_const=['BIOS FRB2','BIOS/POST','OS Load','SMS/OS','OEM']
pretime_intr_const=['None','SMI','NMI','Msg intr']
timeout_act_const=['No action','Hard Reset','Power Down','Power Cycle']
print("""\n
Don't log:                  {0[dont_log]:}
Timer is running:           {0[is_running]:}
Pre-timout interval:        {0[pre_timeout_interval]:d}
Initial countdown value:    {0[initial_countdown]:d}
Present countdown value:    {0[present_countdown]:d}
"""[1:-1].format(watchdog.__dict__),end='')
print("    Timer use:                 ",
      timer_use_const[watchdog.__dict__['timer_use']-1])
print("    Timer use expiration flag: ",
      timer_use_const[watchdog_timer.__dict__['timer_use_expiration_flags']-1])
print("    Pre-timeout interrupt:     ",
      pretime_intr_const[watchdog.__dict__['pre_timeout_interval']])
print("    Time out action:           ",
      timeout_act_const[watchdog.__dict__['timeout_action']])`

Currently I am working on a third one, namely
def show_chassis_status(chassis_status):

So, probably we should create a new file where we collect all these functions. Of course, a more elegant solution would be to create a show' class which show method is inherited by the Ipmi class and based on the object type passed as an argument different method would be called. As an example, when you code you can do something like this
`

ipmi.show(device_id) # First function would be called
ipmi.show(watchdog_timer) # Second function would be called
ipmi.show(chassis_status) # Third function would be called`

What do you think?

BR/Ferenc

throw a error when I try to connect the ipmi host

image

I don't know how to get the IPMB, so, I use another issue code

interface = pyipmi.interfaces.create_interface('ipmitool', interface_type='lanplus')

    connection = pyipmi.create_connection(interface)

    connection.target = pyipmi.Target(0x20)
    connection.target.set_routing([(0x20, 0)])

    connection.session.set_session_type_rmcp(host_name, port=22)
    connection.session.set_auth_type_user(user, password)
    connection.session.establish()

    connection.get_chassis_status()

Feature request. SOL option

Any in-progress or plan to include the native SOL feature with this module ?

example :
ipmitool -H <server> -U <id> -P <pass> -I lanplus sol activate

OR
This module already have this feature ? i unable find from wiki docs

Thanks

test failed

  • pytest-3.7 tests
    ================================================================ test session starts =================================================================
    platform linux -- Python 3.7.2, pytest-3.6.4, py-1.5.4, pluggy-0.6.0
    rootdir: /home/lbazan/rpmbuild/BUILD/python-ipmi-0.4.1, inifile:
    plugins: cov-2.5.1
    collected 242 items

tests/test_bmc.py ... [ 1%]
tests/test_chassis.py . [ 1%]
tests/test_errors.py ........ [ 4%]
tests/test_fields.py ... [ 6%]
tests/test_fru.py ..FFF [ 8%]
tests/test_helper.py . [ 8%]
tests/test_hpm.py .......F [ 11%]
tests/test_ipmi.py ......... [ 15%]
tests/test_picmg.py ..... [ 17%]
tests/test_sdr.py ................ [ 24%]
tests/test_sel.py .. [ 25%]
tests/test_sensor.py . [ 25%]
tests/test_utils.py ............ [ 30%]
tests/interfaces/test_ipmb.py ........ [ 33%]
tests/interfaces/test_ipmitool.py ............. [ 39%]
tests/interfaces/test_rmcp.py ............... [ 45%]
tests/msgs/test_bmc.py ........ [ 48%]
tests/msgs/test_chassis.py .... [ 50%]
tests/msgs/test_device_messaging.py ............................. [ 62%]
tests/msgs/test_event.py .... [ 64%]
tests/msgs/test_fru.py ............... [ 70%]
tests/msgs/test_hpm.py ..... [ 72%]
tests/msgs/test_message.py ...... [ 74%]
tests/msgs/test_picmg.py ............. [ 80%]
tests/msgs/test_sdr.py ................ [ 86%]
tests/msgs/test_sel.py .... [ 88%]
tests/msgs/test_sensor.py ............................ [100%]

====================================================================== FAILURES ======================================================================
____________________________________________________________ test_fru_inventory_from_file ____________________________________________________________

def test_fru_inventory_from_file():
    path = os.path.dirname(os.path.abspath(__file__))
    fru_file = os.path.join(path, 'fru_bin/kontron_am4010.bin')
  fru = get_fru_inventory_from_file(fru_file)

tests/test_fru.py:32:


filename = '/home/lbazan/rpmbuild/BUILD/python-ipmi-0.4.1/tests/fru_bin/kontron_am4010.bin'

def get_fru_inventory_from_file(filename):
    try:
        file = open(filename, "rb")
    except IOError:
        print('Error open file "%s"' % filename)

    ################################
    # get file size
  file_size = os.stat(filename).st_size

E FileNotFoundError: [Errno 2] No such file or directory: '/home/lbazan/rpmbuild/BUILD/python-ipmi-0.4.1/tests/fru_bin/kontron_am4010.bin'

pyipmi/fru.py:99: FileNotFoundError
---------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------
Error open file "/home/lbazan/rpmbuild/BUILD/python-ipmi-0.4.1/tests/fru_bin/kontron_am4010.bin"
__________________________________________________________________ test_board_area ___________________________________________________________________

def test_board_area():
    path = os.path.dirname(os.path.abspath(__file__))
    fru_file = os.path.join(path, 'fru_bin/kontron_am4010.bin')
  fru = get_fru_inventory_from_file(fru_file)

tests/test_fru.py:39:


filename = '/home/lbazan/rpmbuild/BUILD/python-ipmi-0.4.1/tests/fru_bin/kontron_am4010.bin'

def get_fru_inventory_from_file(filename):
    try:
        file = open(filename, "rb")
    except IOError:
        print('Error open file "%s"' % filename)

    ################################
    # get file size
  file_size = os.stat(filename).st_size

E FileNotFoundError: [Errno 2] No such file or directory: '/home/lbazan/rpmbuild/BUILD/python-ipmi-0.4.1/tests/fru_bin/kontron_am4010.bin'

pyipmi/fru.py:99: FileNotFoundError
---------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------
Error open file "/home/lbazan/rpmbuild/BUILD/python-ipmi-0.4.1/tests/fru_bin/kontron_am4010.bin"
_________________________________________________________________ test_product_area __________________________________________________________________

def test_product_area():
    path = os.path.dirname(os.path.abspath(__file__))
    fru_file = os.path.join(path, 'fru_bin/kontron_am4010.bin')
  fru = get_fru_inventory_from_file(fru_file)

tests/test_fru.py:51:


filename = '/home/lbazan/rpmbuild/BUILD/python-ipmi-0.4.1/tests/fru_bin/kontron_am4010.bin'

def get_fru_inventory_from_file(filename):
    try:
        file = open(filename, "rb")
    except IOError:
        print('Error open file "%s"' % filename)

    ################################
    # get file size
  file_size = os.stat(filename).st_size

E FileNotFoundError: [Errno 2] No such file or directory: '/home/lbazan/rpmbuild/BUILD/python-ipmi-0.4.1/tests/fru_bin/kontron_am4010.bin'

pyipmi/fru.py:99: FileNotFoundError
---------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------
Error open file "/home/lbazan/rpmbuild/BUILD/python-ipmi-0.4.1/tests/fru_bin/kontron_am4010.bin"
_________________________________________________________________ test_upgrade_image _________________________________________________________________

def test_upgrade_image():
    path = os.path.dirname(os.path.abspath(__file__))
    hpm_file = os.path.join(path, 'hpm_bin/firmware.hpm')
  image = UpgradeImage(hpm_file)

tests/test_hpm.py:94:


pyipmi/hpm.py:678: in init
self._from_file(filename)


self = <pyipmi.hpm.UpgradeImage object at 0x7fd08d5f3358>, filename = '/home/lbazan/rpmbuild/BUILD/python-ipmi-0.4.1/tests/hpm_bin/firmware.hpm'

def _from_file(self, filename):

    try:
        file = open(filename, "rb")
    except IOError:
        print('Error open file "%s"' % filename)

    ################################
    # get file size
  file_size = os.stat(filename).st_size

E FileNotFoundError: [Errno 2] No such file or directory: '/home/lbazan/rpmbuild/BUILD/python-ipmi-0.4.1/tests/hpm_bin/firmware.hpm'

pyipmi/hpm.py:699: FileNotFoundError
---------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------
Error open file "/home/lbazan/rpmbuild/BUILD/python-ipmi-0.4.1/tests/hpm_bin/firmware.hpm"
================================================================== warnings summary ==================================================================
tests/msgs/test_message.py::TestMessage
cannot collect test class 'TestMessage' because it has a init constructor

-- Docs: http://doc.pytest.org/en/latest/warnings.html
================================================== 4 failed, 238 passed, 1 warnings in 3.69 seconds ==================================================
error: Bad exit status from /var/tmp/rpm-tmp.DMBEs1 (%check)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.DMBEs1 (%check)

missing data in PKG-INFO

Metadata-Version: 1.1
Name: python-ipmi
Version: 0.1.0
Author: UNKNOWN
Author-email: michael walle at kontron com
Home-page: https://github.com/kontron/python-ipmi
Download-url: UNKNOWN
Summary: Pure python IPMI library
License: LGPLv2+
Description: Pure Python IPMI Library
========================

    |BuildStatus|

    Features
    --------
    * RMCP interface (using ipmitool)
    * IPMB interface (The `Total Phase`_ Aardvark)

    Requirements
    ------------

    You need an either the `ipmitool`_ for accessing RCMP interface or a
    `Total Phase`_ Aardvark for communication over the IPMB interface.

    Contributing
    ------------

    Contributions are always welcome. You may send patches directly (eg. ``git
    send-email``), do a github pull request or just file an issue.

    * respect the coding style (eg. PEP8),
    * provide well-formed commit message (see `this blog post
      <http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html>`_.)
    * add a Signed-off-by line (eg. ``git commit -s``)

    License
    -------

    This library is free software; you can redistribute it and/or modify it
    under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation; either version 2.1 of the License, or (at
    your option) any later version.

    This library is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
    License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this library; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

    .. _Total Phase: http://www.totalphase.com
    .. _ipmitool: http://sourceforge.net/projects/ipmitool/
    .. |BuildStatus| image:: https://travis-ci.org/kontron/python-ipmi.png?branch=master
                     :target: https://travis-ci.org/kontron/python-ipmi
    .. |PyPiVersion| image:: https://badge.fury.io/py/python-ipmi.svg
                     :target: http://badge.fury.io/py/python-ipmi

Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Software Development :: Libraries :: Python Modules

'ipmitool.py fru print 0 all' fails

With python-ipmi 0.1.0 I ran the following. "sipl_tm" is a custom interface I have added to communicate IPMI commands over a RS232 interface in TM (terminal mode) format.

python pyipmi\ipmitool.py -I sipl_tm fru print 0 all

Output:

<snip>
Multirecord Area:
Traceback (most recent call last):
  File "pyipmi\ipmitool.py", line 575, in <module>
    main()
  File "pyipmi\ipmitool.py", line 478, in main
    cmd(ipmi, args)
  File "pyipmi\ipmitool.py", line 223, in cmd_fru_print
    print '  %s' % record
  File "C:\Users\paul.barker\Git\ca-ipmi-test\lib\pyipmi\fru.py", line 261, in __str__
    return '%02x: %s' % (self.type,
AttributeError: FruPicmgRecord instance has no attribute 'type'

On line 261 of fru.py I can fix this issue by changing self.type to self.record_type_id and the resulting output makes sense. Is that the correct fix?

Issue with pyipmi.interfaces

I have installed the "pip install pyipmi"

[root@5d6ffa863468 ~]# python
Python 2.7.7 (default, Jul 21 2015, 10:02:08)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import pyipmi
>>> import pyipmi.interfaces
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named interfaces

Python 3 support

I have been working on making this work with python 3, and I believe I have been successful.
I have all tests passing, and the example in the readme + a few other variations have identical behavior in both python 2 & 3.
You can find the fork here https://github.com/Teslafly/python-ipmi
The thing is, this was fairly quick and dirty, (futureise & 2to3 + i/o fixes) and I have alternative (aka, custom) hardware / uses for this library, so am not able to test most interfaces / functionality.

If this can be tested, or reviewed in any way to make sure it actually works in the intended circumstances, that would be preferable to do before a pull.

options `-R`(retry) request

Do you have any plans to provide -R (retry) option?

-R retry Set the number of retries for lan/lanplus interface [default=4]

If ipmitool request to a hostname that does not exist, the following error occurs after about 5 seconds.

ipmitool

$ ipmitool -I lanplus -U user-P password -H 172.16.1.10  chassis status
Error: Unable to establish IPMI v2 / RMCP+ session

python-ipmi

ipmi.get_chassis_status()

Traceback (most recent call last):
  File "ipmitool/ipmi.py", line 16, in <module>
    device_id = ipmi.get_device_id()
  File "pyipmi/bmc.py", line 25, in get_device_id
    return DeviceId(self.send_message_with_name('GetDeviceId'))
  File "pyipmi/init.py", line 206, in send_message_with_name
    rsp = self.send_message(req)
  File "pyipmi/init.py", line 190, in send_message
    rsp = self.interface.send_and_receive(req)
  File "pyipmi/interfaces/ipmitool.py", line 146, in send_and_receive
    rsp_data = self.send_and_receive_raw(req.target, req.lun, req.netfn,
  File "pyipmi/interfaces/ipmitool.py", line 119, in send_and_receive_raw
    raise RuntimeError('ipmitool failed with rc=%d' % rc)
RuntimeError: ipmitool failed with rc=1

Since this time is too long, if i use the -R 1 option, an error is returned within 2 seconds.

$ ipmitool -I lanplus -U user -P password -H 172.16.1.10  chassis status -R 1

So, I want the following change.
https://github.com/kontron/python-ipmi/blob/0.4.2/pyipmi/interfaces/ipmitool.py#L187

...
    cmd += (' -R "%d"' % 1) # '1' is example, to be variable
...

Do you agree to offer these options? If you agree, I will send you an MR.

Fails to install on python 2.6

While installing through pip in Python 2.6 got following error message:

(jjb_env)[manjunath@oc1275007250 ~]$ pip install python-ipmi
You are using pip version 7.1.0, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting python-ipmi
/home/manjunath/jjb_env/lib/python2.6/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading python-ipmi-0.1.2.tar.gz (54kB)
100% |████████████████████████████████| 57kB 228kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 20, in
File "/tmp/pip-build-2L4i46/python-ipmi/setup.py", line 11, in
version = subprocess.check_output(
AttributeError: 'module' object has no attribute 'check_output'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-2L4i46/python-ipmi

Should give me proper message saying not supported on 2.6.! should block installing on python 2.6 if not supported.

Missing DCIM

Hello,

I was writing script which would pooling power usage from servers over IPMI and noticed that there is no DCIM section implemented in this module.

Accessing Aardvark through Python IPMI module on windows fails

Hi Team,
I have installed Python-ipmi module with 2.7 version python, I am using Total Phase Aardvark and running an example to create IPMI Interface, so whenever run that I am getting an Pop up Error as Error while Initializing Driver.

But I could able to use Aardvark device though their Control phase application, it detects the Aardvark device and also able to use their Python API's to read the number of devices connected with port and serial number.

Could you anyone share details/comments on this issue?
I would like to create a IPMI connection using python-ipmi module with aardvark device and do read/write with IPMI supported device.

Not able to established session

import pyipmi
import pyipmi.interfaces

interface = pyipmi.interfaces.create_interface(interface='ipmitool',
interface_type='lanplus')
ipmi = pyipmi.create_connection(interface)
ipmi.session.set_session_type_rmcp('10.20.100.40', port=623)
ipmi.session.set_auth_type_user('admin', 'admin')
ipmi.target = pyipmi.Target(ipmb_address=0x82, routing=[(0x81,0x20,0),(0x20,0x82,7)])
ipmi.session.establish()
device_id = ipmi.get_device_id()

Response :
Traceback (most recent call last):
File "ipmitool.py", line 13, in
device_id = ipmi.get_device_id()
File "/usr/lib/python2.7/site-packages/pyipmi/bmc.py", line 25, in get_device_id
return DeviceId(self.send_message_with_name('GetDeviceId'))
File "/usr/lib/python2.7/site-packages/pyipmi/init.py", line 206, in send_message_with_name
rsp = self.send_message(req)
File "/usr/lib/python2.7/site-packages/pyipmi/init.py", line 190, in send_message
rsp = self.interface.send_and_receive(req)
File "/usr/lib/python2.7/site-packages/pyipmi/interfaces/ipmitool.py", line 145, in send_and_receive
req_data.tostring())
File "/usr/lib/python2.7/site-packages/pyipmi/interfaces/ipmitool.py", line 117, in send_and_receive_raw
raise RuntimeError('ipmitool failed with rc=%d' % rc)
RuntimeError: ipmitool failed with rc=1

Establish a session

Is there a way to establish and keep a session open. What I understand is that each time an ipmitool command is run a new session is established with the BMC and your program does the same thing for each command issued to the BMC. But if ipmitool is run with the shell command it maintains one session open for all commands entered in the shell. Is such a thing possible with your tool? Thanks.

SyntaxError: Missing parentheses in call to 'print'. Did you mean print("build_libdoc requires the Robot Framework package.")? when using released 0.2.2 version

Hi ,
I've been trying to install version 0.2.2 on centos with python3.6 and getting following error :

"
Collecting robotframework-ipmilibrary==0.2.2 (from -r requirements.txt (line 67))
Downloading https://files.pythonhosted.org/packages/62/08/61f1cf31f50fa85089cc33408d92c6ad8e160c93c1a75d4a5ca0f53ac205/robotframework-ipmilibrary-0.2.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-l_f7aqpw/robotframework-ipmilibrary/setup.py", line 49
print "build_libdoc requires the Robot Framework package."
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("build_libdoc requires the Robot Framework package.")?

"
isn't this version of library suppose to work on python3.6?

Getting error as : socket.timeout: timed out

import pyipmi
import pyipmi.interfaces

interface = pyipmi.interfaces.create_interface(interface='rmcp',
slave_address=0x81,
host_target_address=0x20,
keep_alive_interval=1)
ipmi = pyipmi.create_connection(interface)
ipmi.session.set_session_type_rmcp(host='10.20.100.40', port=623)
ipmi.session.set_auth_type_user(username='admin', password='admin')
ipmi.target = pyipmi.Target(ipmb_address=0x20)
ipmi.session.establish()
device_id = ipmi.get_device_id()
Response:

File "rmcp.py", line 12, in
ipmi.session.establish()
File "/usr/lib/python2.7/site-packages/pyipmi/session.py", line 104, in establish
self.interface.establish_session(self)
File "/usr/lib/python2.7/site-packages/pyipmi/interfaces/rmcp.py", line 456, in establish_session
self.ping()
File "/usr/lib/python2.7/site-packages/pyipmi/interfaces/rmcp.py", line 395, in ping
self._receive_asf_msg(AsfPong)
File "/usr/lib/python2.7/site-packages/pyipmi/interfaces/rmcp.py", line 377, in receive_asf_msg
(
, class_of_msg, data) = self._receive()
File "/usr/lib/python2.7/site-packages/pyipmi/interfaces/rmcp.py", line 342, in _receive
(pdu, _) = self._sock.recvfrom(4096)
socket.timeout: timed out

read_fru_data function problem

env:
python 3.7.8
python-ipmi 0.5.1

I want to get the following information through pyipmi
image
I tried read_fru_data() function, but get the following
image
How to return a JSON or object object?(Why not return a JSON or object)
Is there any other way?

about fru_info = connection.get_fru_inventory()

can't get fru info!
what's the error?
fru_info = connection.get_fru_inventory() File "build\bdist.win-amd64\egg\pyipmi\fru.py", line 92, in get_fru_inventory File "build\bdist.win-amd64\egg\pyipmi\fru.py", line 74, in read_fru_data File "build\bdist.win-amd64\egg\pyipmi\__init__.py", line 196, in send_message_with_name File "build\bdist.win-amd64\egg\pyipmi\__init__.py", line 181, in send_message File "build\bdist.win-amd64\egg\pyipmi\interfaces\ipmitool.py", line 136, in send_and_receive print('') File "build\bdist.win-amd64\egg\pyipmi\interfaces\ipmitool.py", line 112, in send_and_receive_raw print("LNC: %s" % t_lnc) RuntimeError: ipmitool failed with rc=1

send_message method can loop forever

Hi,

In the following code block:

 def send_message(self, req):
        req.target = self.target
        req.requester = self.requester

        retry = 3
        while True:
            retry -= 1
            try:
                rsp = self.interface.send_and_receive(req)
                break
            except CompletionCodeError as e:
                if e.cc == msgs.constants.CC_NODE_BUSY:
                    retry -= 1
                    continue

        return rsp

The "retry" variable is actually never checked. Also, If we get a CompletionCodeError when trying to call self.interface.send_and_receive, we substract one to the retry again even though we've only done a single attempt (but substracted 2 to the retry). If we consistently fail to complete the command, the while loop will never exit. Finally, "rsp" isn't initialized and the "continue" statement at the end of the code block is unecessary: the next line would automatically go to the next iteration of the while loop.

This can probably be fixed with something like that (not tested):

 def send_message(self, req):
        req.target = self.target
        req.requester = self.requester
        rsp = None
        retry = 3
        while retry > 0:
            retry -= 1
            try:
                rsp = self.interface.send_and_receive(req)
                break
            except CompletionCodeError as e:
                pass
        return rsp

Document native rmcp transport

In refference to issue #24.
I've FINALLY had a bit of time to mess with this a little bit. Apologies for being so busy on other things.
I'm trying to figure out what the correct way to make an rmpc native connection is.
I've tried the following, but I can't seem to make the rmcp interface work.

interface = create_interface("rmcp")
interface.port = 623
interface.host = self.hostname
ipmi = pyipmi.create_connection(self.interface)
ipmi.session.set_auth_type_user(self.username, self.password)
ipmi.session.set_session_type_rmcp(self.hostname, port=623)
ipmi.target = pyipmi.Target(0x82)
# ipmi.target.set_routing([(0x81,0x20,0),(0x20,0x82,7)])
ipmi.get_chassis_status()

If we can get a quick start for rmcp going, I'll take some time to update the readme markdown on the front page.

Writing documentation

Hi,

I am very glad that you made effort on putting this library together. I definitely would like to use it for gathering sensor and other info from the distance of our server designed by us . This feature would be useful for making predictive maintenance with machine learning in the future.

I am new to github, so I do not know how to contribute to this project (also my python knowledge is moderate only).

As a first step I want to contribute by writing a documentation for this library. I started writing in Word doc a few days ago, but I assume this is not the preferred format (maybe Jupyter Notebook?). While I am writing the doc I use mostly reverse engineering by reading your code (that is also a good exercise for knowing better python) and also with trial and error by using our servers for sending/receiving IPMI commands (I am also new to IPMI standard, so this is another area which I am learning).

Please, provide your feedback., what format shall be used for documenting the library. Meanwhile I attached what I did till now.
pyipmi_doc.docx

Regards,
Ferenc

AttributeError: 'NoneType' object has no attribute 'routing'

Hello Guys, anyone would know what am I doing wrong?

Here's one of my servers:

$ ipmitool -H 10.8.1.18 -U root -P pass -I lanplus fru print 0
     Board Mfg Date        : Wed Oct 24 05:37:00 2018
     Board Mfg             : MYMFG
     Board Product         : MYBPD
     Board Serial          : MYBSN
     Board Part Number     : MYBPN
     Product Manufacturer  : MYMFG
     Product Name          : MYPPN
     Product Version       : 01
     Product Serial        : MYSER
     Product Asset Tag     : MYAST

Trying to deal with FRU in a script:

#!/bin/env python
    import pyipmi
    import pyipmi.interfaces
    def main():
        interface = pyipmi.interfaces.create_interface('ipmitool',
                                        interface_type='lanplus')
        ipmi = pyipmi.create_connection(interface)
        ipmi.session.set_session_type_rmcp('10.8.1.18', port=623)
        ipmi.session.set_auth_type_user('root', 'pass')
        ipmi.session.establish()
        fru = ipmi.get_fru_inventory(0)
        ipmi.session.close()
    if __name__ == "__main__":
        main()

but I get this error:

# python ./ipmi11.py
Traceback (most recent call last):
  File "./ipmi11.py", line 18, in <module>
    main()
  File "./ipmi11.py", line 13, in main
    fru = ipmi.get_fru_inventory()
  File "/usr/lib/python2.7/site-packages/pyipmi/fru.py", line 88, in get_fru_inventory
    return FruInventory(self.read_fru_data(fru_id=fru_id))
  File "/usr/lib/python2.7/site-packages/pyipmi/fru.py", line 58, in read_fru_data
    area_size = self.get_fru_inventory_area_info(fru_id)
  File "/usr/lib/python2.7/site-packages/pyipmi/fru.py", line 35, in get_fru_inventory_area_info
    fru_id=fru_id)
  File "/usr/lib/python2.7/site-packages/pyipmi/__init__.py", line 206, in send_message_with_name
    rsp = self.send_message(req)
  File "/usr/lib/python2.7/site-packages/pyipmi/__init__.py", line 190, in send_message
    rsp = self.interface.send_and_receive(req)
  File "/usr/lib/python2.7/site-packages/pyipmi/interfaces/ipmitool.py", line 147, in send_and_receive
    req_data.tostring())
  File "/usr/lib/python2.7/site-packages/pyipmi/interfaces/ipmitool.py", line 96, in send_and_receive_raw
    cmd = self._build_ipmitool_cmd(target, lun, netfn, raw_bytes)
  File "/usr/lib/python2.7/site-packages/pyipmi/interfaces/ipmitool.py", line 205, in _build_ipmitool_cmd
    cmd += self._build_ipmitool_target(target)
  File "/usr/lib/python2.7/site-packages/pyipmi/interfaces/ipmitool.py", line 165, in _build_ipmitool_target
    if target.routing is not None:
AttributeError: 'NoneType' object has no attribute 'routing'

Ideas? Thanks!

Got TypeError: unsupported format string passed to bytes.__format__ when listing sensors

Hi!
So, I am trying to use the python module to get the health of my system using the sensors. So I have outragously took part of the code in ipmitool to have this sensors and their values. But on a supermicro server, I an error (sometimes it's a timeout, sometimes, an error). When I run the ipmitool, I got this:

$ ipmitool.py -I rmcp -H 10.65.xxx.xx -U ADMIN -P XXXXXX sdr  list
SDR-ID |     | Device String      |
=======|=====|====================|====================
0x0004 |   1 | b'CPU1 Temp'       |      40.0 | 0xc0
0x0047 |   2 | b'CPU2 Temp'       |      42.0 | 0xc0
0x008a |   9 | b'Inlet Temp'      |      22.0 | 0xc0
0x00cd |  11 | b'System Temp'     |      31.0 | 0xc0
0x0110 |  12 | b'Peripheral Temp' |      48.0 | 0xc0
0x0153 |  16 | b'VRMCpu1 Temp'    |      38.0 | 0xc0
0x0196 |  17 | b'VRMCpu2 Temp'    |      37.0 | 0xc0
0x01d9 |  18 | b'VRMSoc1 Temp'    |      45.0 | 0xc0
0x021c |  19 | b'VRMSoc2 Temp'    |      38.0 | 0xc0
0x025f |  20 | b'VRMP1ABCD Temp'  |      41.0 | 0xc0
0x02a2 |  21 | b'VRMP1EFGH Temp'  |      41.0 | 0xc0
0x02e5 |  22 | b'VRMP2ABCD Temp'  |      33.0 | 0xc0
0x0328 |  23 | b'VRMP2EFGH Temp'  |      36.0 | 0xc0
0x036b | 176 | b'P1-DIMMA1 Temp'  |      37.0 | 0xc0
0x03ae | 178 | b'P1-DIMMB1 Temp'  |      37.0 | 0xc0
0x03f1 | 180 | b'P1-DIMMC1 Temp'  |      37.0 | 0xc0
0x0434 | 182 | b'P1-DIMMD1 Temp'  |      36.0 | 0xc0
0x0477 | 184 | b'P1-DIMME1 Temp'  |      34.0 | 0xc0
0x04ba | 186 | b'P1-DIMMF1 Temp'  |      34.0 | 0xc0
0x04fd | 188 | b'P1-DIMMG1 Temp'  |      33.0 | 0xc0
0x0540 | 190 | b'P1-DIMMH1 Temp'  |      33.0 | 0xc0
0x0583 | 208 | b'P2-DIMMA1 Temp'  |      31.0 | 0xc0
0x05c6 | 210 | b'P2-DIMMB1 Temp'  |      31.0 | 0xc0
0x0609 | 212 | b'P2-DIMMC1 Temp'  |      31.0 | 0xc0
0x064c | 214 | b'P2-DIMMD1 Temp'  |      30.0 | 0xc0
0x068f | 216 | b'P2-DIMME1 Temp'  |      34.0 | 0xc0
0x06d2 | 218 | b'P2-DIMMF1 Temp'  |      33.0 | 0xc0
0x0715 | 220 | b'P2-DIMMG1 Temp'  |      33.0 | 0xc0
0x0758 | 222 | b'P2-DIMMH1 Temp'  |      33.0 | 0xc0
0x079b |  65 | b'FAN1'            |    8600.0 | 0xc0
0x07de |  66 | b'FAN2'            |    8700.0 | 0xc0
Traceback (most recent call last):
  File "/home/rpelissi/venv/lib64/python3.6/site-packages/pyipmi/ipmitool.py", line 188, in cmd_sdr_list
    (value, states) = ipmi.get_sensor_reading(s.number)
  File "/home/rpelissi/venv/lib64/python3.6/site-packages/pyipmi/sensor.py", line 164, in get_sensor_reading
    lun=lun)
  File "/home/rpelissi/venv/lib64/python3.6/site-packages/pyipmi/__init__.py", line 207, in send_message_with_name
    check_completion_code(rsp.completion_code)
  File "/home/rpelissi/venv/lib64/python3.6/site-packages/pyipmi/utils.py", line 47, in check_completion_code
    raise CompletionCodeError(cc)
pyipmi.errors.CompletionCodeError: CompletionCodeError cc=0xcb desc=Requested data not present

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rpelissi/venv/bin/ipmitool.py", line 11, in <module>
    load_entry_point('python-ipmi==0.4.2', 'console_scripts', 'ipmitool.py')()
  File "/home/rpelissi/venv/lib64/python3.6/site-packages/pyipmi/ipmitool.py", line 593, in main
    cmd(ipmi, args)
  File "/home/rpelissi/venv/lib64/python3.6/site-packages/pyipmi/ipmitool.py", line 207, in cmd_sdr_list
    e.cc))
TypeError: unsupported format string passed to bytes.__format__

Any idea on how I can debug this? I am not too familiar with ipmi but if I can give you more infos, just let me know!
Thanks again for this code!

AttributeError: 'ByteBuffer' object has no attribute 'tobytes'

When using the latest version from git, python-ipmi fails on Ubuntu 20.04. Relevant code snippet:

interface = pyipmi.interfaces.create_interface(interface='ipmitool', interface_type='lanplus')
ipmi = pyipmi.create_connection(interface)
ipmi.session.set_session_type_rmcp(host=fqdn, port=port)
ipmi.session.set_auth_type_user(username=username, password=password)
ipmi.target = pyipmi.Target()
ipmi.session.establish()
ipmi_info = ipmi.get_device_id()
Traceback (most recent call last):
  File "example.py", line 7
    ipmi_info = ipmi.get_device_id()
  File "/usr/lib/python3/dist-packages/pyipmi/bmc.py", line 25, in get_device_id
    return DeviceId(self.send_message_with_name('GetDeviceId'))
  File "/usr/lib/python3/dist-packages/pyipmi/__init__.py", line 206, in send_message_with_name
    rsp = self.send_message(req)
  File "/usr/lib/python3/dist-packages/pyipmi/__init__.py", line 190, in send_message
    rsp = self.interface.send_and_receive(req)
  File "/usr/lib/python3/dist-packages/pyipmi/interfaces/ipmitool.py", line 147, in send_and_receive
    py3_array_tobytes(req_data))
  File "/usr/lib/python3/dist-packages/pyipmi/utils.py", line 57, in py3_array_tobytes
    return msg.tobytes()
AttributeError: 'ByteBuffer' object has no attribute 'tobytes'

Tagged release

Hi,

I'm looking at using python-ipmi in some software development and it would be good to be using a released version rather than just the HEAD of the master branch. Do you have any plans to make a release with a version number?

Thanks,
Paul

How to realize "sel elist"

The result of command "ipmitool xxx sel list" are raw log, how to realize the "sel elist" result ? Thanks.

getting errors/warnings in pkg installation in virtual environment

i'm getting errors in pkg installation in virtual environment:

python setup.py install
venv/lib/python3.6/site-packages/setuptools/dist.py:407: UserWarning: The version specified ('0.4.0-33-g3943149') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
"details." % self.metadata.version

byte-compiling build/bdist.linux-x86_64/egg/pyipmi/version.py to version.cpython-36.pyc
File "build/bdist.linux-x86_64/egg/pyipmi/version.py", line 2
version = 'b'0.4.0-33-g3943149''
^
SyntaxError: invalid syntax

Extracting python_ipmi-0.4.0_33_g3943149-py3.6.egg to venv/lib/python3.6/site-packages
File "venv/lib/python3.6/site-packages/python_ipmi-0.4.0_33_g3943149-py3.6.egg/pyipmi/version.py", line 2
version = 'b'0.4.0-33-g3943149''
^
SyntaxError: invalid syntax


i also get this errors in installation using pip

is there a way to use pyipmi to emulate IPMC

Hi, i would like to know if it is possible to use this library as a IPMC. So i can emulate IPMC and test it with this library as well for development for both IPMC and ChassisManager.

Python 3.7 is throwing DeprecationWarning

  • virtual_env_3_7/lib64/python3.7/site-packages/pyipmi/msgs/message.py:371: DeprecationWarning: tostring() is deprecated. Use tobytes() instead.
    return data.tostring()

  • virtual_env_3_7/lib64/python3.7/site-packages/pyipmi/interfaces/ipmitool.py:144: DeprecationWarning: fromstring() is deprecated. Use frombytes() instead.
    req_data.push_string(encode_message(req))

  • virtual_env_3_7/lib64/python3.7/site-packages/pyipmi/interfaces/ipmitool.py:147: DeprecationWarning: tostring() is deprecated. Use tobytes() instead.
    req_data.tostring())

  • virtual_env_3_7/lib64/python3.7/site-packages/pyipmi/msgs/message.py:367: DeprecationWarning: tostring() is deprecated. Use tobytes() instead.
    return data.tostring()

Documentation

Hello guys!

Any docs/examples for a python newbie? ;) Tnx.

python-ipmi fails to build with Python 3.9: 'array.array' object has no attribute 'fromstring'/'tostring'

  • export PYTHONPATH=/builddir/build/BUILDROOT/python-ipmi-0.4.2-2.fc33.x86_64//usr/lib/python3.9/site-packages
  • PYTHONPATH=/builddir/build/BUILDROOT/python-ipmi-0.4.2-2.fc33.x86_64//usr/lib/python3.9/site-packages
  • nosetests-3.9 -v tests
    /builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py:40: SyntaxWarning: "is" with a literal. Did you mean "=="?
    if data[1] is 0xff:
    /builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py:206: SyntaxWarning: "is not" with a literal. Did you mean "!="?
    and status.command_in_progress is not 0x34:
    /builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/lan.py:61: SyntaxWarning: "is not" with a literal. Did you mean "!="?
    if revision_only is not 1:
    /builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py:377: SyntaxWarning: "is" with a literal. Did you mean "=="?
    if (capabilities & 0x03) is 0:
    /builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py:379: SyntaxWarning: "is" with a literal. Did you mean "=="?
    if (capabilities & 0x03) is 1:
    /builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py:381: SyntaxWarning: "is" with a literal. Did you mean "=="?
    if (capabilities & 0x03) is 2:
    /builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py:383: SyntaxWarning: "is" with a literal. Did you mean "=="?
    if (capabilities & 0x03) is 3:
    tests.interfaces.test_ipmb.test_checksum ... ok
    tests.interfaces.test_ipmb.test_header_encode ... ERROR
    tests.interfaces.test_ipmb.test_header_rsp_decode ... ok
    tests.interfaces.test_ipmb.test_encode_ipmb_msg ... ERROR
    tests.interfaces.test_ipmb.test_encode_send_message ... ERROR
    tests.interfaces.test_ipmb.test_encode_bridged_message ... ERROR
    tests.interfaces.test_ipmb.test_decode_bridged_message ... ok
    tests.interfaces.test_ipmb.test_rx_filter ... ERROR
    tests.interfaces.test_ipmitool.TestIpmitool.test_build_ipmitool_target_ipmb_address ... ok
    tests.interfaces.test_ipmitool.TestIpmitool.test_build_ipmitool_target_routing_2 ... ok
    tests.interfaces.test_ipmitool.TestIpmitool.test_build_ipmitool_target_routing_3 ... ok
    tests.interfaces.test_ipmitool.TestIpmitool.test_rmcp_ping ... ok
    tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive ... ok
    tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive_raw_completion_code_not_ok ... ERROR
    tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive_raw_completion_code_timeout ... ERROR
    tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive_raw_lanplus ... ERROR
    tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive_raw_no_auth ... ERROR
    tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive_raw_return_value ... ERROR
    tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive_raw_serial ... ERROR
    tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive_raw_timeout_without_response ... ok
    tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive_raw_valid ... ERROR
    tests.interfaces.test_rmcp.TestAsfMsg.test_pack ... ok
    tests.interfaces.test_rmcp.TestAsfMsg.test_tostr ... ok
    tests.interfaces.test_rmcp.TestAsfMsg.test_unpack ... ok
    tests.interfaces.test_rmcp.TestAsfPing.test_pack ... ok
    tests.interfaces.test_rmcp.TestAsfPong.test_unpack ... ok
    tests.interfaces.test_rmcp.TestIpmiMsg.test_ipmimsg_pack ... ERROR
    tests.interfaces.test_rmcp.TestIpmiMsg.test_ipmimsg_pack_auth_md5 ... ok
    tests.interfaces.test_rmcp.TestIpmiMsg.test_ipmimsg_pack_password ... ok
    tests.interfaces.test_rmcp.TestIpmiMsg.test_ipmimsg_pack_with_data ... ERROR
    tests.interfaces.test_rmcp.TestIpmiMsg.test_ipmimsg_pack_with_session ... ERROR
    tests.interfaces.test_rmcp.TestIpmiMsg.test_ipmimsg_unpack ... ok
    tests.interfaces.test_rmcp.TestIpmiMsg.test_ipmimsg_unpack_auth ... ok
    tests.interfaces.test_rmcp.TestRmcp.test_send_and_receive ... ok
    tests.interfaces.test_rmcp.TestRmcpMsg.test_rmcpmsg_pack ... ok
    tests.interfaces.test_rmcp.TestRmcpMsg.test_rmcpmsg_unpack ... ok
    tests.msgs.test_bmc.test_getdeviceid_decode_rsp_with_cc ... ok
    tests.msgs.test_bmc.test_getdeviceid_decode_valid_res ... ok
    tests.msgs.test_bmc.test_getdeviceid_decode_valid_res_wo_aux ... ok
    tests.msgs.test_bmc.test_getselftestresults_decode_test_passed_rsp ... ok
    tests.msgs.test_bmc.test_getselftestresults_decode_test_fail_not_implemented_rsp ... ok
    tests.msgs.test_bmc.test_getselftestresults_decode_test_fail_corrupted_sel_rsp ... ok
    tests.msgs.test_bmc.test_getselftestresults_decode_test_fail_corrupted_sdr_rsp ... ok
    tests.msgs.test_bmc.test_getselftestresults_decode_test_fail_corrupted_fru_rsp ... ok
    tests.msgs.test_chassis.test_getchassisstatus_encode_valid_req ... ERROR
    tests.msgs.test_chassis.test_getchassisstatus_decode_valid_rsp ... ok
    tests.msgs.test_chassis.test_getchassisstatus_decode_valid_optional_byte_rsp ... ok
    tests.msgs.test_chassis.test_chassiscontrol_encode_valid_req ... ERROR
    tests.msgs.test_device_messaging.test_setbmcglobalenables_encode_all_disabled_req ... ERROR
    tests.msgs.test_device_messaging.test_setbmcglobalenables_encode_enable_oem_2_req ... ERROR
    tests.msgs.test_device_messaging.test_setbmcglobalenables_encode_enable_oem_1_req ... ERROR
    tests.msgs.test_device_messaging.test_setbmcglobalenables_encode_enable_oem_0_req ... ERROR
    tests.msgs.test_device_messaging.test_setbmcglobalenables_encode_enable_receive_queue_interrupt_req ... ERROR
    tests.msgs.test_device_messaging.test_getbmcglobalenables_decode_all_disabled_rsp ... ok
    tests.msgs.test_device_messaging.test_getbmcglobalenables_decode_oem_2_enabled_rsp ... ok
    tests.msgs.test_device_messaging.test_getbmcglobalenables_decode_oem_0_enabled_rsp ... ok
    tests.msgs.test_device_messaging.test_clearmessageflags_encode_clear_none_req ... ERROR
    tests.msgs.test_device_messaging.test_clearmessageflags_encode_clear_oem_2_req ... ERROR
    tests.msgs.test_device_messaging.test_clearmessageflags_encode_clear_oem_0_req ... ERROR
    tests.msgs.test_device_messaging.test_clearmessageflags_encode_clear_receive_message_queue_req ... ERROR
    tests.msgs.test_device_messaging.test_getmessageflags_decode_not_flag_set_rsp ... ok
    tests.msgs.test_device_messaging.test_getmessageflags_decode_oem_2_set_rsp ... ok
    tests.msgs.test_device_messaging.test_getmessageflags_decode_event_message_full_set_rsp ... ok
    tests.msgs.test_device_messaging.test_enablemessagechannelreceive_encode_all_off_req ... ERROR
    tests.msgs.test_device_messaging.test_enablemessagechannelreceive_encode_channel1_enable_req ... ERROR
    tests.msgs.test_device_messaging.test_enablemessagechannelreceive_encode_channel2_enable_req ... ERROR
    tests.msgs.test_device_messaging.test_enablemessagechannelreceive_decode_channel1_enabled_rsp ... ok
    tests.msgs.test_device_messaging.test_getmessage_decode_no_data_rsp ... ok
    tests.msgs.test_device_messaging.test_getmessage_decode_with_data_rsp ... ok
    tests.msgs.test_device_messaging.test_readeventmessagebuffer_decode_rsp ... ok
    tests.msgs.test_device_messaging.test_masterwriteread_encode_req_all_zero_read ... ERROR
    tests.msgs.test_device_messaging.test_masterwriteread_encode_req_for_read ... ERROR
    tests.msgs.test_device_messaging.test_masterwriteread_encode_req_for_write ... ERROR
    tests.msgs.test_device_messaging.test_masterwriteread_decode_rsp ... ok
    tests.msgs.test_device_messaging.test_get_channel_authentication_capabilities_req ... ERROR
    tests.msgs.test_device_messaging.test_get_channel_authentication_capabilities_rsp ... ok
    tests.msgs.test_device_messaging.test_get_session_challenge_req ... ERROR
    tests.msgs.test_event.test_seteventreceiver_encode_lun0_req ... ERROR
    tests.msgs.test_event.test_seteventreceiver_encode_lun3_req ... ERROR
    tests.msgs.test_event.test_geteventreceiver_decode_lun0_rsp ... ok
    tests.msgs.test_event.test_geteventreceiver_decode_lun3_rsp ... ok
    tests.msgs.test_fru.test_fruinventoryareainfo_decode_valid_rsp ... ok
    tests.msgs.test_fru.test_writefrudatareq_decode_valid_req ... ok
    tests.msgs.test_fru.test_writefrudatareq_encode_valid_req ... ERROR
    tests.msgs.test_fru.test_writefrudatareq_decode_valid_req_wo_data ... ok
    tests.msgs.test_fru.test_writefrudatareq_encode_valid_req_wo_data ... ERROR
    tests.msgs.test_fru.test_writefrudatareq_decode_invalid_req ... ok
    tests.msgs.test_fru.test_readfrudatareq_decode_valid_req ... ok
    tests.msgs.test_fru.test_readfrudatareq_decode_short_req ... ok
    tests.msgs.test_fru.test_readfrudatareq_decode_long_req ... ok
    tests.msgs.test_fru.test_readfrudatareq_encode_valid_req ... ERROR
    tests.msgs.test_fru.test_readfrudatarsp_decode_valid_rsp ... ok
    tests.msgs.test_fru.test_readfrudatarsp_decode_rsp_with_cc ... ok
    tests.msgs.test_fru.test_readfrudatarsp_decode_invalid_rsp ... ok
    tests.msgs.test_fru.test_readfrudatarsp_encode_valid_rsp ... ERROR
    tests.msgs.test_fru.test_readfrudatarsp_encode_invalid_rsp ... ok
    tests.msgs.test_hpm.test_uploadfirmwareblockreq_encode ... ERROR
    tests.msgs.test_hpm.test_activatefirmwarereq_decode_valid_req ... ok
    tests.msgs.test_hpm.test_activatefirmwarereq_encode_valid_req ... ERROR
    tests.msgs.test_hpm.test_activatefirmwarereq_decode_valid_req_wo_optional ... ok
    tests.msgs.test_hpm.test_activatefirmwarereq_encode_valid_req_wo_optional ... ERROR
    tests.msgs.test_message.test_unsignedint_encode ... ok
    tests.msgs.test_message.test_unsignedint_decode ... ok
    tests.msgs.test_message.test_string_encode ... ERROR
    tests.msgs.test_message.test_string_decode ... ERROR
    tests.msgs.test_message.test_remainingbytes_encode ... ok
    tests.msgs.test_message.test_message ... ok
    tests.msgs.test_picmg.test_get_picmg_properties_req ... ok
    tests.msgs.test_picmg.test_get_address_info_picmg_2_9_rsp ... ok
    tests.msgs.test_picmg.test_get_address_info_picmg_3_0_rsp ... ok
    tests.msgs.test_picmg.test_get_address_info_mtca_rsp ... ok
    tests.msgs.test_picmg.test_get_shelf_address_info_rsp ... ok
    tests.msgs.test_picmg.test_clear_activation_lock_req ... ERROR
    tests.msgs.test_picmg.test_set_activation_lock_req ... ERROR
    tests.msgs.test_picmg.test_clear_deactivation_lock_req ... ERROR
    tests.msgs.test_picmg.test_set_deactivation_lock_req ... ERROR
    tests.msgs.test_picmg.test_decode_rsp_local_control_state ... ok
    tests.msgs.test_picmg.test_decode_rsp_override_mode ... ok
    tests.msgs.test_picmg.test_decode_rsp_lamp_test_and_override_mode ... ok
    tests.msgs.test_picmg.test_decode_rsp_only_lamp_test_mode ... ok
    tests.msgs.test_sdr.test_getsdrrepositoryinfo_encode_req ... ERROR
    tests.msgs.test_sdr.test_getsdrrepositoryinfo_decode_rsp ... ok
    tests.msgs.test_sdr.test_getsdrrepositoryallocationinfo_encode_req ... ERROR
    tests.msgs.test_sdr.test_getsdrrepositoryallocationinfo_decode_rsp ... ok
    tests.msgs.test_sdr.test_reservesdrrepository_encode_req ... ERROR
    tests.msgs.test_sdr.test_reservesdrrepository_decode_rsp ... ok
    tests.msgs.test_sdr.test_getsdr_encode_req ... ERROR
    tests.msgs.test_sdr.test_getsdr_decode_rsp ... ok
    tests.msgs.test_sdr.test_addsdr_encode_req ... ERROR
    tests.msgs.test_sdr.test_addsdr_decode_rsp ... ok
    tests.msgs.test_sdr.test_partialaddsdr_encode_req ... ERROR
    tests.msgs.test_sdr.test_partialaddsdr_decode_rsp ... ok
    tests.msgs.test_sdr.test_deletesdr_encode_req ... ERROR
    tests.msgs.test_sdr.test_deletesdr_decode_rsp ... ok
    tests.msgs.test_sdr.test_clearsdrrepository_encode_req ... ERROR
    tests.msgs.test_sdr.test_clearsdrrepository_decode_rsp ... ok
    tests.msgs.test_sel.test_getselentry_decode_rsp_with_cc ... ok
    tests.msgs.test_sel.test_getselentry_decode_invalid_rsp ... ok
    tests.msgs.test_sel.test_getselentry_decode_valid_rsp ... ok
    tests.msgs.test_sel.test_getselentry_encode_valid_rsp ... ERROR
    tests.msgs.test_sensor.test_getdevicesdrinfo_encode_req ... ERROR
    tests.msgs.test_sensor.test_getdevicesdrinfo_encode_rsp ... ok
    tests.msgs.test_sensor.test_getdevicesdrinfo_encode_rsp_with_timestamp ... ok
    tests.msgs.test_sensor.test_getdevicesdr_encode_req ... ERROR
    tests.msgs.test_sensor.test_getdevicesdr_decode_rsp ... ok
    tests.msgs.test_sensor.test_setsensorhysteresis_encode_req ... ERROR
    tests.msgs.test_sensor.test_getsensorhysteresis_encode_req ... ERROR
    tests.msgs.test_sensor.test_getsensorhysteresis_decode_rsp ... ok
    tests.msgs.test_sensor.test_setsensorthresholds_encode_req_set_unr ... ERROR
    tests.msgs.test_sensor.test_setsensorthresholds_encode_req_set_ucr ... ERROR
    tests.msgs.test_sensor.test_setsensorthresholds_encode_req_set_unc ... ERROR
    tests.msgs.test_sensor.test_setsensorthresholds_encode_req_set_lnr ... ERROR
    tests.msgs.test_sensor.test_setsensorthresholds_encode_req_set_lcr ... ERROR
    tests.msgs.test_sensor.test_setsensorthresholds_encode_req_set_lnc ... ERROR
    tests.msgs.test_sensor.test_setsensoreventenable_encode_req ... ERROR
    tests.msgs.test_sensor.test_setsensoreventenable_encode_cfg_req ... ERROR
    tests.msgs.test_sensor.test_setsensoreventenable_encode_scanning_enabled_req ... ERROR
    tests.msgs.test_sensor.test_setsensoreventenable_encode_event_enabled_req ... ERROR
    tests.msgs.test_sensor.test_setsensoreventenable_encode_byte3_req ... ERROR
    tests.msgs.test_sensor.test_setsensoreventenable_encode_byte34_req ... ERROR
    tests.msgs.test_sensor.test_getsensoreventenable_encode_req ... ERROR
    tests.msgs.test_sensor.test_getsensoreventenable_decode_event_enabled_rsp ... ok
    tests.msgs.test_sensor.test_getsensoreventenable_decode_scanning_enabled_rsp ... ok
    tests.msgs.test_sensor.test_getsensoreventenable_decode_byte3_rsp ... ok
    tests.msgs.test_sensor.test_getsensoreventenable_decode_byte34_rsp ... ok
    tests.msgs.test_sensor.test_getsensoreventenable_decode_byte3456_rsp ... ok
    tests.msgs.test_sensor.test_rearmsensorevents_encode_req ... ERROR
    tests.msgs.test_sensor.test_rearmsensorevents_decode_rsp ... ok
    tests.test_bmc.test_watchdog_object ... ok
    tests.test_bmc.test_deviceid_object ... ERROR
    tests.test_bmc.test_deviceid_object_with_aux ... ERROR
    tests.test_chassis.test_chassisstatus_object ... ok
    tests.test_errors.test_DecodingError ... ok
    tests.test_errors.test_EncodingError ... ok
    tests.test_errors.test_CompletionCodeError ... ok
    tests.test_errors.test_NotSupportedError ... ok
    tests.test_errors.test_DescriptionError ... ok
    tests.test_errors.test_RetryError ... ok
    tests.test_errors.test_DataNotFound ... ok
    tests.test_errors.test_HpmError_no_msg ... ok
    tests.test_fields.test_versionfield_object ... ERROR
    tests.test_fields.test_versionfield_invalid ... ok
    tests.test_fields.test_versionfield_decoding_error ... ok
    tests.test_fru.test_frudata_object ... ok
    tests.test_fru.test_commonheader_object ... ok
    tests.test_fru.test_fru_inventory_from_file ... ok
    tests.test_fru.test_board_area ... ok
    tests.test_fru.test_product_area ... ok
    tests.test_helper.test_clear_repository_helper ... ok
    tests.test_hpm.TestComponentProperty.test_currentversion ... ERROR
    tests.test_hpm.TestComponentProperty.test_deferredversion ... ERROR
    tests.test_hpm.TestComponentProperty.test_descriptionstring ... ERROR
    tests.test_hpm.TestComponentProperty.test_descriptionstring_with_trailinge_zeros ... ERROR
    tests.test_hpm.TestComponentProperty.test_general ... ok
    tests.test_hpm.TestComponentProperty.test_rollbackversion ... ERROR
    tests.test_hpm.test_upgradeactionrecord_create_from_data ... ERROR
    tests.test_hpm.test_upgrade_image ... ERROR
    tests.test_ipmi.test_target ... ok
    tests.test_ipmi.test_target_routing ... ok
    tests.test_ipmi.test_routing ... ok
    tests.test_ipmi.test_target_set_routing ... ok
    tests.test_ipmi.test_target_set_routing_from_string ... ok
    tests.test_ipmi.test_ipmi_send_message_retry ... ok
    tests.test_ipmi.test_ipmi_send_message_retry_error ... ok
    tests.test_ipmi.test_ipmi_send_message_with_name ... ok
    tests.test_ipmi.test_ipmi_send_message_with_name_and_kwargs ... ok
    tests.test_picmg.test_to_request ... ok
    tests.test_picmg.test_to_request_function_on ... ok
    tests.test_picmg.test_to_request_function_off ... ok
    tests.test_picmg.test_to_request_function_blinking ... ok
    tests.test_picmg.test_to_request_function_lamp_test ... ok
    tests.test_sdr.TestSdrCommon.test_invalid_data_length ... ok
    tests.test_sdr.TestSdrCommon.test_object ... ok
    tests.test_sdr.TestSdrCompactSensorRecord.test_decode ... ERROR
    tests.test_sdr.TestSdrCompactSensorRecord.test_invalid_length ... ok
    tests.test_sdr.TestSdrFruDeviceLocatorRecord.test_decode ... ERROR
    tests.test_sdr.TestSdrFruDeviceLocatorRecord.test_invalid_length ... ok
    tests.test_sdr.TestSdrFullSensorRecord.test_convert_complement ... ok
    tests.test_sdr.TestSdrFullSensorRecord.test_convert_sensor_raw_to_value ... ok
    tests.test_sdr.TestSdrFullSensorRecord.test_decocde ... ERROR
    tests.test_sdr.TestSdrFullSensorRecord.test_decode_capabilities ... ok
    tests.test_sdr.TestSdrFullSensorRecord.test_invalid_length ... ok
    tests.test_sdr.TestSdrFullSensorRecord.test_linearization ... ok
    tests.test_sdr.TestSdrFullSensorRecord.test_linearization_key_error ... ok
    tests.test_sdr.TestSdrManagementControllerDeviceRecord.test_decode ... ERROR
    tests.test_sdr.TestSdrManagementControllerDeviceRecord.test_invalid_length ... ok
    tests.test_sdr.test_sdreventonlysensorrecord ... ok
    tests.test_sel.TestSelEnty.test_from_data ... ok
    tests.test_sel.TestSelEnty.test_from_data_event_data ... ok
    tests.test_sel.TestSelEnty.test_from_data_event_direction ... ok
    tests.test_sel.TestSelEnty.test_from_data_event_type ... ok
    tests.test_sel.TestSelEnty.test_type_to_string ... ok
    tests.test_sensor.test_set_sensor_thresholds ... ok
    tests.test_utils.test_bytebuffer_init_from_list ... ok
    tests.test_utils.test_bytebuffer_init_from_tuple ... ok
    tests.test_utils.test_bytebuffer_initi_fromstring ... ok
    tests.test_utils.test_bytebuffer_push_unsigned_int ... ok
    tests.test_utils.test_bytebuffer_pop_unsigned_int ... ok
    tests.test_utils.test_bytebuffer_pop_unsigned_int_error ... ok
    tests.test_utils.test_bytebuffer_push_string ... ERROR
    tests.test_utils.test_bytebuffer_pop_string ... ERROR
    tests.test_utils.test_bytebuffer_tostring ... ERROR
    tests.test_utils.test_bytebuffer_pop_slice ... ERROR
    tests.test_utils.test_bytebuffer_pop_slice_error ... ok
    tests.test_utils.test_chunks ... ok
    ======================================================================
    ERROR: tests.interfaces.test_ipmb.test_header_encode

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/interfaces/test_ipmb.py", line 27, in test_header_encode
data = header.encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/interfaces/ipmb.py", line 65, in encode
return data.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.interfaces.test_ipmb.test_encode_ipmb_msg

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/interfaces/test_ipmb.py", line 51, in test_encode_ipmb_msg
eq_(encode_ipmb_msg(header, b'\xaa\xbb\xcc'),
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/interfaces/ipmb.py", line 97, in encode_ipmb_msg
msg.fromstring(header.encode())
AttributeError: 'array.array' object has no attribute 'fromstring'

ERROR: tests.interfaces.test_ipmb.test_encode_send_message

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/interfaces/test_ipmb.py", line 56, in test_encode_send_message
data = encode_send_message(b'\xaa\xbb', 0x12, 0x20, 7, 0x22)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/interfaces/ipmb.py", line 121, in encode_send_message
data = encode_message(req)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.interfaces.test_ipmb.test_encode_bridged_message

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/interfaces/test_ipmb.py", line 70, in test_encode_bridged_message
data = encode_bridged_message(t.routing, header, payload, seq=0x22)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/interfaces/ipmb.py", line 149, in encode_bridged_message
tx_data = encode_ipmb_msg(header, payload)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/interfaces/ipmb.py", line 97, in encode_ipmb_msg
msg.fromstring(header.encode())
AttributeError: 'array.array' object has no attribute 'fromstring'

ERROR: tests.interfaces.test_ipmb.test_rx_filter

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/interfaces/test_ipmb.py", line 103, in test_rx_filter
rx_data = encode_ipmb_msg(header_rsp, b'\xaa\xbb\xcc')
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/interfaces/ipmb.py", line 97, in encode_ipmb_msg
msg.fromstring(header.encode())
AttributeError: 'array.array' object has no attribute 'fromstring'

ERROR: tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive_raw_completion_code_not_ok

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/interfaces/test_ipmitool.py", line 123, in test_send_and_receive_raw_completion_code_not_ok
data = self._interface.send_and_receive_raw(target, 0, 0x6, b'\x01')
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/interfaces/ipmitool.py", line 138, in send_and_receive_raw
return data.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'
-------------------- >> begin captured logging << --------------------
pyipmi: DEBUG: IPMI RX: cc
--------------------- >> end captured logging << ---------------------

ERROR: tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive_raw_completion_code_timeout

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/interfaces/test_ipmitool.py", line 111, in test_send_and_receive_raw_completion_code_timeout
data = self._interface.send_and_receive_raw(target, 0, 0x6, b'\x01')
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/interfaces/ipmitool.py", line 138, in send_and_receive_raw
return data.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'
-------------------- >> begin captured logging << --------------------
pyipmi: DEBUG: IPMI RX: c3
--------------------- >> end captured logging << ---------------------

ERROR: tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive_raw_lanplus

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/interfaces/test_ipmitool.py", line 72, in test_send_and_receive_raw_lanplus
interface.send_and_receive_raw(target, 0, 0x6, b'\x01')
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/interfaces/ipmitool.py", line 138, in send_and_receive_raw
return data.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'
-------------------- >> begin captured logging << --------------------
pyipmi: DEBUG: IPMI RX: 00
--------------------- >> end captured logging << ---------------------

ERROR: tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive_raw_no_auth

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/interfaces/test_ipmitool.py", line 86, in test_send_and_receive_raw_no_auth
self._interface.send_and_receive_raw(target, 0, 0x6, b'\x01')
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/interfaces/ipmitool.py", line 138, in send_and_receive_raw
return data.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'
-------------------- >> begin captured logging << --------------------
pyipmi: DEBUG: IPMI RX: 00
--------------------- >> end captured logging << ---------------------

ERROR: tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive_raw_return_value

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/interfaces/test_ipmitool.py", line 98, in test_send_and_receive_raw_return_value
data = self._interface.send_and_receive_raw(target, 0, 0x6, b'\x01')
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/interfaces/ipmitool.py", line 138, in send_and_receive_raw
return data.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'
-------------------- >> begin captured logging << --------------------
pyipmi: DEBUG: IPMI RX: 00 10 80 01 02 51 bd 98 3a 00 a8 06 00 03 00 00
--------------------- >> end captured logging << ---------------------

ERROR: tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive_raw_serial

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/interfaces/test_ipmitool.py", line 147, in test_send_and_receive_raw_serial
interface.send_and_receive_raw(target, 0, 0x6, b'\x01')
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/interfaces/ipmitool.py", line 138, in send_and_receive_raw
return data.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'
-------------------- >> begin captured logging << --------------------
pyipmi: DEBUG: IPMI RX: 00
--------------------- >> end captured logging << ---------------------

ERROR: tests.interfaces.test_ipmitool.TestIpmitool.test_send_and_receive_raw_valid

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/interfaces/test_ipmitool.py", line 57, in test_send_and_receive_raw_valid
self._interface.send_and_receive_raw(target, 0, 0x6, b'\x01')
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/interfaces/ipmitool.py", line 138, in send_and_receive_raw
return data.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'
-------------------- >> begin captured logging << --------------------
pyipmi: DEBUG: IPMI RX: 00
--------------------- >> end captured logging << ---------------------

ERROR: tests.interfaces.test_rmcp.TestIpmiMsg.test_ipmimsg_pack

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/interfaces/test_rmcp.py", line 68, in test_ipmimsg_pack
pdu = m.pack(None)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/interfaces/rmcp.py", line 265, in pack
pdu += array('B', [data_len]).tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.interfaces.test_rmcp.TestIpmiMsg.test_ipmimsg_pack_with_data

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/interfaces/test_rmcp.py", line 85, in test_ipmimsg_pack_with_data
data = array.array('B', (1, 2, 3, 4)).tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.interfaces.test_rmcp.TestIpmiMsg.test_ipmimsg_pack_with_session

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/interfaces/test_rmcp.py", line 96, in test_ipmimsg_pack_with_session
pdu = m.pack(None)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/interfaces/rmcp.py", line 265, in pack
pdu += array('B', [data_len]).tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_chassis.test_getchassisstatus_encode_valid_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_chassis.py", line 11, in test_getchassisstatus_encode_valid_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 367, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_chassis.test_chassiscontrol_encode_valid_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_chassis.py", line 50, in test_chassiscontrol_encode_valid_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_setbmcglobalenables_encode_all_disabled_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 21, in test_setbmcglobalenables_encode_all_disabled_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_setbmcglobalenables_encode_enable_oem_2_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 34, in test_setbmcglobalenables_encode_enable_oem_2_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_setbmcglobalenables_encode_enable_oem_1_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 47, in test_setbmcglobalenables_encode_enable_oem_1_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_setbmcglobalenables_encode_enable_oem_0_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 60, in test_setbmcglobalenables_encode_enable_oem_0_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_setbmcglobalenables_encode_enable_receive_queue_interrupt_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 73, in test_setbmcglobalenables_encode_enable_receive_queue_interrupt_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_clearmessageflags_encode_clear_none_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 124, in test_clearmessageflags_encode_clear_none_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_clearmessageflags_encode_clear_oem_2_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 136, in test_clearmessageflags_encode_clear_oem_2_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_clearmessageflags_encode_clear_oem_0_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 148, in test_clearmessageflags_encode_clear_oem_0_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_clearmessageflags_encode_clear_receive_message_queue_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 160, in test_clearmessageflags_encode_clear_receive_message_queue_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_enablemessagechannelreceive_encode_all_off_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 204, in test_enablemessagechannelreceive_encode_all_off_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_enablemessagechannelreceive_encode_channel1_enable_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 212, in test_enablemessagechannelreceive_encode_channel1_enable_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_enablemessagechannelreceive_encode_channel2_enable_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 220, in test_enablemessagechannelreceive_encode_channel2_enable_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_masterwriteread_encode_req_all_zero_read

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 265, in test_masterwriteread_encode_req_all_zero_read
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_masterwriteread_encode_req_for_read

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 276, in test_masterwriteread_encode_req_for_read
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_masterwriteread_encode_req_for_write

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 288, in test_masterwriteread_encode_req_for_write
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_get_channel_authentication_capabilities_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 304, in test_get_channel_authentication_capabilities_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_device_messaging.test_get_session_challenge_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_device_messaging.py", line 334, in test_get_session_challenge_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 370, in _encode
field.encode(self, data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 115, in encode
data.push_string(value)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 77, in push_string
self.array.fromstring(value)
AttributeError: 'array.array' object has no attribute 'fromstring'

ERROR: tests.msgs.test_event.test_seteventreceiver_encode_lun0_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_event.py", line 14, in test_seteventreceiver_encode_lun0_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_event.test_seteventreceiver_encode_lun3_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_event.py", line 22, in test_seteventreceiver_encode_lun3_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_fru.test_writefrudatareq_encode_valid_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_fru.py", line 33, in test_writefrudatareq_encode_valid_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_fru.test_writefrudatareq_encode_valid_req_wo_data

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_fru.py", line 50, in test_writefrudatareq_encode_valid_req_wo_data
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_fru.test_readfrudatareq_encode_valid_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_fru.py", line 85, in test_readfrudatareq_encode_valid_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_fru.test_readfrudatarsp_encode_valid_rsp

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_fru.py", line 114, in test_readfrudatarsp_encode_valid_rsp
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_hpm.test_uploadfirmwareblockreq_encode

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_hpm.py", line 14, in test_uploadfirmwareblockreq_encode
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_hpm.test_activatefirmwarereq_encode_valid_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_hpm.py", line 29, in test_activatefirmwarereq_encode_valid_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_hpm.test_activatefirmwarereq_encode_valid_req_wo_optional

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_hpm.py", line 44, in test_activatefirmwarereq_encode_valid_req_wo_optional
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_message.test_string_encode

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_message.py", line 49, in test_string_encode
byte_buffer = t.encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_message.py", line 17, in encode
self.field.encode(self, data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 115, in encode
data.push_string(value)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 77, in push_string
self.array.fromstring(value)
AttributeError: 'array.array' object has no attribute 'fromstring'

ERROR: tests.msgs.test_message.test_string_decode

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_message.py", line 55, in test_string_decode
t.decode(b'abcdef')
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_message.py", line 22, in decode
self.field.decode(self, data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 118, in decode
value = data.pop_string(self.length)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 82, in pop_string
return string.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_picmg.test_clear_activation_lock_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_picmg.py", line 77, in test_clear_activation_lock_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_picmg.test_set_activation_lock_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_picmg.py", line 86, in test_set_activation_lock_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_picmg.test_clear_deactivation_lock_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_picmg.py", line 95, in test_clear_deactivation_lock_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_picmg.test_set_deactivation_lock_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_picmg.py", line 104, in test_set_deactivation_lock_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sdr.test_getsdrrepositoryinfo_encode_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sdr.py", line 14, in test_getsdrrepositoryinfo_encode_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 367, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sdr.test_getsdrrepositoryallocationinfo_encode_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sdr.py", line 37, in test_getsdrrepositoryallocationinfo_encode_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 367, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sdr.test_reservesdrrepository_encode_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sdr.py", line 54, in test_reservesdrrepository_encode_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 367, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sdr.test_getsdr_encode_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sdr.py", line 71, in test_getsdr_encode_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sdr.test_addsdr_encode_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sdr.py", line 86, in test_addsdr_encode_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sdr.test_partialaddsdr_encode_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sdr.py", line 104, in test_partialaddsdr_encode_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sdr.test_deletesdr_encode_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sdr.py", line 119, in test_deletesdr_encode_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sdr.test_clearsdrrepository_encode_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sdr.py", line 134, in test_clearsdrrepository_encode_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sel.test_getselentry_encode_valid_rsp

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sel.py", line 38, in test_getselentry_encode_valid_rsp
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_getdevicesdrinfo_encode_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 14, in test_getdevicesdrinfo_encode_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 367, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_getdevicesdr_encode_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 49, in test_getdevicesdr_encode_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_setsensorhysteresis_encode_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 66, in test_setsensorhysteresis_encode_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_getsensorhysteresis_encode_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 73, in test_getsensorhysteresis_encode_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_setsensorthresholds_encode_req_set_unr

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 90, in test_setsensorthresholds_encode_req_set_unr
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_setsensorthresholds_encode_req_set_ucr

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 99, in test_setsensorthresholds_encode_req_set_ucr
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_setsensorthresholds_encode_req_set_unc

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 108, in test_setsensorthresholds_encode_req_set_unc
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_setsensorthresholds_encode_req_set_lnr

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 117, in test_setsensorthresholds_encode_req_set_lnr
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_setsensorthresholds_encode_req_set_lcr

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 126, in test_setsensorthresholds_encode_req_set_lcr
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_setsensorthresholds_encode_req_set_lnc

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 135, in test_setsensorthresholds_encode_req_set_lnc
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_setsensoreventenable_encode_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 145, in test_setsensoreventenable_encode_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_setsensoreventenable_encode_cfg_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 155, in test_setsensoreventenable_encode_cfg_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_setsensoreventenable_encode_scanning_enabled_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 165, in test_setsensoreventenable_encode_scanning_enabled_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_setsensoreventenable_encode_event_enabled_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 175, in test_setsensoreventenable_encode_event_enabled_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_setsensoreventenable_encode_byte3_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 186, in test_setsensoreventenable_encode_byte3_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_setsensoreventenable_encode_byte34_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 198, in test_setsensoreventenable_encode_byte34_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_getsensoreventenable_encode_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 205, in test_getsensoreventenable_encode_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.msgs.test_sensor.test_rearmsensorevents_encode_req

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/msgs/test_sensor.py", line 256, in test_rearmsensorevents_encode_req
data = encode_message(m)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 402, in
encode_message = lambda m: m._encode()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/msgs/message.py", line 371, in _encode
return data.tostring()
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_bmc.test_deviceid_object

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_bmc.py", line 31, in test_deviceid_object
dev = DeviceId(rsp)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/state.py", line 20, in init
ResponseDecoder.init(self, rsp)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/state.py", line 11, in init
self._from_response(rsp)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/bmc.py", line 141, in _from_response
self.fw_revision = VersionField(
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 22, in init
self._from_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 29, in _from_data
self.version = self._decode_data(data[0:2])
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 43, in _decode_data
self.minor = int(data[1:2].tostring().decode('bcd+'))
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_bmc.test_deviceid_object_with_aux

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_bmc.py", line 49, in test_deviceid_object_with_aux
device_id = DeviceId(msg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/state.py", line 20, in init
ResponseDecoder.init(self, rsp)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/state.py", line 11, in init
self._from_response(rsp)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/bmc.py", line 141, in _from_response
self.fw_revision = VersionField(
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 22, in init
self._from_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 29, in _from_data
self.version = self._decode_data(data[0:2])
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 43, in _decode_data
self.minor = int(data[1:2].tostring().decode('bcd+'))
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_fields.test_versionfield_object

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_fields.py", line 10, in test_versionfield_object
version = VersionField([1, 0x99])
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 22, in init
self._from_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 29, in _from_data
self.version = self._decode_data(data[0:2])
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 43, in _decode_data
self.minor = int(data[1:2].tostring().decode('bcd+'))
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_hpm.TestComponentProperty.test_currentversion

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_hpm.py", line 30, in test_currentversion
prop = ComponentProperty().from_data(PROPERTY_CURRENT_VERSION, b'\x01\x99')
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 424, in from_data
return ComponentPropertyCurrentVersion(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 414, in init
self._from_rsp_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 471, in _from_rsp_data
self.version = VersionField(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 22, in init
self._from_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 29, in _from_data
self.version = self._decode_data(data[0:2])
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 43, in _decode_data
self.minor = int(data[1:2].tostring().decode('bcd+'))
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_hpm.TestComponentProperty.test_deferredversion

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_hpm.py", line 60, in test_deferredversion
prop = ComponentProperty().from_data(
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 430, in from_data
return ComponentPropertyDeferredVersion(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 414, in init
self._from_rsp_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 491, in _from_rsp_data
self.version = VersionField(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 22, in init
self._from_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 29, in _from_data
self.version = self._decode_data(data[0:2])
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 43, in _decode_data
self.minor = int(data[1:2].tostring().decode('bcd+'))
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_hpm.TestComponentProperty.test_descriptionstring

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_hpm.py", line 38, in test_descriptionstring
prop = ComponentProperty().from_data(PROPERTY_DESCRIPTION_STRING,
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 426, in from_data
return ComponentPropertyDescriptionString(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 414, in init
self._from_rsp_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 477, in _from_rsp_data
self.description = py3dec_unic_bytes_fix(array('B', data).tostring())
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_hpm.TestComponentProperty.test_descriptionstring_with_trailinge_zeros

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_hpm.py", line 49, in test_descriptionstring_with_trailinge_zeros
prop = ComponentProperty().from_data(PROPERTY_DESCRIPTION_STRING,
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 426, in from_data
return ComponentPropertyDescriptionString(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 414, in init
self._from_rsp_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 477, in _from_rsp_data
self.description = py3dec_unic_bytes_fix(array('B', data).tostring())
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_hpm.TestComponentProperty.test_rollbackversion

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_hpm.py", line 55, in test_rollbackversion
prop = ComponentProperty().from_data(
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 428, in from_data
return ComponentPropertyRollbackVersion(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 414, in init
self._from_rsp_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 485, in _from_rsp_data
self.version = VersionField(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 22, in init
self._from_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 29, in _from_data
self.version = self._decode_data(data[0:2])
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 43, in _decode_data
self.minor = int(data[1:2].tostring().decode('bcd+'))
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_hpm.test_upgradeactionrecord_create_from_data

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_hpm.py", line 75, in test_upgradeactionrecord_create_from_data
UpgradeActionRecord.create_from_data(
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 626, in create_from_data
return UpgradeActionRecordUploadForUpgrade(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 654, in init
VersionField(
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 22, in init
self._from_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 29, in _from_data
self.version = self._decode_data(data[0:2])
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 43, in _decode_data
self.minor = int(data[1:2].tostring().decode('bcd+'))
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_hpm.test_upgrade_image

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_hpm.py", line 93, in test_upgrade_image
image = UpgradeImage(hpm_file)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 684, in init
self._from_file(filename)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 715, in _from_file
self.header = UpgradeImageHeaderRecord(file_data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 553, in init
self._from_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/hpm.py", line 571, in _from_data
VersionField(data[24:24 + VersionField.VERSION_FIELD_LEN])
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 22, in init
self._from_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 29, in _from_data
self.version = self._decode_data(data[0:2])
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/fields.py", line 43, in _decode_data
self.minor = int(data[1:2].tostring().decode('bcd+'))
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_sdr.TestSdrCompactSensorRecord.test_decode

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_sdr.py", line 203, in test_decode
SdrCompactSensorRecord(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 491, in init
super(SdrCompactSensorRecord, self).init(data, next_id)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 194, in init
self._from_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 525, in _from_data
self._device_id_string(buffer)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 226, in _device_id_string
buffer.pop_string(self.device_id_string_type_length & 0x3f)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 82, in pop_string
return string.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_sdr.TestSdrFruDeviceLocatorRecord.test_decode

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_sdr.py", line 223, in test_decode
SdrFruDeviceLocator(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 562, in init
super(SdrFruDeviceLocator, self).init(data, next_id)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 194, in init
self._from_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 583, in _from_data
self._device_id_string(buffer)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 226, in _device_id_string
buffer.pop_string(self.device_id_string_type_length & 0x3f)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 82, in pop_string
return string.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_sdr.TestSdrFullSensorRecord.test_decocde

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_sdr.py", line 171, in test_decocde
sdr = SdrFullSensorRecord(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 263, in init
super(SdrFullSensorRecord, self).init(data, next_id)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 194, in init
self._from_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 483, in _from_data
self._device_id_string(buffer)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 226, in _device_id_string
buffer.pop_string(self.device_id_string_type_length & 0x3f)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 82, in pop_string
return string.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_sdr.TestSdrManagementControllerDeviceRecord.test_decode

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_sdr.py", line 237, in test_decode
sdr = SdrManagementControllerDeviceLocator(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 591, in init
super(SdrManagementControllerDeviceLocator, self).init(
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 194, in init
self._from_data(data)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 612, in _from_data
self._device_id_string(buffer)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/sdr.py", line 226, in _device_id_string
buffer.pop_string(self.device_id_string_type_length & 0x3f)
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 82, in pop_string
return string.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_utils.test_bytebuffer_push_string

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_utils.py", line 61, in test_bytebuffer_push_string
buf.push_string(b'0123')
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 77, in push_string
self.array.fromstring(value)
AttributeError: 'array.array' object has no attribute 'fromstring'

ERROR: tests.test_utils.test_bytebuffer_pop_string

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_utils.py", line 75, in test_bytebuffer_pop_string
eq_(buf.pop_string(2), b'01')
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 82, in pop_string
return string.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_utils.test_bytebuffer_tostring

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_utils.py", line 81, in test_bytebuffer_tostring
eq_(buf.tostring(), b'0123')
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

ERROR: tests.test_utils.test_bytebuffer_pop_slice

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/python-ipmi-0.4.2/tests/test_utils.py", line 87, in test_bytebuffer_pop_slice
eq_(buf.tostring(), b'123')
File "/builddir/build/BUILD/python-ipmi-0.4.2/pyipmi/utils.py", line 94, in tostring
return self.array.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'

Ran 245 tests in 1.112s
FAILED (errors=94)
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.84h9mv (%check)
Bad exit status from /var/tmp/rpm-tmp.84h9mv (%check)
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 93, in trace
result = func(*args, **kw)
File "/usr/lib/python3.7/site-packages/mockbuild/util.py", line 739, in do_with_status
raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode)
mockbuild.exception.Error: Command failed:

/usr/bin/systemd-nspawn -q -M 8eae51f77cab4a5281e1b1de9e1d3d5a -D /var/lib/mock/1256358-fedora-rawhide-x86_64-1582884944.310431/root -a --capability=cap_ipc_lock --rlimit=RLIMIT_NOFILE=10240 --capability=cap_ipc_lock --bind=/tmp/mock-resolv.zksoot47:/etc/resolv.conf --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;\007" --setenv=PS1= \s-\v$ --setenv=LANG=en_US.UTF-8 -u mockbuild bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-ipmi.spec

Get Chassis Status command

Hi,

In 2016 an issue was opened #13 for this which you closed with the comment:

It is fixed by adding "optional".

I do not understand where is that 'optional' field defined?
Here is what I have tried with our server:

Called the low level method:
chasstatus=ipmi.send_message_with_name('GetChassisStatus')
And with:
chasstatus.__dict__
get the result:
{'completion_code': 0, 'current_power_state': <pyipmi.msgs.message.Bitfield.BitWrapper at 0x22af7cb5c18>, 'data': '', 'front_panel_button_capabilities': 112, 'last_power_event': <pyipmi.msgs.message.Bitfield.BitWrapper at 0x22af7cb5c88>, 'lun': 0, 'misc_chassis_state': <pyipmi.msgs.message.Bitfield.BitWrapper at 0x22af7cb57f0>}

If I am calling the high level method:
chassis_status=ipmi.get_chassis_status()
then for:
chassis_status.__dict__
get this:
{'control_fault': False, 'fault': False, 'interlock': False, 'overload': False, 'power_on': True, 'restore_policy': 2}

There is no 'optional' attribute. If I ask for the optional fields:
'{0:08b}'.format(int(chasstatus.misc_chassis_state))
then got this:
'01000000'

which indicates chassis identify cmd and info supported by the server.

I looked through your code in Chassys.py but I could not find this optional attribute.

Regards,
Ferenc

How to used get_lan_configuration_parameters get lan onfig info?

How to used get_lan_configuration_parameters get lan onfig info?
I found channel is the 1 second parmater is 5(LAN_PARAMETER_MAC_ADDRESS)
set_selector block_selector which number fill it?

thanks

ipmitool -I lanplus -H 172.16.0.11 -U root -P Huawei12#$ lan print 1

Shelling out to ipmitool

The interface given will shell out to ipmitool meaning that:

  1. The package is not purely pythonic.
  2. The package needs ipmitool compiled and installed.
  3. This hurts portability. ipmitool isn't readibly available on windows unless you install cygwin. Not every one can install cygwin.
  4. This means that the project is dependent on ipmitool. If ipmitool breaks or dies, then so does this project.
  5. Output has to be parsed from ipmitool instead of being directly parsed from a packet which is far easier to do.
  6. Any new features for the project, above and beyond what ipmitool doesn't provide, has to be implemented in ipmitool before the function in this project can consume and use it.

Why not create a udp connection that speaks RMCP+ and a set of interfacing functions to conduct logic?

GetChassisStatusRsp did not handle optional byte in response data

From the ipmi 2.0 spec, 28.2 Get Chassis Status Command, there is an optional extra byte in response data. So the response could be 5 bytes. But GetChassisStatusRsp handles 4 bytes only, which will raise DecodingError('Data has extra bytes'). I have came across this problem on some HP servers, they returned the optional byte as 0x00.

I am not familiar with the source code, maybe appending a RemainingBytes to GetChassisStatusRsp will solve the issue?

Useless

Как пользоваться этой хуетой, нихуя не работает.

FRU parsing fails

connection.get_fru_inventory() fails to parse the payload:

/home/mark/venvs/snmp/local/lib/python2.7/site-packages/pyipmi/fru.pyc in _from_data(self, 

data)
    286         self.length = data[2]
    287         if sum(data[:5]) % 256 != 0:
--> 288             raise DecodingError('FruDataMultiRecord header checksum failed')
    289         self.raw = data[5:5+self.length]
    290         if (sum(self.raw) + data[3]) % 256 != 0:

DecodingError: FruDataMultiRecord header checksum failed

The FRU Data:

In [9]: connection.read_fru_data()
Out[9]: '\x01\x00\x01\x06\x14\x01\x00\xe3\x01\x05\x17\xcb1S1QUZZ0STW\xcdQTFCPY823000A\xc6Quanta\xc1\x00\x00\xd8\x01\x0e\x19\x05\x0f\xb4\xdcQuanta Cloud Technology Inc.\xd4SD1Q-1ULH-6 cores MB\xcbGPY82000008\xcb31S1QMB0060\xc9FRU v0.10\xcdS1Q_00_QCT_00\xc3N/A\xc1\x00\x003\x01\x0b\x19\xc6Qumulo\xccQK-Series 1U\xd195-10B01-01 rev01\xc31.0\xccS0501825Q007\xc0\xc9FRU v0.10\xc3N/A\xc3N/A\xc3N/A\xc1\x00\x00\x00\x00\x00S\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

This fru data parses with ipmitool:

FRU Device Description : Builtin FRU Device (ID 0)
Chassis Type : Rack Mount Chassis
Chassis Part Number : 1S1QUZZ0STW
Chassis Serial : QTFCPY823000A
Chassis Extra : Quanta
Board Mfg Date : Fri Jun 8 16:05:00 2018
Board Mfg : Quanta Cloud Technology Inc.
Board Product : SD1Q-1ULH-6 cores MB
Board Serial : GPY82000008
Board Part Number : 31S1QMB0060
Board Extra : S1Q_00_QCT_00
Board Extra : N/A
Product Manufacturer : Qumulo
Product Name : QK-Series 1U
Product Part Number : 95-10B01-01 rev01
Product Version : 1.0
Product Serial : S0501825Q007
Product Extra : N/A
Product Extra : N/A
Product Extra : N/A

Readme should list supported python versions

'import pyipmi' works for my in python 2.7

It fails for me in python 3.4:

Traceback (most recent call last):
  File "src/hello.py", line 1, in <module>
    import pyipmi
  File "...\pyipmi\__init__.py", line 174
    except CompletionCodeError, e:
                              ^
SyntaxError: invalid syntax

Is python 3 supported? If not could you update the readme to indicate this so that it's clear to new users of this library.

Thanks!

how to read /dev/ipmi0

I use install ipmi tools and it's availibe with command :

it's directed by kernel module:

modprobe ipmi_devintf
modprobe ipmi_si
root@myserver:~# ipmitool sel info
SEL Information
Version          : 1.5 (v1.5, v2 compliant)
Entries          : 20
Free Space       : 704 bytes 
Percent Used     : 31%
Last Add Time    : 06/10/2019 09:37:05
Last Del Time    : 01/13/2012 09:04:19
Overflow         : false
Supported Cmds   : 'Reserve' 

Hot to use python-ipmi, no network lan or etc ... just direct call to kernel ipmi on /dev/ipmi0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.