CloudyScripts 1.10.43 → 1.10.44
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
@@ -12,7 +12,7 @@ require 'rake/testtask'
|
|
12
12
|
|
13
13
|
spec = Gem::Specification.new do |s|
|
14
14
|
s.name = 'CloudyScripts'
|
15
|
-
s.version = '1.10.
|
15
|
+
s.version = '1.10.44'
|
16
16
|
s.has_rdoc = true
|
17
17
|
s.extra_rdoc_files = ['README.rdoc', 'LICENSE']
|
18
18
|
s.summary = 'Scripts to facilitate programming for infrastructure clouds.'
|
@@ -151,7 +151,8 @@ class AuditBenchmark
|
|
151
151
|
# end
|
152
152
|
|
153
153
|
def duration()
|
154
|
-
execution_order().flatten().each().inject(0) {|result, element| result + element.duration}
|
154
|
+
#execution_order().flatten().each().inject(0) {|result, element| result + element.duration}
|
155
|
+
execution_order().flatten().inject(0) {|result, element| result + element.duration}
|
155
156
|
end
|
156
157
|
|
157
158
|
def to_hash()
|
@@ -279,7 +279,7 @@ class RemoteCommandHandler
|
|
279
279
|
exec_string = "sh -c 'echo #{push_data} >tmp.txt; #{exec_string} <tmp.txt; rm -f tmp.txt'" unless push_data == nil
|
280
280
|
stdout = []
|
281
281
|
stderr = []
|
282
|
-
result = remote_exec_helper(exec_string, stdout, stderr)
|
282
|
+
result = remote_exec_helper(exec_string, stdout, stderr, true)
|
283
283
|
em = "RemoteCommandHandler: #{exec_string} lead to stderr message: #{stderr.join().strip}"
|
284
284
|
@logger.info(em) unless stderr.size == 0
|
285
285
|
raise Exception.new(em) unless result == true || raise_exception == false
|
@@ -35,9 +35,9 @@ class AuditViaSsh < Ec2Script
|
|
35
35
|
if @input_params[:sec_grp_name] == nil
|
36
36
|
@input_params[:sec_grp_name] = "default"
|
37
37
|
end
|
38
|
-
if @input_params[:audit_type] != nil && @input_params[:audit_type].
|
38
|
+
if @input_params[:audit_type] != nil && @input_params[:audit_type].downcase.eql?("ssh")
|
39
39
|
@input_params[:benchmark_file] = "./lib/audit/benchmark_ssh.zip"
|
40
|
-
elsif @input_params[:audit_type] != nil && @input_params[:audit_type].
|
40
|
+
elsif @input_params[:audit_type] != nil && @input_params[:audit_type].downcase.eql?("apache")
|
41
41
|
@input_params[:benchmark_file] = "./lib/audit/benchmark_apache.zip"
|
42
42
|
else
|
43
43
|
raise Exception.new("Invalid Audit '#{@input_params[:audit_type]}' specified")
|
data/lib/scripts/ec2/copy_ami.rb
CHANGED
@@ -214,13 +214,8 @@ class CopyAmi < Ec2Script
|
|
214
214
|
def enter()
|
215
215
|
remote_region()
|
216
216
|
# Get Amazon Kernel Image ID
|
217
|
-
|
218
|
-
|
219
|
-
aki = get_aws_kernel_image_aki(@context[:ec2_api_handler].server, @context[:kernel_id],
|
220
|
-
@context[:target_ec2_handler].server)
|
221
|
-
#@context[:result][:image_id] = register_snapshot(@context[:new_snapshot_id], @context[:name],
|
222
|
-
# @context[:root_device_name], @context[:description], nil,
|
223
|
-
# nil, @context[:architecture])
|
217
|
+
aki = get_aws_kernel_image_aki(@context[:source_availability_zone], @context[:kernel_id],
|
218
|
+
@context[:target_availability_zone])
|
224
219
|
@context[:result][:image_id] = register_snapshot(@context[:new_snapshot_id], @context[:name],
|
225
220
|
@context[:root_device_name], @context[:description], aki,
|
226
221
|
nil, @context[:architecture])
|
@@ -19,7 +19,15 @@ class Ec2Script
|
|
19
19
|
end
|
20
20
|
@result = {:done => false, :failed => false}
|
21
21
|
@input_params[:result] = @result
|
22
|
-
@
|
22
|
+
@input_params.each() do |param_key, param_value|
|
23
|
+
if [:logger, :ec2_api_handler, :target_ec2_handler, :remote_command_handler,
|
24
|
+
:source_ssh_keydata, :target_ssh_keydata
|
25
|
+
].include?(param_key.to_s.to_sym)
|
26
|
+
@logger.debug("INPUT PARAM #{param_key} is set [but not logged]")
|
27
|
+
else
|
28
|
+
@logger.debug("INPUT PARAM #{param_key} = #{param_value.inspect}")
|
29
|
+
end
|
30
|
+
end
|
23
31
|
end
|
24
32
|
|
25
33
|
def register_state_change_listener(listener)
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: CloudyScripts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 103
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 1
|
7
8
|
- 10
|
8
|
-
-
|
9
|
-
version: 1.10.
|
9
|
+
- 44
|
10
|
+
version: 1.10.44
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Matthias Jung
|
@@ -14,16 +15,18 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-07 00:00:00 +02:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: amazon-ec2
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
27
|
- - ">="
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
27
30
|
segments:
|
28
31
|
- 0
|
29
32
|
version: "0"
|
@@ -33,9 +36,11 @@ dependencies:
|
|
33
36
|
name: net-ssh
|
34
37
|
prerelease: false
|
35
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
36
40
|
requirements:
|
37
41
|
- - ">="
|
38
42
|
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
39
44
|
segments:
|
40
45
|
- 0
|
41
46
|
version: "0"
|
@@ -45,9 +50,11 @@ dependencies:
|
|
45
50
|
name: net-scp
|
46
51
|
prerelease: false
|
47
52
|
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
48
54
|
requirements:
|
49
55
|
- - ">="
|
50
56
|
- !ruby/object:Gem::Version
|
57
|
+
hash: 3
|
51
58
|
segments:
|
52
59
|
- 0
|
53
60
|
version: "0"
|
@@ -271,23 +278,27 @@ rdoc_options: []
|
|
271
278
|
require_paths:
|
272
279
|
- lib
|
273
280
|
required_ruby_version: !ruby/object:Gem::Requirement
|
281
|
+
none: false
|
274
282
|
requirements:
|
275
283
|
- - ">="
|
276
284
|
- !ruby/object:Gem::Version
|
285
|
+
hash: 3
|
277
286
|
segments:
|
278
287
|
- 0
|
279
288
|
version: "0"
|
280
289
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
290
|
+
none: false
|
281
291
|
requirements:
|
282
292
|
- - ">="
|
283
293
|
- !ruby/object:Gem::Version
|
294
|
+
hash: 3
|
284
295
|
segments:
|
285
296
|
- 0
|
286
297
|
version: "0"
|
287
298
|
requirements: []
|
288
299
|
|
289
300
|
rubyforge_project: cloudyscripts
|
290
|
-
rubygems_version: 1.3.
|
301
|
+
rubygems_version: 1.3.7
|
291
302
|
signing_key:
|
292
303
|
specification_version: 3
|
293
304
|
summary: Scripts to facilitate programming for infrastructure clouds.
|