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
Copy 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-10 Automatically create a backport for the stable-10 branch 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_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.

3 participants