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

Server Hardware Facts Issue #284

Merged
merged 7 commits into from
Jan 10, 2024
Merged

Conversation

akshith-gunasheelan
Copy link
Collaborator

@akshith-gunasheelan akshith-gunasheelan commented Jan 9, 2024

Description

Server hardware utilization facts were not giving proper output when options were provided for the utilization fields.

Issues Resolved

#282

Check List

  • New functionality includes sanity testing.
    • All sanity tests pass. ($ ansible-test sanity).
    • All unit tests pass.
  • New functionality has been documented in the README if applicable.
    • New functionality has been thoroughly documented in the examples (please include helpful comments).

keys_list = list(self.options.keys())
for item in keys_list:
if 'utilization' in item:
ansible_facts['server_hardware_utilization'] = self.get_utilization(ast.literal_eval(item))
Copy link
Collaborator

Choose a reason for hiding this comment

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

you can break from for loop once when you find an item with utilization

@nabhajit-ray nabhajit-ray merged commit a93d4be into master Jan 10, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants