VMware: Refactor vmware_vmkernel module (#35531)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2018-02-04 06:08:45 +05:30 committed by GitHub
parent 367258507a
commit 02b28d4584
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 460 additions and 110 deletions

View file

@ -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