This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

using best_bosh_stemcell_version to select stemcell to default to

  • Loading branch information...
drnic committed Feb 25, 2013
1 parent 00d3b96 commit 93ff5806e4638c45c9a6eaf734a6855cda580d1a
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/bosh-cloudfoundry/config_options.rb
  2. +2 −2 lib/bosh/cli/commands/cf.rb
@@ -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)
}
@@ -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

0 comments on commit 93ff580

Please sign in to comment.