civo 0.3.12 → 0.3.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/civo/instance.rb +1 -0
- data/app/models/civo/snapshot.rb +4 -28
- data/lib/civo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b2606cec16c3a6cf508c3ad2ae7970271220f8b
|
4
|
+
data.tar.gz: 5c0c77ff03d9bd30331cf3d28cfc613489c016ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a05e3658aff0d50e6e43ea78ba299d366d58145735c1fb17c10cf61d94085a6f5f9b1365bb4d56b698ed39c684ed5444c3b58e6bf9c8200e7ee73bc024e4bc4d
|
7
|
+
data.tar.gz: 2bcbc57708a9c6e3bbe8d7257944dcb5306a2c6e10e58357ef16a7f8bd64bed07b636fd7e56b7002d7c49db2500df64f69314f1657a3bc476f99ddda92b50c76
|
data/app/models/civo/instance.rb
CHANGED
@@ -11,6 +11,7 @@ module Civo
|
|
11
11
|
put :stop, "/v1/instances/:id/stop", requires: [:id]
|
12
12
|
put :start, "/v1/instances/:id/start", requires: [:id]
|
13
13
|
put :upgrade, "/v1/instances/:id", requires: [:size, :id]
|
14
|
+
put :restore, "/v1/instances/:id/restore", requires: [:snapshot, :id]
|
14
15
|
|
15
16
|
def nice_ip_addresses
|
16
17
|
@ip_addresses ||= (self._attributes[:ip_addresses].items rescue []).map do |ip|
|
data/app/models/civo/snapshot.rb
CHANGED
@@ -1,32 +1,8 @@
|
|
1
1
|
module Civo
|
2
2
|
class Snapshot < Base
|
3
|
-
get :all, "/v1/snapshots"
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
"requested_at" => "2015-09-20T19:31:36+00:00",
|
8
|
-
"completed_at" => nil,
|
9
|
-
"status" => "new"
|
10
|
-
}]
|
11
|
-
get :find, "/v1/snapshots/:name", required: [:name], fake: {
|
12
|
-
"name" => "my-instance-snapshot",
|
13
|
-
"instance_id" => "44aab548-61ca-11e5-860e-5cf9389be614",
|
14
|
-
"safe" => true,
|
15
|
-
"requested_at" => "2015-09-20T19:31:36+00:00",
|
16
|
-
"completed_at" => nil,
|
17
|
-
"status" => "new"
|
18
|
-
}
|
19
|
-
put :create, "/v1/snapshots/:name", required: [:name, :instance_id], fake: {
|
20
|
-
"name" => "my-instance-snapshot",
|
21
|
-
"instance_id" => "44aab548-61ca-11e5-860e-5cf9389be614",
|
22
|
-
"safe" => true,
|
23
|
-
"requested_at" => "2015-09-20T19:31:36+00:00",
|
24
|
-
"completed_at" => nil,
|
25
|
-
"status" => "new"
|
26
|
-
}
|
27
|
-
delete :remove, "/v1/snapshots/:name", required: [:name], fake: {
|
28
|
-
"name" => "my-instance-snapshot",
|
29
|
-
"result" => "success"
|
30
|
-
}
|
3
|
+
get :all, "/v1/snapshots"
|
4
|
+
get :find, "/v1/snapshots/:name", required: [:name]
|
5
|
+
put :create, "/v1/snapshots/:name", required: [:name, :instance_id]
|
6
|
+
delete :remove, "/v1/snapshots/:name", required: [:name]
|
31
7
|
end
|
32
8
|
end
|
data/lib/civo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: civo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Jeffries
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flexirest
|