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