use redfish_macros::IntoRedfishMessage;
#[derive(Clone, Debug, IntoRedfishMessage)]
#[message(crate::models::message::v1_1_2::Message)]
pub enum StorageDevice {
#[message(message = "The volume '%1' attached to the storage controller located in '%2' is offline.")]
#[message(id = "StorageDevice.1.1.0.VolumeOffine")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Use storage sofware to enable, repair, or import the volume. You may also delete or move volume back to the original controller.")]
VolumeOffine(
String,
String,
),
#[message(message = "A predictive failure condition for the drive located in '%1' has been detected.")]
#[message(id = "StorageDevice.1.1.0.DrivePredictiveFailure")]
#[message(severity = "crate::models::resource::Health::Warning")]
#[message(resolution = "If this drive is not part of a fault-tolerant volume, first back up all data, then replace the drive and restore all data afterward. If this drive is part of a fault-tolerant volume, replace this drive as soon as possible as long as the volume health is OK.")]
DrivePredictiveFailure(
String,
),
#[message(message = "The drive located in '%1' was removed.")]
#[message(id = "StorageDevice.1.1.0.DriveRemoved")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "If the drive is still displayed, attempt to refresh the cached data.")]
DriveRemoved(
String,
),
#[message(message = "A password was entered for the storage controller located in '%1'.")]
#[message(id = "StorageDevice.1.1.0.ControllerPasswordAccepted")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "No action required.")]
ControllerPasswordAccepted(
String,
),
#[message(message = "The write cache on the storage controller located in '%1' has data loss.")]
#[message(id = "StorageDevice.1.1.0.WriteCacheDataLoss")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Check the controller resource properties to determine cause of the write cache data loss.")]
WriteCacheDataLoss(
String,
),
#[message(message = "The health of the battery located in '%1' has changed to OK.")]
#[message(id = "StorageDevice.1.1.0.BatteryOK")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "No action needed.")]
BatteryOK(
String,
),
#[message(message = "A previous error condition for the storage controller located in '%1' has been detected due to '%2'.")]
#[message(id = "StorageDevice.1.1.0.ControllerPreviousError")]
#[message(severity = "crate::models::resource::Health::Warning")]
#[message(resolution = "Update the controller to the latest firmware version. If the issue persists, replace the controller.")]
ControllerPreviousError(
String,
String,
),
#[message(message = "A degraded condition for the controller port located in '%1' has been detected due to reason '%2'.")]
#[message(id = "StorageDevice.1.1.0.ControllerPortDegraded")]
#[message(severity = "crate::models::resource::Health::Warning")]
#[message(resolution = "Ensure all cables are properly and securly connected. Replace faulty cables.")]
ControllerPortDegraded(
String,
String,
),
#[message(message = "The volume '%1' attached to the storage controller located in '%2' is online.")]
#[message(id = "StorageDevice.1.1.0.VolumeOfflineCleared")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "No action needed.")]
VolumeOfflineCleared(
String,
String,
),
#[message(message = "The write cache state on the storage controller located in '%1' is in protected mode.")]
#[message(id = "StorageDevice.1.1.0.WriteCacheProtected")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "No action needed.")]
WriteCacheProtected(
String,
),
#[message(message = "A charging condition for the battery located in '%1' has been detected.")]
#[message(id = "StorageDevice.1.1.0.BatteryCharging")]
#[message(severity = "crate::models::resource::Health::Warning")]
#[message(resolution = "No action needed. There may be reduced performance and features while the battery is charging.")]
BatteryCharging(
String,
),
#[message(message = "A predictive failure condition for the drive located in '%1' has been cleared.")]
#[message(id = "StorageDevice.1.1.0.DrivePredictiveFailureCleared")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "No action needed.")]
DrivePredictiveFailureCleared(
String,
),
#[message(message = "An offline condition for the the drive located in '%1' has been cleared.")]
#[message(id = "StorageDevice.1.1.0.DriveOfflineCleared")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "No action needed.")]
DriveOfflineCleared(
String,
),
#[message(message = "The drive located in '%1' was inserted.")]
#[message(id = "StorageDevice.1.1.0.DriveInserted")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "If the drive is not properly displayed, attempt to refresh the cached data.")]
DriveInserted(
String,
),
#[message(message = "A failure condition for the battery located in '%1' has been detected.")]
#[message(id = "StorageDevice.1.1.0.BatteryFailure")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Ensure all cables are properly and securely connected. Replace the failed battery.")]
BatteryFailure(
String,
),
#[message(message = "A failure condition for the storage controller located in '%1' has been detected.")]
#[message(id = "StorageDevice.1.1.0.ControllerFailure")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Reseat the storage controller in the PCI slot. Update the controller to the latest firmware version. If the issue persists, replace the controller.")]
ControllerFailure(
String,
),
#[message(message = "The volume '%1' attached to the storage controller located in '%2' is degraded.")]
#[message(id = "StorageDevice.1.1.0.VolumeDegraded")]
#[message(severity = "crate::models::resource::Health::Warning")]
#[message(resolution = "Ensure all cables are properly and securely connected. Replace failed drives.")]
VolumeDegraded(
String,
String,
),
#[message(message = "A missing condition for the drive located in '%1' has been detected.")]
#[message(id = "StorageDevice.1.1.0.DriveMissing")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Ensure all cables are properly and securely connected. Ensure all drives are fully seated. Replace the defective cables, drive, or both. Delete the volume if no longer needed.")]
DriveMissing(
String,
),
#[message(message = "The write cache state on the storage controller located in '%1' is degraded.")]
#[message(id = "StorageDevice.1.1.0.WriteCacheDegraded")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Check the controller to determine the cause of write cache degraded state, such as a missing battery or hardware failure.")]
WriteCacheDegraded(
String,
),
#[message(message = "The health of the storage controller located in '%1' has changed to OK.")]
#[message(id = "StorageDevice.1.1.0.ControllerOK")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "No action required.")]
ControllerOK(
String,
),
#[message(message = "A missing condition for the drive located in '%1' has been cleared.")]
#[message(id = "StorageDevice.1.1.0.DriveMissingCleared")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "No action needed.")]
DriveMissingCleared(
String,
),
#[message(message = "The health of the drive located in '%1' has changed to OK.")]
#[message(id = "StorageDevice.1.1.0.DriveOK")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "No action needed.")]
DriveOK(
String,
),
#[message(message = "An offline condition for the the drive located in '%1' has been detected.")]
#[message(id = "StorageDevice.1.1.0.DriveOffline")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "If the drive is unconfigured or needs an import, configure the drive. If the drive operation is in progress, wait for the operation to complete. If the drive is not supported, replace it.")]
DriveOffline(
String,
),
#[message(message = "The health of volume '%1' that is attached to the storage controller located in '%2' has changed to OK.")]
#[message(id = "StorageDevice.1.1.0.VolumeOK")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "No action needed.")]
VolumeOK(
String,
String,
),
#[message(message = "The battery located in '%1' is missing.")]
#[message(id = "StorageDevice.1.1.0.BatteryMissing")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Attach the battery. Ensure all cables are properly and securely connected.")]
BatteryMissing(
String,
),
#[message(message = "A failure condition for the drive located in '%1' has been cleared.")]
#[message(id = "StorageDevice.1.1.0.DriveFailureCleared")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "No action needed.")]
DriveFailureCleared(
String,
),
#[message(message = "A failure condition for the controller port located in '%1' has been detected.")]
#[message(id = "StorageDevice.1.1.0.ControllerPortFailure")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Ensure all cables are properly and securly connected. Replace faulty cables.")]
ControllerPortFailure(
String,
),
#[message(message = "The health of the controller port located in '%1' has changed to OK.")]
#[message(id = "StorageDevice.1.1.0.ControllerPortOK")]
#[message(severity = "crate::models::resource::Health::OK")]
#[message(resolution = "No action needed.")]
ControllerPortOK(
String,
),
#[message(message = "The volume '%1' attached to the storage controller located in '%2' has failed.")]
#[message(id = "StorageDevice.1.1.0.VolumeFailure")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Ensure all cables are properly and securely connected. Ensure all drives are fully seated and operational.")]
VolumeFailure(
String,
String,
),
#[message(message = "The write cache state on the storage controller located in '%1' is temporarily degraded.")]
#[message(id = "StorageDevice.1.1.0.WriteCacheTemporarilyDegraded")]
#[message(severity = "crate::models::resource::Health::Warning")]
#[message(resolution = "Check the controller to determine the cause of write cache temporarily degraded state, such as a battery is charging or a data recovery rebuild operation is pending.")]
WriteCacheTemporarilyDegraded(
String,
),
#[message(message = "A degraded condition for the storage controller located in '%1' has been detected due to reason '%2'.")]
#[message(id = "StorageDevice.1.1.0.ControllerDegraded")]
#[message(severity = "crate::models::resource::Health::Warning")]
#[message(resolution = "Reseat the storage controller in the PCI slot. Update the controller to the latest firmware version. If the issue persists, replace the controller.")]
ControllerDegraded(
String,
String,
),
#[message(message = "The storage controller located in '%1' requires a password.")]
#[message(id = "StorageDevice.1.1.0.ControllerPasswordRequired")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Enter the controller password.")]
ControllerPasswordRequired(
String,
),
#[message(message = "A failure condition for the drive located in '%1' has been detected.")]
#[message(id = "StorageDevice.1.1.0.DriveFailure")]
#[message(severity = "crate::models::resource::Health::Critical")]
#[message(resolution = "Ensure all cables are properly and securely connected. Ensure all drives are fully seated. Replace the defective cables, drive, or both.")]
DriveFailure(
String,
),
}