Skip to main content

Crate rufish

Crate rufish 

Source
Expand description

§rufish

An asynchronous Redfish client library for BMC/server management.

§Quick Start

use rufish::RedfishClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut client = RedfishClient::new("10.0.0.5", "admin", "password")?;
    client.login().await?;

    let root = client.get_service_root().await?;
    println!("Redfish version: {:?}", root.redfish_version);

    let systems = client.list_systems().await?;
    println!("Systems: {:?}", systems.members_count);

    client.logout().await?;
    Ok(())
}

§Builder Pattern

use rufish::RedfishClient;

// Custom reqwest client + existing session token
let custom = reqwest::Client::builder()
    .use_native_tls()
    .http1_only()
    .build()?;

let client = RedfishClient::builder("10.0.0.5")
    .credentials("admin", "password")
    .client(custom)
    .session("saved-token", "/redfish/v1/SessionService/Sessions/1")
    .build()?;

Structs§

Account
User Account resource.
AccountService
Account Service resource.
Bios
BIOS resource.
Boot
BootOverride
Boot override request body.
BootOverrideInner
Certificate
Certificate resource.
Chassis
Chassis resource.
Collection
Collection of resources.
ComputerSystem
Computer System resource.
Drive
Drive resource.
EthernetInterface
EthernetInterface resource.
EventDestination
Event Destination (subscription).
EventService
Event Service resource.
Fan
LogEntry
Log Entry resource.
Manager
Manager (BMC) resource.
Memory
Memory resource.
MemorySummary
NetworkProtocol
Network Protocol resource (BMC network services).
NtpProtocol
OdataLink
OData link reference.
Power
Power resource (legacy schema).
PowerControl
PowerSupply
Processor
Processor resource.
ProcessorSummary
ProtocolEnabled
RedfishClient
Async Redfish client for BMC management.
RedfishClientBuilder
Builder for constructing a RedfishClient with custom configuration.
ResetRequest
Reset request body.
SecureBoot
Secure Boot resource.
SerialInterface
Serial Interface resource.
ServiceRoot
Service Root (/redfish/v1/)
SessionCreate
Session creation request body.
SoftwareInventory
Software/Firmware Inventory item.
Status
Common Redfish resource status.
Storage
Storage resource.
StorageController
Task
Task resource.
Temperature
Thermal
Thermal resource (legacy schema).
UpdateService
Update Service resource.
VirtualMedia
Virtual Media resource.
Volume
Volume resource (RAID).

Enums§

RedfishError

Type Aliases§

Result