Add deprecation warning when `differencing_disk` option is used

This commit is contained in:
Chris Roberts 2018-05-29 10:21:06 -07:00
parent c238dc0a35
commit 73c09de1a9
2 changed files with 11 additions and 0 deletions

View File

@ -65,6 +65,9 @@ module VagrantPlugins
end
def finalize!
if @differencing_disk != UNSET_VALUE
@_differencing_disk_deprecation = true
end
@linked_clone = false if @linked_clone == UNSET_VALUE
@differencing_disk = false if @differencing_disk == UNSET_VALUE
@linked_clone ||= @differencing_disk
@ -92,6 +95,10 @@ module VagrantPlugins
def validate(machine)
errors = _detected_errors
if @_differencing_disk_deprecation && machine
machine.ui.warn I18n.t("vagrant_hyperv.config.differencing_disk_deprecation")
end
if !vm_integration_services.is_a?(Hash)
errors << I18n.t("vagrant_hyperv.config.invalid_integration_services_type",
received: vm_integration_services.class)

View File

@ -35,6 +35,10 @@ en:
Received: %{entry_value}
Allowed: true, false
differencing_disk_deprecation: |-
The `differencing_disk` configuration option is deprecated and should
no longer be used. The `linked_clone` configuration option should
be used instead.
errors:
admin_required: |-
The Hyper-V provider requires that Vagrant be run with