tutum 0.2 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tutum.rb +1 -1
- data/lib/tutum_api.rb +5 -1
- data/lib/tutum_node_clusters.rb +6 -6
- data/lib/tutum_node_types.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5a49c9e4f2483a34311c468074e4d3c8621d1c0
|
4
|
+
data.tar.gz: 718d7d060dc0b6c5b4d0c889d462eef0eef3587e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9c9df416cf52f59bbed97eec23292ee21d24a242e162b0b41ec302f06b53a9b9cd3d3cf32ce41d34d608bf88c83275f69425eb05d0394bcf7673e49218a7cfa
|
7
|
+
data.tar.gz: 1409d1aff2eb663d7cda346013c125aab888efb67f7af1ec1edab92e51229d1f9008d67c85825b56ab000eacd1cfc450e11f935616682e8e0b930f1d64b15658
|
data/lib/tutum.rb
CHANGED
data/lib/tutum_api.rb
CHANGED
@@ -17,7 +17,11 @@ class TutumApi
|
|
17
17
|
def expect_20x(path, &block)
|
18
18
|
response = block.call
|
19
19
|
if(response.code/10 != 20)
|
20
|
-
|
20
|
+
msg = response.inspect
|
21
|
+
if(response.parsed_response)
|
22
|
+
msg = response.parsed_response.inspect
|
23
|
+
end
|
24
|
+
raise TutumError.new("#{response.code} received for API call to #{path}: #{msg}")
|
21
25
|
end
|
22
26
|
response
|
23
27
|
end
|
data/lib/tutum_node_clusters.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
class TutumNodeClusters < TutumApi
|
2
2
|
def list_url
|
3
|
-
"/
|
3
|
+
"/nodecluster/"
|
4
4
|
end
|
5
5
|
|
6
6
|
def list(params)
|
@@ -8,7 +8,7 @@ class TutumNodeClusters < TutumApi
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def create_url
|
11
|
-
"/
|
11
|
+
"/nodecluster/"
|
12
12
|
end
|
13
13
|
|
14
14
|
def create(params)
|
@@ -16,7 +16,7 @@ class TutumNodeClusters < TutumApi
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def get_url(uuid)
|
19
|
-
"/
|
19
|
+
"/nodecluster/#{uuid}/"
|
20
20
|
end
|
21
21
|
|
22
22
|
def get(uuid)
|
@@ -24,7 +24,7 @@ class TutumNodeClusters < TutumApi
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def update_url(uuid)
|
27
|
-
"/
|
27
|
+
"/nodecluster/#{uuid}/"
|
28
28
|
end
|
29
29
|
|
30
30
|
def update(uuid, params)
|
@@ -32,7 +32,7 @@ class TutumNodeClusters < TutumApi
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def deploy_url(uuid)
|
35
|
-
"/
|
35
|
+
"/nodecluster/#{uuid}/deploy/"
|
36
36
|
end
|
37
37
|
|
38
38
|
def deploy(uuid, params)
|
@@ -40,7 +40,7 @@ class TutumNodeClusters < TutumApi
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def terminate_url(uuid)
|
43
|
-
"/
|
43
|
+
"/nodecluster/#{uuid}/"
|
44
44
|
end
|
45
45
|
|
46
46
|
def terminate(uuid)
|
data/lib/tutum_node_types.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
class TutumNodeTypes < TutumApi
|
2
2
|
def list_url
|
3
|
-
"/
|
3
|
+
"/nodetype/"
|
4
4
|
end
|
5
5
|
|
6
|
-
def list
|
7
|
-
http_get(list_url
|
6
|
+
def list
|
7
|
+
http_get(list_url)
|
8
8
|
end
|
9
9
|
|
10
10
|
def get_url(uuid)
|
11
|
-
"/
|
11
|
+
"/nodetype/#{uuid}/"
|
12
12
|
end
|
13
13
|
|
14
14
|
def get(uuid)
|