承接 sunfoxcz/redfish-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sunfoxcz/redfish-client

Composer 安装命令:

composer require sunfoxcz/redfish-client

包简介

PHP client for IPMI/Redfish API communication

README 文档

README

PHP client for IPMI/Redfish API communication.

Installation

composer require sunfox/redfish-client

Usage

use Sunfox\RedfishClient\Client;

$client = new Client(
    baseUrl: "https://192.168.x.x",
    username: "ADMIN",
    password: "password",
    timeout: 3.0,
    verifySsl: false,
);

// Get power state
$powerState = $client->getPowerState();
if ($powerState->isOn()) {
    echo "Server is ON\n";
}

// Get power consumption
$consumption = $client->getPowerConsumption();
echo "Current power: {$consumption->currentWatts}W\n";

// Get system info
$systemInfo = $client->getSystemInfo();
echo "Manufacturer: {$systemInfo->manufacturer}\n";
echo "Model: {$systemInfo->model}\n";

// Check if reachable
if ($client->isReachable()) {
    echo "Server is reachable\n";
}

Exception Handling

use Sunfox\RedfishClient\Exception\AuthenticationException;
use Sunfox\RedfishClient\Exception\ConnectionException;
use Sunfox\RedfishClient\Exception\RedfishException;

try {
    $powerState = $client->getPowerState();
} catch (AuthenticationException $e) {
    echo "Invalid credentials\n";
} catch (ConnectionException $e) {
    echo "Cannot connect to server\n";
} catch (RedfishException $e) {
    echo "Redfish API error: {$e->getMessage()}\n";
}

License

MIT License. See LICENSE for details.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固