Skip to main content

HUAWEI iBMC client

Project description

python-ibmcclient

Build Status

python-ibmcclient is a Python library to communicate with HUAWEI iBMC based systems.

The goal of the library is to be extremely simple, small, have as few dependencies as possible and be very conservative when dealing with BMCs by access HTTP REST API provided by HUAWEI iBMC based systems.

Currently, the scope of the library has been limited to supporting HUAWEI OpenStack Ironic driver.

Requirements.

Python 2.7 and 3.4+

Installation

From PyPi:

    $ pip install python-ibmcclient

or

    $ easy_install python-ibmcclient

Or from source:

    $ python setup.py install

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
from pprint import pprint

import ibmc_client
from ibmc_client import constants

# ibmc server
address = "https://example.ibmc.com"
# credential
username = "username"
password = "password"
# disable certification verify
verify = False

with ibmc_client.connect(address, username, password, verify) as client:
    # get system
    system = client.system.get()
    print('Power State: ')
    pprint(system.power_state)

    print('Boot Sequence: ')
    pprint(system.boot_sequence)

    print('Boot Source Override:' )
    pprint(system.boot_source_override)

    # reset system
    client.system.reset(constants.RESET_FORCE_RESTART)

    # set boot source override
    client.system.set_boot_source(constants.BOOT_SOURCE_TARGET_PXE,
                                  constants.BOOT_SOURCE_MODE_BIOS,
                                  constants.BOOT_SOURCE_ENABLED_ONCE)

Project details


Download files

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

Files for python-ibmcclient, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size python_ibmcclient-0.1.0-py2.py3-none-any.whl (18.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size python-ibmcclient-0.1.0.tar.gz (11.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page