Have default names for primary and non-primary disks
This commit is contained in:
parent
b56dede627
commit
f8449063b6
|
@ -105,16 +105,14 @@ module VagrantPlugins
|
||||||
@primary = false
|
@primary = false
|
||||||
end
|
end
|
||||||
|
|
||||||
# Give the disk a default name if unset
|
if @name == UNSET_VALUE
|
||||||
# TODO: Name not required if primary?
|
if @primary
|
||||||
if @primary
|
@name = "vagrant_primary"
|
||||||
base_name = "vagrant_primary"
|
else
|
||||||
else
|
@name = "name_#{@type.to_s}_#{@id.split("-").last}"
|
||||||
base_name = "vagrant"
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@name = "#{base_name}_#{@type.to_s}_#{@id.split("-").last}" if @name == UNSET_VALUE
|
|
||||||
|
|
||||||
@provider_config = nil if @provider_config == {}
|
@provider_config = nil if @provider_config == {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue