all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH proxmox-backup] fix #4165: SMART: add raw field
@ 2022-07-21 10:45 ` Matthias Heiserer
  0 siblings, 0 replies; 14+ messages in thread
From: Matthias Heiserer @ 2022-07-21 10:45 UTC (permalink / raw)
  To: pve-devel, pbs-devel

This makes it consistent with the naming scheme in PVE/GUI.
Keep value for API stability reasons, and remove it in next major version.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
---
 src/tools/disks/smart.rs | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/tools/disks/smart.rs b/src/tools/disks/smart.rs
index 3738cdfd..787971e9 100644
--- a/src/tools/disks/smart.rs
+++ b/src/tools/disks/smart.rs
@@ -25,8 +25,11 @@ pub enum SmartStatus {
 pub struct SmartAttribute {
     /// Attribute name
     name: String,
-    /// Attribute raw value
+    // fixme remove value in major release
+    /// duplicate of raw - kept for API stability
     value: String,
+    /// Attribute raw value
+    raw: String,
     // the rest of the values is available for ATA type
     /// ATA Attribute ID
     #[serde(skip_serializing_if = "Option::is_none")]
@@ -146,7 +149,8 @@ pub fn get_smart_data(disk: &super::Disk, health_only: bool) -> Result<SmartData
 
             attributes.push(SmartAttribute {
                 name,
-                value: raw_value,
+                value: raw_value.clone(),
+                raw: raw_value,
                 id: Some(id),
                 flags: Some(flags),
                 normalized: Some(normalized),
@@ -180,6 +184,7 @@ pub fn get_smart_data(disk: &super::Disk, health_only: bool) -> Result<SmartData
                 attributes.push(SmartAttribute {
                     name: name.to_string(),
                     value: value.to_string(),
+                    raw: value.to_string(),
                     id: None,
                     flags: None,
                     normalized: None,
-- 
2.30.2





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-09-23 10:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-21 10:45 [pve-devel] [PATCH proxmox-backup] fix #4165: SMART: add raw field Matthias Heiserer
2022-07-21 10:45 ` [pbs-devel] " Matthias Heiserer
2022-07-21 10:45 ` [pve-devel] [PATCH pve-storage] fix #4165: disk: SMART: add normalized field Matthias Heiserer
2022-07-21 10:45   ` [pbs-devel] " Matthias Heiserer
2022-09-23 10:29   ` [pve-devel] applied: " Thomas Lamprecht
2022-09-23 10:29     ` [pbs-devel] applied: " Thomas Lamprecht
2022-07-21 10:45 ` [pve-devel] [PATCH widget-toolkit] fix #4165: SMART: use changed columns from the API Matthias Heiserer
2022-07-21 10:45   ` [pbs-devel] " Matthias Heiserer
2022-09-22 10:35 ` [pve-devel] [PATCH proxmox-backup] fix #4165: SMART: add raw field Dominik Csapak
2022-09-22 10:35   ` [pbs-devel] " Dominik Csapak
2022-09-23 10:31   ` [pve-devel] [pbs-devel] " Thomas Lamprecht
2022-09-23 10:31     ` [pbs-devel] [pve-devel] " Thomas Lamprecht
2022-09-23 10:28 ` [pve-devel] applied: [pbs-devel] " Thomas Lamprecht
2022-09-23 10:28   ` [pbs-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal