Revision 2b05cde9
src/cli/onehost | ||
---|---|---|
32 | 32 |
require 'command_parser' |
33 | 33 |
require 'one_helper/onehost_helper' |
34 | 34 |
require 'one_helper/onecluster_helper' |
35 |
require 'ec2_driver' |
|
35 | 36 |
|
36 | 37 |
cmd=CommandParser::CmdParser.new(ARGV) do |
37 | 38 |
usage "`onehost` <command> [<args>] [<options>]" |
... | ... | |
124 | 125 |
exit -1 |
125 | 126 |
end |
126 | 127 |
|
127 |
if !options[:ec2access].nil? && !options[:ec2secret].nil? |
|
128 |
puts "madafakaaa" |
|
129 |
puts "el acceso es "+options[:ec2access] |
|
130 |
puts "la key es "+options[:ec2secret] |
|
131 |
exit (-1) |
|
132 |
end |
|
128 |
encrypt(options) |
|
133 | 129 |
|
134 | 130 |
cid = options[:cluster] || ClusterPool::NONE_CLUSTER_ID |
135 | 131 |
|
src/vmm_mad/remotes/ec2/ec2_driver.rb | ||
---|---|---|
58 | 58 |
exit (-1) |
59 | 59 |
end |
60 | 60 |
|
61 |
def encrypt(opts) |
|
62 |
if !opts[:ec2access].nil? && !opts[:ec2secret].nil? |
|
63 |
puts "el accesoas es "+opts[:ec2access] |
|
64 |
puts "la key es "+opts[:ec2secret] |
|
65 |
cipher = OpenSSL::Cipher.new("aes-256-cbc") |
|
66 |
cipher.encrypt |
|
67 |
exit (-1) |
|
68 |
end |
|
61 | 69 |
|
70 |
end |
|
62 | 71 |
|
63 | 72 |
|
64 | 73 |
begin |
Also available in: Unified diff