Move "cant_read_mac_addresses" error to the global space
Now it is used not only by Windows, but by Darwin guests as well.
This commit is contained in:
parent
e426455309
commit
f930fa94af
|
@ -248,6 +248,10 @@ module Vagrant
|
|||
error_key(:bundler_error)
|
||||
end
|
||||
|
||||
class CantReadMACAddresses < VagrantError
|
||||
error_key(:cant_read_mac_addresses)
|
||||
end
|
||||
|
||||
class CapabilityHostExplicitNotDetected < VagrantError
|
||||
error_key(:capability_host_explicit_not_detected)
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@ module VagrantPlugins
|
|||
|
||||
def self.configure_networks(machine, networks)
|
||||
if !machine.provider.capability?(:nic_mac_addresses)
|
||||
raise Errors::CantReadMACAddresses,
|
||||
raise Vagrant::Errors::CantReadMACAddresses,
|
||||
provider: machine.provider_name.to_s
|
||||
end
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ module VagrantPlugins
|
|||
|
||||
def self.create_vm_interface_map(machine, guest_network)
|
||||
if !machine.provider.capability?(:nic_mac_addresses)
|
||||
raise Errors::CantReadMACAddresses,
|
||||
raise Vagrant::Errors::CantReadMACAddresses,
|
||||
provider: machine.provider_name.to_s
|
||||
end
|
||||
|
||||
|
|
|
@ -6,10 +6,6 @@ module VagrantPlugins
|
|||
error_namespace("vagrant_windows.errors")
|
||||
end
|
||||
|
||||
class CantReadMACAddresses < WindowsError
|
||||
error_key(:cant_read_mac_addresses)
|
||||
end
|
||||
|
||||
class NetworkWinRMRequired < WindowsError
|
||||
error_key(:network_winrm_required)
|
||||
end
|
||||
|
|
|
@ -606,6 +606,14 @@ en:
|
|||
issues. The error from Bundler is:
|
||||
|
||||
%{message}
|
||||
cant_read_mac_addresses: |-
|
||||
The provider you are using ('%{provider}') doesn't support the
|
||||
"nic_mac_addresses" provider capability which is required
|
||||
for advanced networking to work with this guest OS. Please inform
|
||||
the author of the provider to add this feature.
|
||||
|
||||
Until then, you must remove any networking configurations other
|
||||
than forwarded ports from your Vagrantfile for Vagrant to continue.
|
||||
capability_host_explicit_not_detected: |-
|
||||
The explicit capability host specified of '%{value}' could not be
|
||||
found.
|
||||
|
|
|
@ -1,14 +1,6 @@
|
|||
en:
|
||||
vagrant_windows:
|
||||
errors:
|
||||
cant_read_mac_addresses: |-
|
||||
The provider being used to start Windows ('%{provider}')
|
||||
doesn't support the "nic_mac_addresses" capability which is required
|
||||
for advanced networking to work with Windows guests. Please inform
|
||||
the author of the provider to add this feature.
|
||||
|
||||
Until then, you must remove any networking configurations other
|
||||
than forwarded ports from your Vagrantfile for Vagrant to continue.
|
||||
network_winrm_required: |-
|
||||
Configuring networks on Windows requires the communicator to be
|
||||
set to WinRM. To do this, add the following to your Vagrantfile:
|
||||
|
|
Loading…
Reference in New Issue