[PR #6980/796ad356 backport][stable-6] [proxmox] Use proxmoxer_version instead of server API version (#6984)

* [proxmox] Use proxmoxer_version instead of server API version (#6980)

* Use proxmoxer_version instead of server API version

* Add changelog fragment

(cherry picked from commit 796ad3565e)

* Update unit tests requirements file

* Add python 2.6 constraint for tests
This commit is contained in:
Sergei Antipov 2023-07-20 14:51:53 -04:00 committed by GitHub
commit f635ed6c2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 2 deletions

View file

@ -8,6 +8,13 @@ __metaclass__ = type
import json
import pytest
import sys
proxmoxer = pytest.importorskip('proxmoxer')
mandatory_py_version = pytest.mark.skipif(
sys.version_info < (2, 7),
reason='The proxmoxer dependency requires python2.7 or higher'
)
from ansible_collections.community.general.tests.unit.compat.mock import MagicMock, patch
from ansible_collections.community.general.plugins.modules import proxmox_snap

View file

@ -12,6 +12,13 @@ __metaclass__ = type
import pytest
import json
import sys
proxmoxer = pytest.importorskip('proxmoxer')
mandatory_py_version = pytest.mark.skipif(
sys.version_info < (2, 7),
reason='The proxmoxer dependency requires python2.7 or higher'
)
from ansible_collections.community.general.plugins.modules import proxmox_tasks_info
import ansible_collections.community.general.plugins.module_utils.proxmox as proxmox_utils

View file

@ -43,4 +43,8 @@ dataclasses ; python_version == '3.6'
elastic-apm ; python_version >= '3.6'
# requirements for scaleway modules
passlib[argon2]
passlib[argon2]
# requirements for the proxmox modules
proxmoxer < 2.0.0 ; python_version >= '2.7' and python_version <= '3.6'
proxmoxer ; python_version > '3.6'