vsphere/internal/virtualdevice/virtual_machine_device_subresource.go
func (r *Subresource) SetRestart(key string) {
	log.Printf("[DEBUG] %s: Resource argument %q requires a VM restart", r, key)
	switch d := r.rdd.(type) {
	case *schema.ResourceData:
		d.Set("reboot_required", true)
	case *schema.ResourceDiff:
		d.SetNew("reboot_required", true)
	default:
		// This should never happen, but log if it does.
		log.Printf("[WARN] %s: Could not flag reboot_required: invalid type %T", r, r.rdd)
	}
}
func (r *Subresource) SetRestart(key string) {
	log.Printf("[DEBUG] %s: Resource argument %q requires a VM restart", r, key)
	switch d := r.rdd.(type) {
	case *schema.ResourceData:
		d.Set("reboot_required", true)
	case *schema.ResourceDiff:
		d.SetNew("reboot_required", true)
	default:
		// This should never happen, but log if it does.
		log.Printf("[WARN] %s: Could not flag reboot_required: invalid type %T", r, r.rdd)
	}
}
func ( r * Subresource ) SetRestart ( key string ) { log . Printf ( " " , r , key ) switch d := r . rdd . ( type ) { case * schema . ResourceData : d . Set ( " " , true ) case * schema . ResourceDiff : d . SetNew ( " " , true ) default : // This should never happen, but log if it does. log . Printf ( " " , r , r . rdd ) } }
// SetRestart sets reboot_required in the global ResourceData. The key is only
// required for logging.
SetRestart sets reboot_required in the global ResourceData . The key is only required for logging .