ey-core 3.2.5 → 3.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ey-core/models/server.rb +6 -2
- data/lib/ey-core/requests/destroy_server.rb +5 -3
- data/lib/ey-core/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: 86743788ba30d4b49ebd3fb3a78dfe948cd45118
|
4
|
+
data.tar.gz: 09c133f4592f7a8d3d0f724d7df6722308dd1d28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49882dd05a18313f82f66da5c1064b1601c1cb6b7a6248d558fa87be81f128243a9b008293f2395c7d2389f686c4acbe30989dd4e56cc1520837a9b186e5656e
|
7
|
+
data.tar.gz: b83cf5cdb1bb7b71380403f019bbc61ae48af70de174d129a13044974cf94814b0b0c320471599dff90a478adbdae4e74539466e968adc2f7e6e0b862e236242
|
@@ -131,15 +131,19 @@ class Ey::Core::Client::Server < Ey::Core::Model
|
|
131
131
|
end
|
132
132
|
end
|
133
133
|
|
134
|
-
def destroy!
|
134
|
+
def destroy!(skip_snapshot="false")
|
135
135
|
if environment.servers.count == 1
|
136
136
|
raise Ey::Core::Client::NotPermitted, "Terminating the last server in an environment is not allowed. You must deprovision or destroy the environment instead."
|
137
137
|
end
|
138
138
|
|
139
139
|
requires :identity
|
140
140
|
|
141
|
+
params = {
|
142
|
+
:skip_snapshot => skip_snapshot
|
143
|
+
}
|
144
|
+
|
141
145
|
connection.requests.new(
|
142
|
-
self.connection.destroy_server(self.identity).body["request"]
|
146
|
+
self.connection.destroy_server(self.identity, params).body["request"]
|
143
147
|
)
|
144
148
|
end
|
145
149
|
end
|
@@ -1,15 +1,17 @@
|
|
1
1
|
class Ey::Core::Client
|
2
2
|
class Real
|
3
|
-
def destroy_server(id)
|
3
|
+
def destroy_server(id,options={})
|
4
|
+
|
4
5
|
request(
|
5
6
|
:method => :delete,
|
6
|
-
:path => "/servers/#{id}"
|
7
|
+
:path => "/servers/#{id}",
|
8
|
+
:query => options
|
7
9
|
)
|
8
10
|
end
|
9
11
|
end
|
10
12
|
|
11
13
|
class Mock
|
12
|
-
def destroy_server(id)
|
14
|
+
def destroy_server(id,options={})
|
13
15
|
deprovision_procedure = lambda do |_|
|
14
16
|
server = self.data[:servers][id]
|
15
17
|
|
data/lib/ey-core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ey-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Lane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|