lib/app42/command/setup.rb in app42-0.5.10 vs lib/app42/command/setup.rb in app42-0.6.0

- old
+ new

@@ -37,16 +37,25 @@ response = clouldapi_operation __method__, @options[:setup] if is_setup_name_exist? @options[:setup] exit! if response end # collect BPaaS setup name from user and proceed BPaaS upgrade request - def upgrade_cloud_api + def upgrade @options[:setup] = get_setup_name if @options[:setup].nil? print_new_line - flavour = get_flavour - response = upgrade_clouldapi @options[:setup], flavour if is_setup_name_exist? @options[:setup] + flavour = get_flavour_upgrade @options[:setup] + response = upgrade_or_downgrade_clouldapi __method__, @options[:setup], flavour if is_setup_name_exist? @options[:setup] exit! if response + end + + # collect BPaaS setup name from user and proceed BPaaS downgrade request + def downgrade + @options[:setup] = get_setup_name if @options[:setup].nil? + print_new_line + flavour = get_flavour_downgrade @options[:setup] + response = upgrade_or_downgrade_clouldapi __method__, @options[:setup], flavour if is_setup_name_exist? @options[:setup] + exit! if response end # return setup type def get_setup_type setup_type_hash = {} @@ -56,10 +65,10 @@ return setup_type_hash.keys.first end # return flavour def get_flavour - flavour_hash = {} + flavour_hash = {} flavour_type = App42::Command::Config.new.get_flavour_type_fm_server flavour_type['flavours'].select {|each_flavour| flavour_hash["#{each_flavour['id']}"] = each_flavour['name']} flavour = input "Select Flavour", flavour_hash.values, true flavour_id = nil \ No newline at end of file