Package: python-ipmi
Featuresnative RMCP interfacelegacy RMCP interface (using ipmitool as backend)RMCP+ interface (using ipmitool as backend)system (KCS) interface (using ipmitool as backend)IPMB interface using theTotal PhaseAardvarkIPMB interface using ipmb-dev driver on LinuxTested DevicesKontron mTCA Carrier ManagerKontron CompactPCI boardsPigeon Point Shelf ManagerHPE iLO3/iLO4N.A.T. NAT-MCHDESY MMC STAMP & related AMCs (DAMC-FMC2ZUP, DAMC-FMC1Z7IO)RequirementsFor IPMB interface aTotal PhaseAardvark 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.htmlFor legacy RMCP, RMCP+ and system interface (KCS) the installtion of ipmitool
is required.InstallationUsingpipThe recommended installation method is usingpip:pip install python-ipmiManual installationDownload the source distribution package for the library. Extract the the package to
a temporary location and install:python setup.py installDocumentationYou can find the most up to date documentation at:http://python-ipmi.rtfd.orgExampleBelow is an example that shows how to setup the interface and the connection
using theipmitoolas backend with both network and serial interfaces.Example with lan interface:importpyipmiimportpyipmi.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-Ilan-H10.0.0.1-p623-U"admin"-P"admin"-t0x82-b0-l0raw0x060x01Example with serial interface:importpyipmiimportpyipmi.interfacesinterface=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-Iserial-terminal-D/dev/tty2:115200-t0xb2-l0raw0x060x01CompatibilityPython > 3.6 is currently supported. Python 2.x is deprecated.ContributingContributions are always welcome. You may send patches directly (eg.gitsend-email), do a github pull request or just file an issue.respect the coding style (eg. PEP8),provide well-formed commit message (seethis blog post.)add a Signed-off-by line (eg.git commit-s)LicenseThis 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