mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #15002 from camradal/devel
add find_host_portgroup_by_name function to vmware utils
This commit is contained in:
commit
e5460d6a6e
1 changed files with 8 additions and 0 deletions
|
@ -108,6 +108,14 @@ def find_vm_by_name(content, vm_name):
|
|||
return None
|
||||
|
||||
|
||||
def find_host_portgroup_by_name(host, portgroup_name):
|
||||
|
||||
for portgroup in host.config.network.portgroup:
|
||||
if portgroup.spec.name == portgroup_name:
|
||||
return portgroup
|
||||
return None
|
||||
|
||||
|
||||
def vmware_argument_spec():
|
||||
|
||||
return dict(
|
||||
|
|
Loading…
Reference in a new issue