mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixes issue [#24078](https://github.com/ansible/ansible/issues/24078) Resource pools are retrieved from VSphere regardless of the state of the `resource_pool` parameter. During this process, each retrieved Resource Pool is checked for the `parent` attribute, and if it exists, the currently-scoped parent object is compared against the Resource Pool's parent object. The method doing the check, however, `assert`s that the parent object is not `None`. In some cases, a Resource Pool will have the `parent` attr, but that `parent` object will be `None`, causing the `assert` to fail. This should avoid that. :-)
This commit is contained in:
parent
f9ec06d1dc
commit
1c11a35f70
1 changed files with 1 additions and 1 deletions
|
@ -1011,7 +1011,7 @@ class PyVmomiHelper(object):
|
||||||
if not rp[0]:
|
if not rp[0]:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not hasattr(rp[0], 'parent'):
|
if not hasattr(rp[0], 'parent') or not rp[0].parent:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Find resource pool on host
|
# Find resource pool on host
|
||||||
|
|
Loading…
Reference in a new issue