lib/bosh-cloudfoundry/config_options.rb in bosh-cloudfoundry-0.5.1 vs lib/bosh-cloudfoundry/config_options.rb in bosh-cloudfoundry-0.6.0

- old
+ new

@@ -26,11 +26,11 @@ # @return [Bosh::CloudFoundry::Config:: CommonConfig] Current common CF configuration def common_config @common_config ||= begin config_file = options[:common_config] || DEFAULT_CONFIG_PATH - common_config = Bosh::CloudFoundry::Config:: CommonConfig.new(config_file) + common_config = Bosh::CloudFoundry::Config::CommonConfig.new(config_file) common_config.bosh_git_repo ||= DEFAULT_BOSH_GIT_REPO common_config.save common_config end end @@ -243,10 +243,20 @@ common_config.save common_config.base_systems_dir end end + # using/uploading a dev release; not a final release + def dev_release_type? + system_config.release_type == "dev" + end + + # using/uploading a final release; not a dev release + def final_release_type? + !dev_release_type? + end + def system_initialized? system_config.system_initialized end def system_initialized! @@ -382,10 +392,10 @@ # @return [Array] BOSH stemcell versions available in target BOSH, e.g. ["0.6.4", "0.6.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) } end end \ No newline at end of file