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)
|
error_key(:bundler_error)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class CantReadMACAddresses < VagrantError
|
||||||
|
error_key(:cant_read_mac_addresses)
|
||||||
|
end
|
||||||
|
|
||||||
class CapabilityHostExplicitNotDetected < VagrantError
|
class CapabilityHostExplicitNotDetected < VagrantError
|
||||||
error_key(:capability_host_explicit_not_detected)
|
error_key(:capability_host_explicit_not_detected)
|
||||||
end
|
end
|
||||||
|
|
|
@ -12,7 +12,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
def self.configure_networks(machine, networks)
|
def self.configure_networks(machine, networks)
|
||||||
if !machine.provider.capability?(:nic_mac_addresses)
|
if !machine.provider.capability?(:nic_mac_addresses)
|
||||||
raise Errors::CantReadMACAddresses,
|
raise Vagrant::Errors::CantReadMACAddresses,
|
||||||
provider: machine.provider_name.to_s
|
provider: machine.provider_name.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
def self.create_vm_interface_map(machine, guest_network)
|
def self.create_vm_interface_map(machine, guest_network)
|
||||||
if !machine.provider.capability?(:nic_mac_addresses)
|
if !machine.provider.capability?(:nic_mac_addresses)
|
||||||
raise Errors::CantReadMACAddresses,
|
raise Vagrant::Errors::CantReadMACAddresses,
|
||||||
provider: machine.provider_name.to_s
|
provider: machine.provider_name.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,6 @@ module VagrantPlugins
|
||||||
error_namespace("vagrant_windows.errors")
|
error_namespace("vagrant_windows.errors")
|
||||||
end
|
end
|
||||||
|
|
||||||
class CantReadMACAddresses < WindowsError
|
|
||||||
error_key(:cant_read_mac_addresses)
|
|
||||||
end
|
|
||||||
|
|
||||||
class NetworkWinRMRequired < WindowsError
|
class NetworkWinRMRequired < WindowsError
|
||||||
error_key(:network_winrm_required)
|
error_key(:network_winrm_required)
|
||||||
end
|
end
|
||||||
|
|
|
@ -606,6 +606,14 @@ en:
|
||||||
issues. The error from Bundler is:
|
issues. The error from Bundler is:
|
||||||
|
|
||||||
%{message}
|
%{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: |-
|
capability_host_explicit_not_detected: |-
|
||||||
The explicit capability host specified of '%{value}' could not be
|
The explicit capability host specified of '%{value}' could not be
|
||||||
found.
|
found.
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
en:
|
en:
|
||||||
vagrant_windows:
|
vagrant_windows:
|
||||||
errors:
|
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: |-
|
network_winrm_required: |-
|
||||||
Configuring networks on Windows requires the communicator to be
|
Configuring networks on Windows requires the communicator to be
|
||||||
set to WinRM. To do this, add the following to your Vagrantfile:
|
set to WinRM. To do this, add the following to your Vagrantfile:
|
||||||
|
|
Loading…
Reference in New Issue