Navigation Menu

Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

Commit

Permalink
using best_bosh_stemcell_version to select stemcell to default to
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic committed Feb 25, 2013
1 parent 00d3b96 commit 93ff580
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/bosh-cloudfoundry/config_options.rb
Expand Up @@ -384,7 +384,7 @@ def bosh_stemcell_versions
@bosh_stemcell_versions ||= begin
# [{"name"=>"bosh-stemcell", "version"=>"0.6.7", "cid"=>"ami-9730bffe"}]
stemcells = director.list_stemcells
stemcells.select! {|s| s["name"] == stemcell_name}
stemcells = stemcells.select {|s| s["name"] == stemcell_name}
stemcells.map { |rel| rel["version"] }.sort { |v1, v2|
version_cmp(v1, v2)
}
Expand Down
4 changes: 2 additions & 2 deletions lib/bosh/cli/commands/cf.rb
Expand Up @@ -319,12 +319,12 @@ def confirm_or_upload_stemcell
end
end
unless stemcell_version && stemcell_version.size
system_config.stemcell_version = latest_bosh_stemcell_version
system_config.stemcell_version = best_bosh_stemcell_version
system_config.save
end
unless bosh_stemcell_versions.include?(stemcell_version)
say "Requested stemcell version #{stemcell_version} is not available.".yellow
system_config.stemcell_version = latest_bosh_stemcell_version
system_config.stemcell_version = best_bosh_stemcell_version
system_config.save
end
say "Using stemcell #{stemcell_name} #{stemcell_version}".green
Expand Down

0 comments on commit 93ff580

Please sign in to comment.