Skip to main content

A library for BCM functionality.

Project description

Starlyng BCM Connection

A Python library for executing Baseboard Management Controller (BMC) commands on servers using IPMI.

Features

  • Execute BMC commands on remote servers using IPMI via execute_bcm_command
  • Parallel execution of commands across multiple servers using threading
  • Comprehensive error logging and handling
  • Support for common IPMI operations:
    • Power management (status, on, off, cycle, reset)
    • System Event Log (SEL) operations
    • Chassis control
  • Flexible server configuration through BCMServer class
  • Secure connection handling with IPMI over LAN (LANPLUS)
  • Command output capture and structured response handling

Prerequisites

Before you begin, ensure you have:

  • Python 3.9 or higher installed
  • ipmitool installed on your system:
    • Ubuntu: sudo apt-get install ipmitool
    • macOS: brew install ipmitool
  • If outside local network, configure port forwarding on your router:
    • Forward BCM port 623 to each server's unique port (62300-62399)
    • Example: Forward port 62300 to 192.168.50.1:623, port 62301 to 192.168.50.2:623
    • Port range must be between 62300-62399

Installation

pip install starlyng-bcm-connection

Usage

Basic Example

from starlyng_bcm_connection import BCMServer, execute_bcm_command

# Create a BCM server instance
server = BCMServer(
    bcm_ip="192.168.1.1",
    bcm_user="admin"
    bcm_pass="password"
    bcm_port=623
)

# Execute a command
# Pass server in a list since execute_bcm_command expects List[BCMServer]
result = execute_bcm_command([server], "power status")
print(result)

Available BMC Commands

Common IPMI commands you can execute:

  • power status - Get power status
  • power on - Power on the server
  • power off - Power off the server
  • power cycle - Power cycle the server
  • power reset - Reset the server

Contributing

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/YourFeature)
  3. Commit your changes (git commit -am 'Add some YourFeature')
  4. Push to the branch (git push origin feature/YourFeature)
  5. Open a pull request

Contact

If you have any questions, please contact:

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

starlyng_bcm_connection-0.1.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

starlyng_bcm_connection-0.1.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file starlyng_bcm_connection-0.1.1.tar.gz.

File metadata

  • Download URL: starlyng_bcm_connection-0.1.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for starlyng_bcm_connection-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0dc698f94e0a26b5d670a74ae71299beafae13412ba0787013cd57d6b775fc6e
MD5 d763974c44ec03b3eed5b5bdf26b7359
BLAKE2b-256 1c503297a176c0e040869a9553cb28214ac090edb718bd0f09e2eb62e5381abf

See more details on using hashes here.

File details

Details for the file starlyng_bcm_connection-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for starlyng_bcm_connection-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c400a54a4bc0d6e4db698aa1476924db958f1d992320baa897a1f47797578ac0
MD5 3a14b71368ec3f8b8ab5d9b7d0ae0d50
BLAKE2b-256 46c1c8e3770b3470a420b4dfc3ed954a3647dcf7dcb1f1caf21d326cacba3d7d

See more details on using hashes here.

Supported by

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