Only set custom :box
& :box_url
values for known Bento boxes.
#151
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The default values for the
:box
and:box_url
attributes were alwaysimplicitly based on the Bento project's base boxes
(https://github.com/chef/bento). This meant that for a small number of
common/known platforms, the box name and URLs could be pre-calculated to
help with initial out-of-the-box experience.
For example, given a platform name of
"ubuntu-14.04"
, a default boxname of
"opscode-ubuntu-14.04"
and box URL could be computed (but onlyfor VirtualBox or VMware-based providers). Any custom platform name
would have to explicitly override the default value for at least
:box
if not also for
:box_url
.This commit makes the implicit default code for Bento boxes explicit. In
other words, if your platform name does not match the pre-defined Bento
box platforms, the default of
:box
will be the platform name and the:box_url
will benil
. Similarly, if you use a provider other thanVirtualBox or VMware-*, the default of
:box
will be the platform nameand the
:box_url
will benil
.This update allows for less boilerplate configuration, for example:
At a time in the near future, the S3 URLs for Bento boxes could move to
Atlas (formerly Vagrant Cloud) box names, but the same defaulting logic
can apply.