[pve-devel] [PATCH ha-manager 5/5] sim: add Cluster.pm stub with completion stub
Fabian Grünbichler
f.gruenbichler at proxmox.com
Mon Sep 22 14:04:34 CEST 2025
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
the same applies here - instead of the stub, we could also conditionally
require PVE::Cluster in NodeAffinity.pm ..
src/PVE/HA/Sim/Cluster.pm | 11 +++++++++++
src/PVE/HA/Sim/Makefile | 2 ++
2 files changed, 13 insertions(+)
create mode 100644 src/PVE/HA/Sim/Cluster.pm
diff --git a/src/PVE/HA/Sim/Cluster.pm b/src/PVE/HA/Sim/Cluster.pm
new file mode 100644
index 0000000..a59be04
--- /dev/null
+++ b/src/PVE/HA/Sim/Cluster.pm
@@ -0,0 +1,11 @@
+package PVE::Cluster;
+
+use strict;
+use warnings;
+
+# used as completion helper by PVE::HA::Rules::NodeAffinity
+sub get_nodelist {
+ return;
+}
+
+1;
diff --git a/src/PVE/HA/Sim/Makefile b/src/PVE/HA/Sim/Makefile
index cb8feff..cd889db 100644
--- a/src/PVE/HA/Sim/Makefile
+++ b/src/PVE/HA/Sim/Makefile
@@ -1,7 +1,9 @@
SOURCES=Env.pm Hardware.pm TestEnv.pm TestHardware.pm RTEnv.pm RTHardware.pm Resources.pm
+STUBS=Cluster.pm
.PHONY: install
install:
install -d -m 0755 ${DESTDIR}${PERLDIR}/PVE/HA/Sim
for i in ${SOURCES}; do install -D -m 0644 $$i ${DESTDIR}${PERLDIR}/PVE/HA/Sim/$$i; done
+ for i in ${STUBS}; do install -D -m 0644 $$i ${DESTDIR}${PERLDIR}/PVE/$$i; done
make -C Resources install
--
2.47.3
More information about the pve-devel
mailing list