community.general
community.general copied to clipboard
pacemaker_cluster: enhancements and add unit tests
SUMMARY
- Add unit tests for
pacemaker_cluster - Enhance
pacemaker_clusterto utilizemodule_utils/pacemaker.py - Enhance
pacemaker_clusterto manage maintenance mode on cluster
Fixes #10200
ISSUE TYPE
- Feature Pull Request
- Refactoring Pull Request
- Test Pull Request
COMPONENT NAME
pacemaker_cluster.py
ADDITIONAL INFORMATION
cc @matbu click here for bot help
The test ansible-test sanity --test pylint [explain] failed with 1 error:
plugins/modules/pacemaker_cluster.py:73:0: unused-import: Unused get_pacemaker_maintenance_mode imported from ansible_collections.community.general.plugins.module_utils.pacemaker
The test ansible-test sanity --test pylint [explain] failed with 1 error:
plugins/modules/pacemaker_cluster.py:73:0: unused-import: Unused get_pacemaker_maintenance_mode imported from ansible_collections.community.general.plugins.module_utils.pacemaker
The test ansible-test sanity --test validate-modules [explain] failed with 2 errors:
plugins/modules/pacemaker_cluster.py:0:0: doc-choices-do-not-match-spec: Argument 'state' in argument_spec defines choices as (['cleanup', 'offline', 'online', 'restart']) but documentation defines choices as (['cleanup', 'offline', 'online', 'restart', 'maintenance'])
plugins/modules/pacemaker_cluster.py:0:0: doc-default-does-not-match-spec: Argument 'state' in argument_spec defines default as ('present') but documentation defines default as (None)
The test ansible-test sanity --test validate-modules [explain] failed with 2 errors:
plugins/modules/pacemaker_cluster.py:0:0: doc-choices-do-not-match-spec: Argument 'state' in argument_spec defines choices as (['cleanup', 'offline', 'online', 'restart']) but documentation defines choices as (['cleanup', 'offline', 'online', 'restart', 'maintenance'])
plugins/modules/pacemaker_cluster.py:0:0: doc-default-does-not-match-spec: Argument 'state' in argument_spec defines default as ('present') but documentation defines default as (None)
The test ansible-test sanity --test validate-modules [explain] failed with 2 errors:
plugins/modules/pacemaker_cluster.py:0:0: doc-choices-do-not-match-spec: Argument 'state' in argument_spec defines choices as (['cleanup', 'offline', 'online', 'restart']) but documentation defines choices as (['cleanup', 'offline', 'online', 'restart', 'maintenance'])
plugins/modules/pacemaker_cluster.py:0:0: doc-default-does-not-match-spec: Argument 'state' in argument_spec defines default as ('present') but documentation defines default as (None)
The test ansible-test sanity --test pylint [explain] failed with 1 error:
plugins/modules/pacemaker_cluster.py:73:0: unused-import: Unused get_pacemaker_maintenance_mode imported from ansible_collections.community.general.plugins.module_utils.pacemaker
The test ansible-test sanity --test pep8 [explain] failed with 1 error:
plugins/modules/pacemaker_cluster.py:126:15: E111: indentation is not a multiple of 4
The test ansible-test sanity --test pep8 [explain] failed with 1 error:
plugins/modules/pacemaker_cluster.py:126:15: E111: indentation is not a multiple of 4
The test ansible-test sanity --test pep8 [explain] failed with 1 error:
plugins/modules/pacemaker_cluster.py:126:15: E111: indentation is not a multiple of 4
The test ansible-test sanity --test pep8 [explain] failed with 3 errors:
plugins/modules/pacemaker_cluster.py:110:1: W293: blank line contains whitespace
plugins/modules/pacemaker_cluster.py:133:15: E111: indentation is not a multiple of 4
plugins/modules/pacemaker_cluster.py:154:15: E111: indentation is not a multiple of 4
The test ansible-test sanity --test pep8 [explain] failed with 3 errors:
plugins/modules/pacemaker_cluster.py:110:1: W293: blank line contains whitespace
plugins/modules/pacemaker_cluster.py:133:15: E111: indentation is not a multiple of 4
plugins/modules/pacemaker_cluster.py:154:15: E111: indentation is not a multiple of 4
The test ansible-test sanity --test pep8 [explain] failed with 3 errors:
plugins/modules/pacemaker_cluster.py:110:1: W293: blank line contains whitespace
plugins/modules/pacemaker_cluster.py:133:15: E111: indentation is not a multiple of 4
plugins/modules/pacemaker_cluster.py:154:15: E111: indentation is not a multiple of 4
The test ansible-test sanity --test pylint [explain] failed with 1 error:
plugins/modules/pacemaker_cluster.py:110:0: trailing-whitespace: Trailing whitespace
The test ansible-test sanity --test pylint [explain] failed with 1 error:
plugins/modules/pacemaker_cluster.py:110:0: trailing-whitespace: Trailing whitespace
The test ansible-test sanity --test pylint [explain] failed with 1 error:
plugins/modules/pacemaker_cluster.py:110:0: trailing-whitespace: Trailing whitespace
If nobody objects, I'll merge this on the weekend!
I think this is the only place where the issue URL fits. (Correct me if I'm wrong...)
I agree, that seems to be the only place.
Backport to stable-11: 💚 backport PR created
✅ Backport PR branch: patchback/backports/stable-11/283d947f17d9ebe194d8aad4e7e09176d073c35b/pr-10227
Backported as https://github.com/ansible-collections/community.general/pull/10408
🤖 @patchback I'm built with octomachinery and my source is open — https://github.com/sanitizers/patchback-github-app.
@munchtoast thanks a lot for your contribution! @russoz thanks for reviewing!