separe code

This commit is contained in:
Sergio authored and Tino Vázquez committed 2017-05-29 16:33:31 +02:00
1 parent 95623c2e72
commit 2b05cde92e
2 files changed
+11 -6

No files matched your search

+2 -6
View File
@@ -32,6 +32,7 @@ $: << RUBY_LIB_LOCATION+"/cli"
require 'command_parser'
require 'one_helper/onehost_helper'
require 'one_helper/onecluster_helper'
require 'ec2_driver'
cmd=CommandParser::CmdParser.new(ARGV) do
usage "`onehost` <command> [<args>] [<options>]"
@@ -124,12 +125,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do
exit -1
end
if !options[:ec2access].nil? && !options[:ec2secret].nil?
puts "madafakaaa"
puts "el acceso es "+options[:ec2access]
puts "la key es "+options[:ec2secret]
exit (-1)
end
encrypt(options)
cid = options[:cluster] || ClusterPool::NONE_CLUSTER_ID
+9
View File
@@ -58,7 +58,16 @@ def handle_exception(action, ex, host, did, id = nil, file = nil)
exit (-1)
end
def encrypt(opts)
if !opts[:ec2access].nil? && !opts[:ec2secret].nil?
puts "el accesoas es "+opts[:ec2access]
puts "la key es "+opts[:ec2secret]
cipher = OpenSSL::Cipher.new("aes-256-cbc")
cipher.encrypt
exit (-1)
end
end
begin