Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxmox: support version 6 #60303

Closed

Conversation

morph027
Copy link
Contributor

@morph027 morph027 commented Aug 9, 2019

SUMMARY

Proxmox VE Version 6 Release slightly changed it's API regarding the version string (original issue: swayf/proxmoxer#79). This fix picks up the new version scheme and still supports the old one.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

proxmox

@ansibot
Copy link
Contributor

ansibot commented Aug 9, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/modules/cloud/misc/proxmox.py:485:0: syntax-error invalid syntax (<unknown>, line 485)

The test ansible-test sanity --test ansible-doc [explain] failed with 1 error:

lib/ansible/modules/cloud/misc/proxmox.py:0:0: missing documentation (or could not parse documentation): invalid syntax (<unknown>, line 485)

The test ansible-test sanity --test docs-build [explain] failed with the error:

Command "/usr/bin/python3.6 /root/ansible/test/sanity/code-smell/docs-build.py" returned exit status 1.
>>> Standard Error
Command 'make singlehtmldocs' failed with status code: 2
--> Standard Output
PYTHONPATH=../../lib ../../hacking/build-ansible.py collection-meta --template-file=../templates/collections_galaxy_meta.rst.j2 --output-dir=rst/dev_guide/ ../../lib/ansible/galaxy/data/collections_galaxy_meta.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-config --template-file=../templates/config.rst.j2 --output-dir=rst/reference_appendices/ ../../lib/ansible/config/base.yml
mkdir -p rst/cli
PYTHONPATH=../../lib ../../hacking/build-ansible.py generate-man --template-file=../templates/cli_rst.j2 --output-dir=rst/cli/ --output-format rst ../../lib/ansible/cli/*.py
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-keywords --template-dir=../templates --output-dir=rst/reference_appendices/ ./keyword_desc.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-plugins -t rst --template-dir=../templates --module-dir=../../lib/ansible/modules -o rst/modules/ 
Evaluating module files...
Makefile:98: recipe for target 'modules' failed
--> Standard Error
Traceback (most recent call last):
  File "../../hacking/build-ansible.py", line 88, in <module>
    main()
  File "../../hacking/build-ansible.py", line 79, in main
    retval = command.main(args)
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 698, in main
    plugin_info, categories = get_plugin_info(args.module_dir, limit_to=args.limit_to, verbose=(args.verbosity > 0))
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 225, in get_plugin_info
    doc, examples, returndocs, metadata = plugin_docs.get_docstring(module_path, fragment_loader, verbose=verbose)
  File "/root/ansible/lib/ansible/utils/plugin_docs.py", line 111, in get_docstring
    data = read_docstring(filename, verbose=verbose, ignore_errors=ignore_errors)
  File "/root/ansible/lib/ansible/parsing/plugin_docs.py", line 40, in read_docstring
    M = ast.parse(b_module_data.read())
  File "/usr/lib/python3.6/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 485
    global PVE_VERSION = float(re.sub(r'-\d$', '', proxmox.version.get()['version']))
                       ^
SyntaxError: invalid syntax
make: *** [modules] Error 1

The test ansible-test sanity --test compile --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/cloud/misc/proxmox.py:485:28: SyntaxError: global PVE_VERSION = float(re.sub(r'-\d$', '', proxmox.version.get()['version']))

The test ansible-test sanity --test compile --python 2.7 [explain] failed with 1 error:

lib/ansible/modules/cloud/misc/proxmox.py:485:28: SyntaxError: global PVE_VERSION = float(re.sub(r'-\d$', '', proxmox.version.get()['version']))

The test ansible-test sanity --test compile --python 3.5 [explain] failed with 1 error:

lib/ansible/modules/cloud/misc/proxmox.py:485:28: SyntaxError: global PVE_VERSION = float(re.sub(r'-\d$', '', proxmox.version.get()['version']))

The test ansible-test sanity --test compile --python 3.6 [explain] failed with 1 error:

lib/ansible/modules/cloud/misc/proxmox.py:485:28: SyntaxError: global PVE_VERSION = float(re.sub(r'-\d$', '', proxmox.version.get()['version']))

The test ansible-test sanity --test compile --python 3.7 [explain] failed with 1 error:

lib/ansible/modules/cloud/misc/proxmox.py:485:28: SyntaxError: global PVE_VERSION = float(re.sub(r'-\d$', '', proxmox.version.get()['version']))

The test ansible-test sanity --test compile --python 3.8 [explain] failed with 1 error:

lib/ansible/modules/cloud/misc/proxmox.py:485:28: SyntaxError: global PVE_VERSION = float(re.sub(r'-\d$', '', proxmox.version.get()['version']))

The test ansible-test sanity --test import --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/cloud/misc/proxmox.py:485:28: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 2.7 [explain] failed with 1 error:

lib/ansible/modules/cloud/misc/proxmox.py:485:28: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 3.5 [explain] failed with 1 error:

lib/ansible/modules/cloud/misc/proxmox.py:485:28: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 3.6 [explain] failed with 1 error:

lib/ansible/modules/cloud/misc/proxmox.py:485:28: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 3.7 [explain] failed with 1 error:

lib/ansible/modules/cloud/misc/proxmox.py:485:28: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 3.8 [explain] failed with 1 error:

lib/ansible/modules/cloud/misc/proxmox.py:485:28: SyntaxError: invalid syntax

The test ansible-test sanity --test validate-modules [explain] failed with 3 errors:

lib/ansible/modules/cloud/misc/proxmox.py:0:0: E401 Python SyntaxError while parsing module
test/sanity/ignore.txt:1573:1: A100 Ignoring 'E337' on 'lib/ansible/modules/cloud/misc/proxmox.py' is unnecessary
test/sanity/ignore.txt:1574:1: A100 Ignoring 'E338' on 'lib/ansible/modules/cloud/misc/proxmox.py' is unnecessary

The test ansible-test sanity --test yamllint [explain] failed with 1 error:

lib/ansible/modules/cloud/misc/proxmox.py:485:28: python-syntax-error invalid syntax (<unknown>, line 485)

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Aug 9, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. virt Virt community (incl. QEMU, KVM, libvirt, ovirt, RHV and Proxmox) labels Aug 9, 2019
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Aug 9, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Aug 17, 2019
Copy link

@pvanhemmen pvanhemmen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This required fix works as expected and makes the proxmoxer module compatible with the actual Proxmox 6.x stable release.

@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels Dec 4, 2019
@J4RF
Copy link

J4RF commented Mar 10, 2020

Is this ever going to be merged?

@morph027
Copy link
Contributor Author

Huh, guess i should do some rebasing ...

@morph027
Copy link
Contributor Author

hm, by looking at current devel, it looks like @mrdrogdrog fixed this in 38193f6 already....

@morph027 morph027 closed this Mar 11, 2020
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Mar 11, 2020
@ansible ansible locked and limited conversation to collaborators Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:community This issue/PR relates to code supported by the Ansible community. virt Virt community (incl. QEMU, KVM, libvirt, ovirt, RHV and Proxmox)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants