8000 Fix for handling https URL link for firmware update by vivaswatDev · Pull Request #10068 · ansible-collections/community.general · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix for handling https URL link for firmware update #10068

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vivaswatDev
C 8000 opy link
SUMMARY
ISSUE TYPE
  • Bugfix Pull Request
  • Docs Pull Request
  • Feature Pull Request
  • New Module/Plugin Pull Request
  • Refactoring Pull Request
  • Test Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION

@ansibullbot
Copy link
Collaborator

The test ansible-test sanity --test import --python 2.7 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ImportError: No module named requests
plugins/modules/wdc_redfish_command.py:204:0: traceback: ImportError: No module named requests (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ImportError: No module named requests (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.10 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.11 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.12 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.6 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.7 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.8 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.9 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

plugins/module_utils/wdc_redfish_utils.py:204:43: E128: continuation line under-indented for visual indent
plugins/module_utils/wdc_redfish_utils.py:326:9: E265: block comment should start with '# '

The test ansible-test sanity --test import --python 3.10 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.11 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.12 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.7 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.8 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.9 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

plugins/module_utils/wdc_redfish_utils.py:204:43: E128: continuation line under-indented for visual indent
plugins/module_utils/wdc_redfish_utils.py:326:9: E265: block comment should start with '# '

The test ansible-test sanity --test import --python 3.10 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.11 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.12 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.13 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.8 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.9 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

plugins/module_utils/wdc_redfish_utils.py:204:43: E128: continuation line under-indented for visual indent
plugins/module_utils/wdc_redfish_utils.py:326:9: E265: block comment should start with '# '

The test ansible-test sanity --test import --python 3.10 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.11 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.12 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.13 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.8 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test import --python 3.9 [explain] failed with 3 errors:

plugins/module_utils/wdc_redfish_utils.py:15:0: traceback: ModuleNotFoundError: No module named 'requests'
plugins/modules/wdc_redfish_command.py:204:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)
plugins/modules/wdc_redfish_info.py:127:0: traceback: ModuleNotFoundError: No module named 'requests' (at plugins/module_utils/wdc_redfish_utils.py:15:0)

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

plugins/module_utils/wdc_redfish_utils.py:204:43: E128: continuation line under-indented for visual indent
plugins/module_utils/wdc_redfish_utils.py:326:9: E265: block comment should start with '# '

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

plugins/modules/wdc_redfish_command.py:0:0: import-error: Exception attempting to import module for argument_spec introspection, 'No module named 'requests''
plugins/modules/wdc_redfish_info.py:0:0: import-error: Exception attempting to import module for argument_spec introspection, 'No module named 'requests''

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

plugins/modules/wdc_redfish_command.py:0:0: import-error: Exception attempting to import module for argument_spec introspection, 'No module named 'requests''
plugins/modules/wdc_redfish_info.py:0:0: import-error: Exception attempting to import module for argument_spec introspection, 'No module named 'requests''

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

plugins/modules/wdc_redfish_command.py:0:0: import-error: Exception attempting to import module for argument_spec introspection, 'No module named 'requests''
plugins/modules/wdc_redfish_info.py:0:0: import-error: Exception attempting to import module for argument_spec introspection, 'No module named 'requests''

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

plugins/modules/wdc_redfish_command.py:0:0: import-error: Exception attempting to import module for argument_spec introspection, 'No module named 'requests''
plugins/modules/wdc_redfish_info.py:0:0: import-error: Exception attempting to import module for argument_spec introspection, 'No module named 'requests''

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module_utils module_utils needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_contributor Help guide this first time contributor plugins plugin (any type) labels Apr 25, 2025
@@ -12,6 +12,7 @@
import time
import tarfile
import os
import requests
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for your contribution. Please note that using requests is not acceptable. The code uses ansible's urls module utils for HTTP requests.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the update. I tried other ways like open_url() given below.

response = open_url(uri, verify_ssl=True, stream=True)

This is to verify the file using https://URI by downloading it from our trusted https server. It fails with SSL verify failure. Is there any alternative module or functionality available from ansible module to address the issue?

Copy link
Collaborator

Choose a reason for hiding this comment

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

What are you actually trying to achieve? Your PR description contains zero information. HTTPS is already supported by fetch_file().

If downloading a file via TLS fails with SSL verify failure, then either you're using a TLS protocl version that your Python isn't supporting, or your Python doesn't know the CA certificate used by your HTTPS server.

@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-10 Automatically create a backport for the stable-10 branch labels Apr 27, 2025
@ansibullbot ansibullbot added the stale_ci CI is older than 7 days, rerun before merging label May 10, 2025
@felixfontein
Copy link
Collaborator

ping @vivaswatDev

needs_info

@ansibullbot ansibullbot added the needs_info This issue requires further information. Please answer any outstanding questions label May 16, 2025
@vivaswatDev
Copy link
Author

ping @vivaswatDev

needs_info

Hello Felix,

The https server we are using is trusted internal file server and self signed one. Hence we try to access the static file in that https server with Ansible's fetch_file() it fails with SSL verification error. We don't have any CA certified https server to cross verify whether fetch_file() works fine or not. I understand that request module is not permitted but my requirement is simple - i need to download a static firmware binary file from a self signed https 8000 server.

@ansibullbot ansibullbot removed the needs_info This issue requires further information. Please answer any outstanding questions label May 17, 2025
@felixfontein
Copy link
Collaborator

In theory you could use your own CA certificate and pass it with the ca_path option, but right now it's not possible to pass that on to fetch_file(), so it's not used for this request (ansible/ansible#85172). What you could do is disable certificate checking altogether (which is currently the default, so should be the case if you didn't explicitly enable it).

@felixfontein felixfontein removed the backport-10 Automatically create a backport for the stable-10 branch label May 24, 2025
@russoz
Copy link
Collaborator
russoz commented Jun 20, 2025

hi @vivaswatDev thanks for your contribution. The PR template should have been filled, that information is actually used while processing the PR.

Also, please note that last month's comments are yet to be addressed.

needs_info

@ansibullbot ansibullbot added the needs_info This issue requires further information. Please answer any outstanding questions label Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug check-before-release PR will be looked at again shortly before release and merged if possible. module_utils module_utils needs_info This issue requires further information. Please answer any outstanding questions needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_contributor Help guide this first time contributor plugins plugin (any type) stale_ci CI is older than 7 days, rerun before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0