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)

  • IPMB interface (using the Total Phase Aardvark)

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.

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

connection.get_device_id()

ipmitool command:

ipmitool -I lan -H 10.0.0.1 -p 623 -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 2.7 is currently supported. Python 3.x support is in beta

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.1.tar.gz (86.2 kB view details)

Uploaded Source

Built Distribution

python_ipmi-0.5.1-py3-none-any.whl (127.6 kB view details)

Uploaded Python 3

File details

Details for the file python-ipmi-0.5.1.tar.gz.

File metadata

  • Download URL: python-ipmi-0.5.1.tar.gz
  • Upload date:
  • Size: 86.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for python-ipmi-0.5.1.tar.gz
Algorithm Hash digest
SHA256 ff57f8d93fc57b4237505d94a2f6dcb677ff988bab242dc15149a56bde092b4d
MD5 bc32b52838bc374bb1d54da16efa33c1
BLAKE2b-256 dddec68974f8e0b565688a23e9134c1dc405f73f09abe8ff079181104f041b13

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_ipmi-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 127.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for python_ipmi-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3bcd2620128bc6ba7f95eb463b755c46f43cb0da2e4c02c06fe58be497c75b70
MD5 67a653d5a0933258a9793f50ca13a73c
BLAKE2b-256 0d4e5ffc02b170b801345e3f8157c51bdab5da9f8e54efd316d302da82b034bf

See more details on using hashes here.

Supported by

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