[pve-devel] [PATCH ha-manager 4/9] sim: add helper to store datacenter configuration
Maximiliano Sandoval
m.sandoval at proxmox.com
Tue Oct 14 11:47:22 CEST 2025
Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
src/PVE/HA/Sim/Hardware.pm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/PVE/HA/Sim/Hardware.pm b/src/PVE/HA/Sim/Hardware.pm
index 4d84eeb..a0ce563 100644
--- a/src/PVE/HA/Sim/Hardware.pm
+++ b/src/PVE/HA/Sim/Hardware.pm
@@ -538,6 +538,13 @@ sub read_datacenter_conf {
return PVE::HA::Tools::read_json_from_file($filename, {});
}
+sub write_datacenter_conf {
+ my ($self, $conf) = @_;
+
+ my $filename = "$self->{statusdir}/datacenter.cfg";
+ PVE::HA::Tools::write_json_to_file($filename, $conf);
+}
+
sub global_lock {
my ($self, $code, @param) = @_;
--
2.47.3
More information about the pve-devel
mailing list