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

vmware_guest: remove hardware version number check to avoid updating the restriction everytime #636

Closed
Tomorrow9 opened this issue Feb 2, 2021 · 5 comments · Fixed by #639
Assignees
Labels
bug This issue/PR relates to a bug cloud has_pr module module plugins plugin (any type)

Comments

@Tomorrow9
Copy link
Collaborator

Tomorrow9 commented Feb 2, 2021

SUMMARY

Can we remove the hardware version number check in vmware_guest module? or find another better way to do this? or we need to change this restriction every time after vSphere new releases and new hardware version introduced.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vmware_guest

ANSIBLE VERSION

CONFIGURATION

OS / ENVIRONMENT
STEPS TO REPRODUCE
try:
                    temp_version = int(temp_version)
                except ValueError:
                    hw_version_check_failed = True

                if temp_version not in range(3, 18):
                    hw_version_check_failed = True

                if hw_version_check_failed:
                    self.module.fail_json(msg="Failed to set hardware.version '%s' value as valid"
                                          " values range from 3 (ESX 2.x) to 17 (ESXi 7.0)." % temp_version)
EXPECTED RESULTS

We do not need to change this range(3, 18) every time when there is new hardware version introduced in new vSphere release, e.g., hardware version 18, 19, etc.

ACTUAL RESULTS

@ansibullbot
Copy link

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug cloud module module needs_triage Needs a first human triage before being processed. plugins plugin (any type) labels Feb 2, 2021
@mariolenz
Copy link
Collaborator

I agree, this check doesn't make much sense. Even if the version is theoretically valid, it doesn't mean the module will work. Like using version 18 but the vCenter or ESXi is 6.5. I think we should just remove this check.

I'll do a PR and request your review.

@mariolenz mariolenz self-assigned this Feb 2, 2021
@ansibullbot ansibullbot added has_pr and removed needs_triage Needs a first human triage before being processed. labels Feb 2, 2021
@mariolenz
Copy link
Collaborator

@Tomorrow9 Can you pleae have a look at PR #639?

@Tomorrow9
Copy link
Collaborator Author

@Tomorrow9 Can you pleae have a look at PR #639?

Thanks for your quick fixing.

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 cloud has_pr module module plugins plugin (any type)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants