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

[stable-2.15] facts: Add a generic detection for VMware product name #83109

Open
wants to merge 1 commit into
base: stable-2.15
Choose a base branch
from

Conversation

Akasurde
Copy link
Member

SUMMARY
  • Use startswith instead of hardcoded values in VMWare product
    detction

Signed-off-by: Abhijeet Kasurde [email protected]

ISSUE TYPE
  • Bugfix Pull Request

* Use startswith instead of hardcoded values in VMWare product
  detction

Signed-off-by: Abhijeet Kasurde <[email protected]>
@ansibot ansibot added bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. backport This PR does not target the devel branch. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Apr 19, 2024
@Akasurde
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -176,7 +176,7 @@ def get_virtual_facts(self):
virtual_facts['virtualization_type'] = 'RHEV'
found_virt = True

if product_name in ('VMware Virtual Platform', 'VMware7,1'):
if product_name and product_name.startswith(("VMware",)):
Copy link
Member

Choose a reason for hiding this comment

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

FWIW the passed value doesn't need to be a tuple of strings if there's just one string.

Suggested change
if product_name and product_name.startswith(("VMware",)):
if product_name and product_name.startswith("VMware"):

would do the same but looks cleaner

@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Apr 19, 2024
@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 May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport This PR does not target the devel branch. bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants