Skip to content

Commit

Permalink
renames TotalSystemMemoryBytes to TotalSystemMemory
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhipfel committed Nov 11, 2024
1 parent 0e4ec6d commit 2c3a0bb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
22 changes: 11 additions & 11 deletions bmc/bmc.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,17 +189,17 @@ type Processor struct {

// SystemInfo represents basic information about the system.
type SystemInfo struct {
Manufacturer string
Model string
Status common.Status
PowerState redfish.PowerState
NetworkInterfaces []NetworkInterface
Processors []Processor
TotalSystemMemoryBytes resource.Quantity
SystemUUID string
SerialNumber string
SKU string
IndicatorLED string
Manufacturer string
Model string
Status common.Status
PowerState redfish.PowerState
NetworkInterfaces []NetworkInterface
Processors []Processor
TotalSystemMemory resource.Quantity
SystemUUID string
SerialNumber string
SKU string
IndicatorLED string
}

// Manager represents the manager information.
Expand Down
18 changes: 9 additions & 9 deletions bmc/redfish.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ func (r *RedfishBMC) GetSystemInfo(systemUUID string) (SystemInfo, error) {
return SystemInfo{}, fmt.Errorf("failed to parse memory quantity: %w", err)
}
return SystemInfo{
SystemUUID: system.UUID,
Manufacturer: system.Manufacturer,
Model: system.Model,
Status: system.Status,
PowerState: system.PowerState,
SerialNumber: system.SerialNumber,
SKU: system.SKU,
IndicatorLED: string(system.IndicatorLED),
TotalSystemMemoryBytes: quantity,
SystemUUID: system.UUID,
Manufacturer: system.Manufacturer,
Model: system.Model,
Status: system.Status,
PowerState: system.PowerState,
SerialNumber: system.SerialNumber,
SKU: system.SKU,
IndicatorLED: string(system.IndicatorLED),
TotalSystemMemory: quantity,
}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion internal/controller/server_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ func (r *ServerReconciler) updateServerStatus(ctx context.Context, log logr.Logg
server.Status.Manufacturer = systemInfo.Manufacturer
server.Status.Model = systemInfo.Model
server.Status.IndicatorLED = metalv1alpha1.IndicatorLED(systemInfo.IndicatorLED)
server.Status.TotalSystemMemory = &systemInfo.TotalSystemMemoryBytes
server.Status.TotalSystemMemory = &systemInfo.TotalSystemMemory

currentBiosVersion, err := bmcClient.GetBiosVersion(server.Spec.UUID)
if err != nil {
Expand Down

0 comments on commit 2c3a0bb

Please sign in to comment.