ec2-snapshot-replicator 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e47184d3770ccf05149c40f7c5c5ba4dd15bf41
|
4
|
+
data.tar.gz: 8955170fb745c11c2d475a1e03c58d4abd025d5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a4128672aabf8c0b7d3752578cf08ce02c8b59e60dcd5a42ebb87b39665534fc80a3b14613faa6e8bf6bcec41ac82172c0ef38fd1090381a30eb54cda17d90e
|
7
|
+
data.tar.gz: 1f5391fa2e63a501d224c9a7126f4417691635cbc22342a5cca7d6a7396acec27c9a10c01618253c7d879165a21230449823ad48e4a6f7258a8d901701d20e2c
|
@@ -11,11 +11,11 @@ module EC2
|
|
11
11
|
end
|
12
12
|
|
13
13
|
desc "start", "Start"
|
14
|
-
method_option :source_region, type: :string
|
15
|
-
method_option :destination_region, type: :string
|
14
|
+
method_option :source_region, type: :string
|
15
|
+
method_option :destination_region, type: :string
|
16
16
|
method_option :interval_sec, type: :numeric, default: 60 * 10
|
17
17
|
method_option :delay_deletion_sec, type: :numeric, default: 60 * 60 * 24 * 7
|
18
|
-
method_option :owner_id, type: :string
|
18
|
+
method_option :owner_id, type: :string
|
19
19
|
method_option :debug, type: :boolean, default: false
|
20
20
|
method_option :once, type: :boolean, default: false
|
21
21
|
method_option :config, type: :string
|
@@ -26,6 +26,7 @@ module EC2
|
|
26
26
|
config.load_yaml_file(options[:config])
|
27
27
|
end
|
28
28
|
config.load_options(options)
|
29
|
+
config.validate!
|
29
30
|
|
30
31
|
if options[:once]
|
31
32
|
Engine.new(config).run_once
|
@@ -14,6 +14,14 @@ module EC2
|
|
14
14
|
self[member] = value if value
|
15
15
|
end
|
16
16
|
end
|
17
|
+
|
18
|
+
def validate!
|
19
|
+
%w!source_region destination_region interval_sec delay_deletion_sec owner_id!.each do |k|
|
20
|
+
unless self[k]
|
21
|
+
raise "#{k} is not set."
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
17
25
|
end
|
18
26
|
end
|
19
27
|
end
|