code: func (f *Finder) ResourcePoolListAll(ctx context.Context, path string) ([]*object.ResourcePool, error) {
  	pools, err := f.ResourcePoolList(ctx, path)
  	if err != nil {
  		if _, ok := err.(*NotFoundError); !ok {
  			return nil, err
  		}
  
  		vapps, _ := f.VirtualAppList(ctx, path)
  
  		if len(vapps) == 0 {
  			return nil, err
  		}
  
  		for _, vapp := range vapps {
  			pools = append(pools, vapp.ResourcePool)
  		}
  	}
  
  	return pools, nil
  }
docs: // ResourcePoolListAll combines ResourcePoolList and VirtualAppList
  // VirtualAppList is only called if ResourcePoolList does not find any pools with the given path.