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
BCMServerclass - 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
- Ubuntu:
- 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 statuspower on- Power on the serverpower off- Power off the serverpower cycle- Power cycle the serverpower reset- Reset the server
Contributing
- Fork the project
- Create your feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -am 'Add some YourFeature') - Push to the branch (
git push origin feature/YourFeature) - Open a pull request
Contact
If you have any questions, please contact:
- GitHub: @justinsherwood
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file starlyng_bcm_connection-0.1.0.tar.gz.
File metadata
- Download URL: starlyng_bcm_connection-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2b41209989209bd11442339c4dd30cb08517ac10ed9b4978d9ba1a2ce8e0a20
|
|
| MD5 |
ecaead10e0cf42c0cc198adc1fdba78b
|
|
| BLAKE2b-256 |
ca60e267df15230a27de6f07930e310b07a409befaa4999eb7f4ccdd2c26ee3c
|
File details
Details for the file starlyng_bcm_connection-0.1.0-py3-none-any.whl.
File metadata
- Download URL: starlyng_bcm_connection-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85500c2e6c671937c6aecf1a751f9143df45ca9a057da0def345fdf7bda6cce8
|
|
| MD5 |
b22eac97135382e5ad131b3ba3245e09
|
|
| BLAKE2b-256 |
413f08619b2a97882a123b7d04bede2e8c816442e2d288a925c1dfcf44b78861
|