def list_portgroups(service_instance):
 return list_objects(service_instance, vim.dvs.DistributedVirtualPortgroup)

def list_portgroups ( service_instance ) : return list_objects ( service_instance , vim . dvs . DistributedVirtualPortgroup )
returns a list of distributed virtual portgroups associated with a given service instance .