Validate an IP is given for a private network [GH-1788]

This commit is contained in:
Mitchell Hashimoto 2013-06-09 13:46:46 -07:00
parent 3d1332c86f
commit cf2f6da4db
3 changed files with 11 additions and 0 deletions

View File

@ -36,6 +36,7 @@ BUG FIXES:
- `config.vm.guest` properly forces guests again. [GH-1800]
- The `read_ip_address` capability for linux properly reads the IP
of only the first network interface. [GH-1799]
- Validate that an IP is given for a private network. [GH-1788]
## 1.2.2 (April 23, 2013)

View File

@ -385,6 +385,14 @@ module VagrantPlugins
fp_host_ports.add(options[:host])
end
end
if type == :private_network
if options[:type] != :dhcp
if !options[:ip]
errors << I18n.t("vagrant.config.vm.network_ip_required")
end
end
end
end
# We're done with VM level errors so prepare the section

View File

@ -613,6 +613,8 @@ en:
nfs_requires_host: |-
Using NFS shared folders requires a host to be specified
using `config.vagrant.host`.
network_ip_required: |-
An IP is required for a private network.
network_fp_host_not_unique: |-
Forwarded port '%{host}' (host port) is declared multiple times
network_fp_requires_ports: |-