mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-16 07:30:32 -07:00
opennebula inventory: add VM ID and VM host to data (#8532)
* Add VM id and VM host to opennebula inventory data
##### SUMMARY
<!--- Describe the change below, including rationale and design decisions --> To enable greater use of the inventory, add the ID of the VM, and the hostname of the host the VM is running on to the inventory output
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
<!--- Please do not forget to include a changelog fragment:
https://docs.ansible.com/ansible/devel/community/collection_development_process.html#creating-changelog-fragments
No need to include one for docs-only or test-only PR, and for new plugin/module PRs.
Read about more details in CONTRIBUTING.md.
-->
##### ISSUE TYPE
<!--- Pick one or more below and delete the rest.
'Test Pull Request' is for PRs that add/extend tests without code changes. -->
- Feature Pull Request
##### COMPONENT NAME
<!--- Write the SHORT NAME of the module, plugin, task or feature below. --> opennebula.py
##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here --> <!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
"host": "foo23.host",
"id": 1234,
```
* Create 8532-expand-opennuebula-inventory-data.yml
* Update opennebula.py
* Update changelogs/fragments/8532-expand-opennuebula-inventory-data.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add check for empty records and add test
* fix attribute test
* fix attribute test
* fix attribute test
* fix attribute test
* Update plugins/inventory/opennebula.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* update as per guidance
* restore attribute checks
* fix attr
* fix indent
* PR Fixes
* add attribute check in case of empty variable
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Александр Бакановский <abakanovskii@astralinux.ru>
(cherry picked from commit
|
||
---|---|---|
.. | ||
.keep | ||
9.5.0.yml | ||
8532-expand-opennuebula-inventory-data.yml | ||
8652-Redfish-Password-Change-Required.yml | ||
8679-fix-cloudflare-srv.yml | ||
8719-openiscsi-add-multiple-targets.yaml | ||
8785-keycloak_user_federation-set-krbPrincipalAttribute-to-empty-string-if-missing.yaml | ||
8812-keycloak-user-federation-remove-lastSync-param-from-kc-responses.yml | ||
8855-gio_mime_vardict.yml | ||
8856-jira_vardict.yml | ||
8858-dict-comprehension.yml | ||
8876-dict-items-loop.yml | ||
8877-keycloak_realm-sort-lists-before-change-detection.yaml | ||
8885-add-force-flag-for-nmp.yml | ||
8887-fix-one_service-unique.yml | ||
8889-refactor-one-image-modules.yml | ||
8895-fix-comprehension.yaml | ||
8897-nmcli-add-reload-and-up-down.yml | ||
8898-add-arg-to-exclude-bind-credential-from-change-check.yaml | ||
8900-ipa-hostgroup-fix-states.yml | ||
8908-add-gitlab-group-params.yml | ||
8909-flatpak-improve-name-parsing.yaml | ||
8917-proxmox-clean-auth.yml | ||
8920-ipa-host-fix-state.yml | ||
8923-keycloak_userprofile-fix-empty-response-when-fetching-userprofile.yml | ||
8925-atomic.yml | ||
8929-cmd_runner-bugfix.yml | ||
8937-add-StorageId-RedfishURI-to-disk-facts.yml | ||
8940-keycloak_userprofile-improve-diff.yml | ||
8944-django-command-fix.yml | ||
8952-password-store-lookup-create-subkey-support.yml | ||
8954-keycloak-user-federation-add-referral-parameter.yml | ||
8956-remove-capacitybytes-from-the-required-parameters_list.yml | ||
8966-dig-add-port-option.yml | ||
8970-fix-dig-multi-nameservers.yml | ||
8987-legacycrypt.yml | ||
8990.yml | ||
deprecate-hipchat.yml |