mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-28 00:41:44 -07:00
[PR #9787/e8e3e5c2 backport][stable-10] Allow Xen Host and/or Xen VM names instead of their UUIDs (#9801)
Allow Xen Host and/or Xen VM names instead of their UUIDs (#9787)
* Allow using Xen Host and/or Xen VM names instead of their UUIDs for inventory
* xen_orchestra inventory plugin allow using vm and host names instead of UUID inventory
* Update changelog fragment with correct PR number
* Set missing inventory attributes in unit test
* Add version_added suggestion as per github comments
* Description update.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e8e3e5c2b0
)
Co-authored-by: rt-vnx <riordan.toms@vonex.com.au>
This commit is contained in:
parent
5735c5a045
commit
27629b6497
3 changed files with 51 additions and 2 deletions
|
@ -158,6 +158,8 @@ def test_verify_file_bad_config(inventory):
|
|||
|
||||
|
||||
def test_populate(inventory, mocker):
|
||||
inventory.host_entry_name_type = 'uuid'
|
||||
inventory.vm_entry_name_type = 'uuid'
|
||||
inventory.get_option = mocker.MagicMock(side_effect=get_option)
|
||||
inventory._populate(objects)
|
||||
actual = sorted(inventory.inventory.hosts.keys())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue