code: func validatePhysicalHostForCreation(h *crimson.PhysicalHost) error {
  	switch {
  	case h == nil:
  		return status.Error(codes.InvalidArgument, "physical host specification is required")
  	case h.Name == "":
  		return status.Error(codes.InvalidArgument, "hostname is required and must be non-empty")
  	case h.Vlan != 0:
  		return status.Error(codes.InvalidArgument, "VLAN must not be specified, use IP address instead")
  	case h.Machine == "":
  		return status.Error(codes.InvalidArgument, "machine is required and must be non-empty")
  	case h.Nic == "":
  		return status.Error(codes.InvalidArgument, "NIC is required and must be non-empty")
  	case h.MacAddress != "":
  		return status.Error(codes.InvalidArgument, "MAC address must not be specified, use NIC instead")
  	case h.Os == "":
  		return status.Error(codes.InvalidArgument, "operating system is required and must be non-empty")
  	case h.VmSlots < 0:
  		return status.Error(codes.InvalidArgument, "VM slots must be non-negative")
  	default:
  		_, err := common.ParseIPv4(h.Ipv4)
  		if err != nil {
  			return status.Errorf(codes.InvalidArgument, "invalid IPv4 address %q", h.Ipv4)
  		}
  		return nil
  	}
  }
docs: // validatePhysicalHostForCreation validates a physical host for creation.