vsphere/internal/helper/resourcepool/resource_pool_helper.go
func HasChildren(rp *object.ResourcePool) (bool, error) {
	props, err := Properties(rp)
	if err != nil {
		return false, err
	}
	if len(props.Vm) > 0 || len(props.ResourcePool) > 0 {
		return true, nil
	}
	return false, nil
}
func HasChildren(rp *object.ResourcePool) (bool, error) {
	props, err := Properties(rp)
	if err != nil {
		return false, err
	}
	if len(props.Vm) > 0 || len(props.ResourcePool) > 0 {
		return true, nil
	}
	return false, nil
}
func HasChildren ( rp * object . ResourcePool ) ( bool , error ) { props , err := Properties ( rp ) if err != nil { return false , err } if len ( props . Vm ) > 0 || len ( props . ResourcePool ) > 0 { return true , nil } return false , nil }
// HasChildren checks to see if a resource pool has any child items (virtual
// machines, vApps, or resource pools) and returns true if that is the case.
// This is useful when checking to see if a resource pool is safe to delete.
// Destroying a resource pool in vSphere destroys *all* children if at all
// possible, so extra verification is necessary to prevent accidental removal.
HasChildren checks to see if a resource pool has any child items ( virtual machines vApps or resource pools ) and returns true if that is the case . This is useful when checking to see if a resource pool is safe to delete . Destroying a resource pool in vSphere destroys * all * children if at all possible so extra verification is necessary to prevent accidental removal .