aebus 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/aebus.gemspec +1 -1
- data/lib/aebus.rb +6 -5
- data/lib/aebus/version.rb +1 -1
- metadata +30 -20
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MjJlMGE1MmU0MTdhZGJhOWFjYWYxY2JmMTBmNTVhYzFkNzEwNTBlZQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YTVkMzA0Yjc4NDEyN2FkMDg0MjdjZGI2NmQ5ZGM0NmJkZDhmNDMxNw==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NzdmZmI5YzE0MTUwOTkwMTNhOWMyNjE4ZWNhZmNkMDhiZmJkMDdhNDJjYWFm
|
10
|
+
NTM2YmY0NWQyMzczNDNhYzVkZGE3MmE3NGYyNjJlYmUyNWZlZDZhM2IwYjhl
|
11
|
+
NjdiNmQyYTA4YmM4MzBiZmQ2ZDA4NTlmYmEwOTVlMmYzYzkwMWM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MzQ2YTUwZjRkMWM3NDA2NGRiNjI3ZmJiNjIyYTk3NzY1MGRkN2UwYzQzYTM5
|
14
|
+
NDUwYmViNjYxNjk5Njc0YjA1NzBhODI2ZWJjOTg2OGIwNmZlZjI1MmEzZTY3
|
15
|
+
YmYxMGU5YzYzYmI5NTgxNDE4YzZmYWIxMWE3MDA1NjVhODY1ZTY=
|
data/aebus.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_dependency("commander", "~> 4.0.6")
|
22
22
|
s.add_dependency("parse-cron", ">= 0.1.1")
|
23
23
|
s.add_dependency("amazon-ec2", "~> 0.9.17")
|
24
|
-
s.add_dependency("aws-ses", "~> 0.
|
24
|
+
s.add_dependency("aws-ses", "~> 0.5.0")
|
25
25
|
|
26
26
|
# specify any dependencies here; for example:
|
27
27
|
# s.add_development_dependency "rspec"
|
data/lib/aebus.rb
CHANGED
@@ -193,7 +193,8 @@ module Aebus
|
|
193
193
|
end
|
194
194
|
|
195
195
|
begin
|
196
|
-
|
196
|
+
tag_set = volume_info.volumeSet.item[0].tagSet
|
197
|
+
volume_tags = (tag_set and tag_set.item) ? tag_set.item : []
|
197
198
|
|
198
199
|
name_and_desc = Core.name_and_desc(volume_id, volume_tags, @current_time_utc)
|
199
200
|
create_response = @ec2.create_snapshot(:volume_id => volume_id, :description => name_and_desc[1])
|
@@ -265,7 +266,7 @@ module Aebus
|
|
265
266
|
def purge_snapshot(snapshot_id)
|
266
267
|
begin
|
267
268
|
response = @ec2.delete_snapshot(:snapshot_id => snapshot_id)
|
268
|
-
if response[
|
269
|
+
if response['return']
|
269
270
|
logger.info("Purged snapshot #{snapshot_id}")
|
270
271
|
true
|
271
272
|
else
|
@@ -292,13 +293,13 @@ module Aebus
|
|
292
293
|
|
293
294
|
def send_report(message)
|
294
295
|
if message.nil?
|
295
|
-
logger.warn(
|
296
|
+
logger.warn('Tried to send a message, but no message was specified')
|
296
297
|
return
|
297
298
|
end
|
298
299
|
to_address = @config.defaults["to_address"]
|
299
300
|
from_address = @config.defaults["from_address"]
|
300
301
|
if to_address.nil? or from_address.nil?
|
301
|
-
logger.warn(
|
302
|
+
logger.warn('Tried to send a message but either to or from address where missing from configuration')
|
302
303
|
return
|
303
304
|
end
|
304
305
|
ses = AWS::SES::Base.new(
|
@@ -306,7 +307,7 @@ module Aebus
|
|
306
307
|
:secret_access_key => @config.defaults["secret_access_key"]
|
307
308
|
)
|
308
309
|
logger.info("Sending report to #{to_address} from account #{from_address}")
|
309
|
-
ses.send_email :to =>
|
310
|
+
ses.send_email :to => to_address,
|
310
311
|
:source => from_address,
|
311
312
|
:subject => "Aebus Report",
|
312
313
|
:text_body => message
|
data/lib/aebus/version.rb
CHANGED
metadata
CHANGED
@@ -1,60 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aebus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Marco Sandrini
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-11-21 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: commander
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 4.0.6
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.0.6
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: parse-cron
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
31
|
- - ! '>='
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: 0.1.1
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.1.1
|
36
41
|
- !ruby/object:Gem::Dependency
|
37
42
|
name: amazon-ec2
|
38
|
-
requirement:
|
39
|
-
none: false
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
40
44
|
requirements:
|
41
45
|
- - ~>
|
42
46
|
- !ruby/object:Gem::Version
|
43
47
|
version: 0.9.17
|
44
48
|
type: :runtime
|
45
49
|
prerelease: false
|
46
|
-
version_requirements:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.9.17
|
47
55
|
- !ruby/object:Gem::Dependency
|
48
56
|
name: aws-ses
|
49
|
-
requirement:
|
50
|
-
none: false
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
51
58
|
requirements:
|
52
59
|
- - ~>
|
53
60
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
61
|
+
version: 0.5.0
|
55
62
|
type: :runtime
|
56
63
|
prerelease: false
|
57
|
-
version_requirements:
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.5.0
|
58
69
|
description: A tool to automate snapshot management in EC2
|
59
70
|
email:
|
60
71
|
- nessche@gmail.com
|
@@ -79,26 +90,25 @@ files:
|
|
79
90
|
- lib/ec2/zones.rb
|
80
91
|
homepage: https://github.com/nessche/Aebus
|
81
92
|
licenses: []
|
93
|
+
metadata: {}
|
82
94
|
post_install_message:
|
83
95
|
rdoc_options: []
|
84
96
|
require_paths:
|
85
97
|
- lib
|
86
98
|
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
99
|
requirements:
|
89
100
|
- - ! '>='
|
90
101
|
- !ruby/object:Gem::Version
|
91
102
|
version: '0'
|
92
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
-
none: false
|
94
104
|
requirements:
|
95
105
|
- - ! '>='
|
96
106
|
- !ruby/object:Gem::Version
|
97
107
|
version: '0'
|
98
108
|
requirements: []
|
99
109
|
rubyforge_project:
|
100
|
-
rubygems_version:
|
110
|
+
rubygems_version: 2.0.5
|
101
111
|
signing_key:
|
102
|
-
specification_version:
|
112
|
+
specification_version: 4
|
103
113
|
summary: Automated EC2 BackUp Software
|
104
114
|
test_files: []
|