mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-21 05:21:44 -07:00
[PR #10663/b9385d7f backport][stable-11] pacemaker_resource: Fix resource_type parameter (#10699)
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.16) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py2.7) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.11) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.6) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/3/) (push) Waiting to run
nox / Run extra sanity tests (push) Waiting to run
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.16) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py2.7) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.11) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.6) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/3/) (push) Waiting to run
nox / Run extra sanity tests (push) Waiting to run
pacemaker_resource: Fix resource_type parameter (#10663)
* Ensure resource standard, provider, and name are proper format
* Add changelog fragment
* Update changelogs/fragments/10663-pacemaker-resource-fix-resource-type.yml
---------
(cherry picked from commit b9385d7fe8
)
Co-authored-by: Dexter <45038532+munchtoast@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
d7eb5432f3
commit
a1e2ada993
3 changed files with 7 additions and 3 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- "pacemaker_resource - fix ``resource_type`` parameter formatting (https://github.com/ansible-collections/community.general/issues/10426, https://github.com/ansible-collections/community.general/pull/10663)."
|
|
@ -24,7 +24,7 @@ _state_map = {
|
||||||
|
|
||||||
|
|
||||||
def fmt_resource_type(value):
|
def fmt_resource_type(value):
|
||||||
return [value[k] for k in ['resource_standard', 'resource_provider', 'resource_name'] if value.get(k) is not None]
|
return [":".join(value[k] for k in ['resource_standard', 'resource_provider', 'resource_name'] if value.get(k) is not None)]
|
||||||
|
|
||||||
|
|
||||||
def fmt_resource_operation(value):
|
def fmt_resource_operation(value):
|
||||||
|
|
|
@ -57,6 +57,8 @@ test_cases:
|
||||||
name: virtual-ip
|
name: virtual-ip
|
||||||
resource_type:
|
resource_type:
|
||||||
resource_name: IPaddr2
|
resource_name: IPaddr2
|
||||||
|
resource_standard: ocf
|
||||||
|
resource_provider: heartbeat
|
||||||
resource_option:
|
resource_option:
|
||||||
- "ip=[192.168.2.1]"
|
- "ip=[192.168.2.1]"
|
||||||
resource_operation:
|
resource_operation:
|
||||||
|
@ -98,10 +100,10 @@ test_cases:
|
||||||
dc-version=2.1.9-1.fc41-7188dbf
|
dc-version=2.1.9-1.fc41-7188dbf
|
||||||
have-watchdog=false
|
have-watchdog=false
|
||||||
err: ""
|
err: ""
|
||||||
- command: [/testbin/pcs, resource, create, virtual-ip, IPaddr2, "ip=[192.168.2.1]", op, start, timeout=1200, op, stop, timeout=1200, op, monitor, timeout=1200, meta, test_meta1=123, meta, test_meta2=456, --group, test_group, --wait=200]
|
- command: [/testbin/pcs, resource, create, virtual-ip, ocf:heartbeat:IPaddr2, "ip=[192.168.2.1]", op, start, timeout=1200, op, stop, timeout=1200, op, monitor, timeout=1200, meta, test_meta1=123, meta, test_meta2=456, --group, test_group, --wait=200]
|
||||||
environ: *env-def
|
environ: *env-def
|
||||||
rc: 0
|
rc: 0
|
||||||
out: "Assumed agent name 'ocf:heartbeat:IPaddr2' (deduced from 'IPAddr2')"
|
out: "Assumed agent name 'ocf:heartbeat:IPaddr2'"
|
||||||
err: ""
|
err: ""
|
||||||
- command: [/testbin/pcs, resource, status, virtual-ip]
|
- command: [/testbin/pcs, resource, status, virtual-ip]
|
||||||
environ: *env-def
|
environ: *env-def
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue