gaff 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +3 -1
- data/lib/gaff/ec2_api.rb +6 -4
- metadata +3 -3
data/README
CHANGED
@@ -12,6 +12,8 @@ Features:
|
|
12
12
|
|
13
13
|
Example usage:
|
14
14
|
|
15
|
+
$ gaff ./gaff.yml
|
16
|
+
|
15
17
|
Send a JSON-RPC formatted message to the exchange with the a routing key to perform operations on that API.
|
16
18
|
|
17
19
|
require 'rubygems'
|
@@ -32,4 +34,4 @@ hash = {"method" => "add_a_record", "params" => {
|
|
32
34
|
|
33
35
|
json = hash.to_json
|
34
36
|
|
35
|
-
exch.publish(json, :routing_key => "dynect")
|
37
|
+
exch.publish(json, :routing_key => "dynect")
|
data/lib/gaff/ec2_api.rb
CHANGED
@@ -18,8 +18,8 @@ class Gaff
|
|
18
18
|
case hash["method"]
|
19
19
|
when "attach_volume"
|
20
20
|
result = ec2.attach_volume(
|
21
|
-
hash["params"]["volume_id"],
|
22
21
|
hash["params"]["instance_id"],
|
22
|
+
hash["params"]["volume_id"],
|
23
23
|
hash["params"]["device"])
|
24
24
|
when "create_volume"
|
25
25
|
result = ec2.create_volume(
|
@@ -31,9 +31,11 @@ class Gaff
|
|
31
31
|
when "detach_volume"
|
32
32
|
result = ec2.detach_volume(
|
33
33
|
hash["params"]["volume_id"],
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
{
|
35
|
+
"InstanceId" => hash["params"]["instance_id"],
|
36
|
+
"Device" => hash["params"]["device"],
|
37
|
+
"Force" => hash["params"]["force"]
|
38
|
+
})
|
37
39
|
when "launch_instances"
|
38
40
|
result = ec2.run_instances(
|
39
41
|
hash["params"]["image_id"],
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 2
|
9
|
+
version: 0.3.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- joe williams
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-06-
|
17
|
+
date: 2010-06-14 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|