Expose demotion database gate as OCF parameter
This commit is contained in:
Executable
+35
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
|
||||
FILE="$ROOT/ocf/loxthelion/managed-container.d/applications/postgresql/plugin.sh"
|
||||
|
||||
grep -q \
|
||||
'OCF_RESKEY_demote_database_gate_default="false"' \
|
||||
"$FILE"
|
||||
|
||||
grep -q \
|
||||
': "${OCF_RESKEY_demote_database_gate:=' \
|
||||
"$FILE"
|
||||
|
||||
grep -q \
|
||||
'DEMOTE_DATABASE_GATE="${OCF_RESKEY_demote_database_gate}"' \
|
||||
"$FILE"
|
||||
|
||||
grep -q \
|
||||
'export MC_DEMOTE_DATABASE_GATE="${DEMOTE_DATABASE_GATE}"' \
|
||||
"$FILE"
|
||||
|
||||
grep -q \
|
||||
'demote_database_gate must be true or false' \
|
||||
"$FILE"
|
||||
|
||||
grep -q \
|
||||
'<parameter name="demote_database_gate"' \
|
||||
"$FILE"
|
||||
|
||||
grep -q \
|
||||
'<content type="boolean" default="false"/>' \
|
||||
"$FILE"
|
||||
|
||||
echo "DEMOTE_DATABASE_PARAMETER_TEST_PASS=1"
|
||||
Reference in New Issue
Block a user