mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-22 10:21:25 -07:00
add pacemaker_resource plugin (#9531)
* Add initial pacemaker resource * Additional fixes on pacemaker_resource * Fix up module parameters * fix doc and lint * fix group command build * Apply suggestions for removing status and improve descriptions * fix cmd builder list * Apply suggestions and add initial unit tests * Fix unit tests expected output * Initial refactor on pacemaker resource Refactorization on pacemaker_resource to utilize module helpers. * Apply suggestions and fix up initial unit test * Apply suggestions from code review * Fix pep8 format for utils * Fix unit tests for pacemaker resource * Add botmeta maintainers for new moduules * Apply suggestions from code review Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Apply unit test suggestion * Add disable and enable states for pacemaker_resource * Fix state names and add cli_action for runner * Remove unnecessary variables * Fix documentation example playbook * Fix IP Address for resource_option * Refactor and remove unnecessary facts * Apply suggestions from code review --------- Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
c43289b8f1
commit
402f725424
5 changed files with 517 additions and 0 deletions
19
tests/unit/plugins/modules/test_pacemaker_resource.py
Normal file
19
tests/unit/plugins/modules/test_pacemaker_resource.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_resource
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
UTHelper.from_module(pacemaker_resource, __name__, mocks=[RunCommandMock])
|
Loading…
Add table
Add a link
Reference in a new issue