mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-12 11:19:11 -07:00
VMware: Refactor vmware_vmkernel module (#35531)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
367258507a
commit
02b28d4584
3 changed files with 460 additions and 110 deletions
|
@ -1087,3 +1087,16 @@ class PyVmomi(object):
|
|||
if portgroup.spec.name == portgroup_name:
|
||||
return portgroup
|
||||
return False
|
||||
|
||||
def get_all_port_groups_by_host(self, host_system):
|
||||
"""
|
||||
Function to get all Port Group by host
|
||||
Args:
|
||||
host_system: Name of Host System
|
||||
|
||||
Returns: List of Port Group Spec
|
||||
"""
|
||||
pgs_list = []
|
||||
for pg in host_system.config.network.portgroup:
|
||||
pgs_list.append(pg)
|
||||
return pgs_list
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue