[PR #10707/63321754 backport][stable-11] pacemaker: Add regex checking for maintenance-mode (#10749)

pacemaker: Add regex checking for maintenance-mode (#10707)

* Add regex checking for maintenance-mode

* Add changelog fragment

* Apply suggestions from code review




---------



(cherry picked from commit 6332175493)

Co-authored-by: Dexter <45038532+munchtoast@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot]
2025-08-27 22:09:23 +02:00
committed by GitHub
parent a618aa6b0a
commit ddc546596e
4 changed files with 70 additions and 2 deletions

View File

@@ -371,6 +371,30 @@ test_cases:
rc: 0
out: 'maintenance-mode=true'
err: ""
- id: test_maintenance_minimal_input_initial_online_version_change
input:
state: maintenance
output:
changed: true
previous_value: 'maintenance-mode: false'
value: 'maintenance-mode: true'
mocks:
run_command:
- command: [/testbin/pcs, property, config, maintenance-mode]
environ: *env-def
rc: 0
out: 'maintenance-mode: false'
err: ""
- command: [/testbin/pcs, property, set, maintenance-mode=true]
environ: *env-def
rc: 0
out: ""
err: ""
- command: [/testbin/pcs, property, config, maintenance-mode]
environ: *env-def
rc: 0
out: 'maintenance-mode: true'
err: ""
- id: test_maintenance_minimal_input_initial_offline
input:
state: maintenance