mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-04 07:24:00 -07:00
[PR #10291/47aec260 backport][stable-11] pacemaker_info: new module and enhance cli_action (#10584)
pacemaker_info: new module and enhance cli_action (#10291)
* feat(info): Add pacemaker_info module and enhance cli_action util
This commit adds in the pacemaker_info module which is responsible for
retrieving pacemaker facts. Additionally, the cli_action var has been
refactored for the pacemaker.py util, which is passed through the
runner.
* refactor(version): Bump version_added to 11.2.0
* Apply suggestions from code review
* Update plugins/modules/pacemaker_info.py
* refactor(process): Simplify command output
---------
(cherry picked from commit 47aec26001
)
Co-authored-by: Dexter <45038532+munchtoast@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
423509769d
commit
3d6227d1e2
5 changed files with 242 additions and 0 deletions
19
tests/unit/plugins/modules/test_pacemaker_info.py
Normal file
19
tests/unit/plugins/modules/test_pacemaker_info.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Author: Dexter Le (dextersydney2001@gmail.com)
|
||||
# Largely adapted from test_redhat_subscription by
|
||||
# Jiri Hnidek (jhnidek@redhat.com)
|
||||
#
|
||||
# Copyright (c) Dexter Le (dextersydney2001@gmail.com)
|
||||
# Copyright (c) Jiri Hnidek (jhnidek@redhat.com)
|
||||
#
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import pacemaker_info
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
UTHelper.from_module(pacemaker_info, __name__, mocks=[RunCommandMock])
|
Loading…
Add table
Add a link
Reference in a new issue