lib/app42/command/setup.rb in app42-0.5.6 vs lib/app42/command/setup.rb in app42-0.5.7
- old
+ new
@@ -12,11 +12,11 @@
vm_type = get_vm_types
iaas = get_iaas_providers
setup_type = get_setup_type
flavour = get_flavour
setup_cloud_api_res = App42::Command::Base.new.create_cloud_setup setup_name, iaas, vm_type, setup_type, flavour
- exit! if setup_infra_res
+ exit! if setup_cloud_api_res
end
# Delete App42 cloud API setup, return true or error code/message
def delete_cloud_api
@options[:name] = get_setup_name if @options[:name].nil?
@@ -28,14 +28,10 @@
def get_setup_type
setup_type_hash = {}
setup_type = App42::Command::Config.new.get_setup_type_fm_server
setup_type['setupTypes'].select {|each_setup_type| setup_type_hash["#{each_setup_type['id']}"] = each_setup_type['name']}
- setup = input "Select Setup Type", setup_type_hash.values, true
-
- setup_type_id = nil
- setup_type_hash.each_pair{|type| setup_type_id = type[0] if type[1] == setup}
- return setup_type_id
+ return setup_type_hash.keys.first
end
# return flavour
def get_flavour
flavour_hash = {}
\ No newline at end of file