mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-22 18:31:25 -07:00
Move Proxmox HAS_PROXMOXER
check into module_utils
. (#4030)
* Move Proxmox `HAS_PROXMOXER` check into `module_utils`. * Fix tests. * Fix typo. * Update changelog entry.
This commit is contained in:
parent
3faffe8f47
commit
761fbe4fa3
9 changed files with 16 additions and 24 deletions
|
@ -68,6 +68,9 @@ def ansible_to_proxmox_bool(value):
|
|||
class ProxmoxAnsible(object):
|
||||
"""Base class for Proxmox modules"""
|
||||
def __init__(self, module):
|
||||
if not HAS_PROXMOXER:
|
||||
module.fail_json(msg=missing_required_lib('proxmoxer'), exception=PROXMOXER_IMP_ERR)
|
||||
|
||||
self.module = module
|
||||
self.proxmox_api = self._connect()
|
||||
# Test token validity
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue