providers/virtualbox: some validation around internal networks
This commit is contained in:
parent
2d957cdaab
commit
602505a136
|
@ -120,6 +120,14 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Verify that internal networks are only on private networks.
|
||||||
|
machine.config.vm.networks.each do |type, data|
|
||||||
|
if data[:virtualbox__intnet] && type != :private_network
|
||||||
|
errors << I18n.t("vagrant.virtualbox.config.intnet_on_bad_type")
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
{ "VirtualBox Provider" => errors }
|
{ "VirtualBox Provider" => errors }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,8 @@ en:
|
||||||
config:
|
config:
|
||||||
id_in_pre_import: |-
|
id_in_pre_import: |-
|
||||||
The ':id' parameter is not available in "pre-import" customizations.
|
The ':id' parameter is not available in "pre-import" customizations.
|
||||||
|
intnet_on_bad_type: |-
|
||||||
|
VirtualBox internal networks can only be enabled on "private_networks"
|
||||||
invalid_event: |-
|
invalid_event: |-
|
||||||
%{event} is not a valid event for customization. Valid events
|
%{event} is not a valid event for customization. Valid events
|
||||||
are: %{valid_events}
|
are: %{valid_events}
|
||||||
|
|
Loading…
Reference in New Issue