Add disk name for disk config
This commit is contained in:
parent
995c4bbc60
commit
ee751ca6e1
|
@ -112,8 +112,9 @@ module VagrantPlugins
|
||||||
@size = nil if @size == UNSET_VALUE
|
@size = nil if @size == UNSET_VALUE
|
||||||
@primary = true if @primary == UNSET_VALUE
|
@primary = true if @primary == UNSET_VALUE
|
||||||
|
|
||||||
# generate name instead of nil if unset_value
|
# Give the disk a default name if unset
|
||||||
@name = nil if @name == UNSET_VALUE
|
# TODO: Name not required if primray?
|
||||||
|
@name = "vagrant_#{@type.to_s}_#{@id.split("-").last}" if @name == UNSET_VALUE
|
||||||
|
|
||||||
@config = nil if @config == UNSET_VALUE
|
@config = nil if @config == UNSET_VALUE
|
||||||
end
|
end
|
||||||
|
|
|
@ -791,6 +791,8 @@ module VagrantPlugins
|
||||||
errors << "There is more than one disk defined for guest '#{machine.name}'. Please pick a `primary` disk."
|
errors << "There is more than one disk defined for guest '#{machine.name}'. Please pick a `primary` disk."
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO: Check for duplicate disk names?
|
||||||
|
|
||||||
@__disks.each do |d|
|
@__disks.each do |d|
|
||||||
error = d.validate(machine)
|
error = d.validate(machine)
|
||||||
errors.concat error if !error.empty?
|
errors.concat error if !error.empty?
|
||||||
|
|
Loading…
Reference in New Issue