app/controllers/servers_controller.rb in rumm-0.0.24 vs app/controllers/servers_controller.rb in rumm-0.1.0

- old
+ new

@@ -15,21 +15,31 @@ template = Servers::CreateForm argv = MVCLI::Argv.new command.argv form = template.new argv.options form.validate! #Add personalization + options = { name: form.name, flavor_id: form.flavor_id, image_id: form.image_id, private_key_path: form.ssh_private, #"~/.ssh/id_rsa" public_key_path: form.ssh_public #"~/.ssh/id_rsa.pub" } + + if form.no_passwd_lock + options[:no_passwd_lock] = true + end + command.output.puts "--> bootstrapping server #{options[:name]}" #Progress bar server = compute.servers.bootstrap options command.output.puts " done." - return server + + OpenStruct.new.tap do |os| + os.server = server + os.no_passwd_lock = options[:no_passwd_lock] + end end def update template = Servers::UpdateForm argv = MVCLI::Argv.new command.argv