[pve-devel] [PATCH proxmox_dart_api_client 1/1] fix: add missing `prelaunch` value to `PveResourceStatusType`

Shan Shaji s.shaji at proxmox.com
Tue Jun 3 16:56:43 CEST 2025


Updates the `PveResourceStatusType` enum with `prelaunch` option. Also
adds the status checks in `getStatus` and `getQemuStatus` functions.
The changes are necessary inorder to show the `prelaunch`
status in the qemu overview page and in the resources tab view.

Signed-off-by: Shan Shaji <s.shaji at proxmox.com>
---
 lib/src/models/pve_cluster_resources_model.dart | 3 +++
 lib/src/models/pve_nodes_qemu_status_model.dart | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/lib/src/models/pve_cluster_resources_model.dart b/lib/src/models/pve_cluster_resources_model.dart
index 16e18df..51ea8fa 100644
--- a/lib/src/models/pve_cluster_resources_model.dart
+++ b/lib/src/models/pve_cluster_resources_model.dart
@@ -69,6 +69,8 @@ abstract class PveClusterResourcesModel
       return PveResourceStatusType.stopped;
     }
 
+    if(status == 'prelaunch') return PveResourceStatusType.prelaunch;
+
     return PveResourceStatusType.unknown;
   }
 }
@@ -110,6 +112,7 @@ class PveResourceStatusType extends EnumClass {
   static const PveResourceStatusType suspending = _$suspending;
   static const PveResourceStatusType suspended = _$suspended;
   static const PveResourceStatusType unknown = _$unknown;
+  static const PveResourceStatusType prelaunch = _$prelaunch;
 
   const PveResourceStatusType._(super.name);
 
diff --git a/lib/src/models/pve_nodes_qemu_status_model.dart b/lib/src/models/pve_nodes_qemu_status_model.dart
index ae82802..3b2d7a8 100644
--- a/lib/src/models/pve_nodes_qemu_status_model.dart
+++ b/lib/src/models/pve_nodes_qemu_status_model.dart
@@ -42,6 +42,8 @@ abstract class PveQemuStatusModel
           return PveResourceStatusType.running;
         case 'paused':
           return PveResourceStatusType.paused;
+        case 'prelaunch':
+          return PveResourceStatusType.prelaunch;
         default:
           if (lock == 'suspending') {
             return PveResourceStatusType.suspending;
-- 
2.39.5





More information about the pve-devel mailing list