Skip to main content

Pure python IPMI library

Project description

BuildStatus PyPiVersion Documentation Status Python versions Coveralls CodeClimate Codacy Badge

Features

  • native RMCP interface

  • legacy RMCP interface (using ipmitool as backend)

  • RMCP+ interface (using ipmitool as backend)

  • system (KCS) interface (using ipmitool as backend)

  • IPMB interface using the Total Phase Aardvark

  • IPMB interface using ipmb-dev driver on Linux

Tested Devices

  • Kontron mTCA Carrier Manager

  • Kontron CompactPCI boards

  • Pigeon Point Shelf Manager

  • HPE iLO3/iLO4

  • N.A.T. NAT-MCH

  • DESY MMC STAMP & related AMCs (DAMC-FMC2ZUP, DAMC-FMC1Z7IO)

Requirements

For IPMB interface a Total Phase Aardvark is needed. Another option is to use ipmb-dev driver on Linux with an I2C bus, driver of which supports slave mode: https://www.kernel.org/doc/html/latest/driver-api/ipmb.html

For legacy RMCP, RMCP+ and system interface (KCS) the installtion of ipmitool is required.

Installation

Using pip

The recommended installation method is using pip:

pip install python-ipmi

Manual installation

Download the source distribution package for the library. Extract the the package to a temporary location and install:

python setup.py install

Documentation

You can find the most up to date documentation at: http://python-ipmi.rtfd.org

Example

Below is an example that shows how to setup the interface and the connection using the ipmitool as backend with both network and serial interfaces.

Example with lan interface:

import pyipmi
import pyipmi.interfaces

# Supported interface_types for ipmitool are: 'lan' , 'lanplus', and 'serial-terminal'
interface = pyipmi.interfaces.create_interface('ipmitool', interface_type='lan')

connection = pyipmi.create_connection(interface)

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

connection.session.set_session_type_rmcp('10.0.0.1', port=623)
connection.session.set_auth_type_user('admin', 'admin')
connection.session.set_priv_level("ADMINISTRATOR")
connection.session.establish()

connection.get_device_id()

ipmitool command:

ipmitool -I lan -H 10.0.0.1 -p 623 -L "ADMINISTRATOR" -U "admin" -P "admin" -t 0x82 -b 0 -l 0 raw 0x06 0x01

Example with serial interface:

import pyipmi
import pyipmi.interfaces

interface = pyipmi.interfaces.create_interface('ipmitool', interface_type='serial-terminal')

connection = pyipmi.create_connection(interface)

connection.target = pyipmi.Target(0xb2)

# set_session_type_serial(port, baudrate)
connection.session.set_session_type_serial('/dev/tty2', 115200)
connection.session.establish()

connection.get_device_id()

ipmitool command:

ipmitool -I serial-terminal -D /dev/tty2:115200 -t 0xb2 -l 0 raw 0x06 0x01

Compatibility

Python > 3.6 is currently supported. Python 2.x is deprecated.

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.)

  • 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_ipmi-0.5.7.tar.gz (97.4 kB view details)

Uploaded Source

Built Distribution

python_ipmi-0.5.7-py3-none-any.whl (121.0 kB view details)

Uploaded Python 3

File details

Details for the file python_ipmi-0.5.7.tar.gz.

File metadata

  • Download URL: python_ipmi-0.5.7.tar.gz
  • Upload date:
  • Size: 97.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for python_ipmi-0.5.7.tar.gz
Algorithm Hash digest
SHA256 9b129bca4f198c775624a1bdf199125dd11a486bc6620c55be2f7e7bedc980b9
MD5 63722bad36a3ff18c09068894b54c5ce
BLAKE2b-256 a0a5a19c289ff5793482e82d6f29b0dcec23de90b3fe8d979500badbed08e12b

See more details on using hashes here.

File details

Details for the file python_ipmi-0.5.7-py3-none-any.whl.

File metadata

  • Download URL: python_ipmi-0.5.7-py3-none-any.whl
  • Upload date:
  • Size: 121.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for python_ipmi-0.5.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7d748fcb4220f66bd4c3526e29691494c487a86056951e4ad098ae63a352a02d
MD5 3474b33dbf694401350369123828e388
BLAKE2b-256 387d7e950b1f22d1aef4f51d34eceab9a8a1d71b8bb479101c3eab6865735820

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page