ey-core 3.2.4 → 3.2.5
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/cli/helpers/core.rb +1 -0
- data/lib/ey-core/client.rb +3 -1
- data/lib/ey-core/models/server.rb +3 -1
- data/lib/ey-core/requests/boot_environment.rb +1 -0
- data/lib/ey-core/requests/create_server.rb +1 -0
- data/lib/ey-core/version.rb +1 -1
- data/spec/servers_spec.rb +10 -0
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0f3833d05cac75ec11d7fe518652eb51ea835aa
|
4
|
+
data.tar.gz: 5ad5a49994ddcedc0f6ca9ad50d8640e0d6dbedc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21953fe50f30dcd32c333ca2af941e6daa9dd357bb8a660b51335a2344aa55106a91df8424e83edd6ac262861328558e29b14f863d5b01fb0837fb27dd9428cc
|
7
|
+
data.tar.gz: 889858ed3b518c9957135562f7c0d567930f2d882b511919a15f69f9b2b0ca0aebf6570b5afff316f06ff2cbea634f2fefbb12d57a5becdb5eb5f27357465f0d
|
data/lib/ey-core/client.rb
CHANGED
@@ -340,7 +340,9 @@ class Ey::Core::Client < Cistern::Service
|
|
340
340
|
end
|
341
341
|
|
342
342
|
@authentication = nil
|
343
|
-
@token = if
|
343
|
+
@token = if ENV["CORE_TOKEN"]
|
344
|
+
ENV["CORE_TOKEN"]
|
345
|
+
elsif options.has_key?(:token) && options[:token].nil?
|
344
346
|
@authentication = :none
|
345
347
|
else
|
346
348
|
options[:token] || token_dotfile[@url] || token_dotfile[@url.gsub(/\/$/, "")] # matching with or without trailing slash
|
@@ -4,6 +4,7 @@ class Ey::Core::Client::Server < Ey::Core::Model
|
|
4
4
|
identity :id, type: :integer
|
5
5
|
|
6
6
|
attribute :created_at, type: :time
|
7
|
+
attribute :dedicated, type: :boolean
|
7
8
|
attribute :deleted_at, type: :time
|
8
9
|
attribute :deprovisioned_at, type: :time
|
9
10
|
attribute :devices, type: :array
|
@@ -107,14 +108,15 @@ class Ey::Core::Client::Server < Ey::Core::Model
|
|
107
108
|
"snapshot" => self.snapshot_id,
|
108
109
|
"force" => self.force,
|
109
110
|
"server" => {
|
111
|
+
"dedicated" => self.dedicated,
|
110
112
|
"flavor" => self.flavor_id,
|
111
113
|
"iops" => self.iops,
|
112
114
|
"location" => self.location || environment.region,
|
113
115
|
"mnt_volume_size" => self.mnt_volume_size,
|
114
116
|
"name" => self.name,
|
117
|
+
"release_label" => self.release_label,
|
115
118
|
"role" => self.role,
|
116
119
|
"volume_size" => self.volume_size,
|
117
|
-
"release_label" => self.release_label,
|
118
120
|
}
|
119
121
|
}
|
120
122
|
connection.requests.new(connection.create_server(server_attributes).body["request"])
|
@@ -115,6 +115,7 @@ class Ey::Core::Client
|
|
115
115
|
"account" => url_for("/accounts/#{resource_identity(environment["account"])}"),
|
116
116
|
"alerts" => url_for("/servers/#{id}/alerts"),
|
117
117
|
"created_at" => Time.now.to_s,
|
118
|
+
"dedicated" => !!options[:dedicated],
|
118
119
|
"deprovisioned_at" => Time.now.to_s,
|
119
120
|
"devices" => block_device_map,
|
120
121
|
"enabled" => true,
|
@@ -42,6 +42,7 @@ class Ey::Core::Client
|
|
42
42
|
"account" => url_for("/accounts/#{account}"),
|
43
43
|
"alerts" => url_for("/servers/#{resource_id}/alerts"),
|
44
44
|
"created_at" => Time.now.to_s,
|
45
|
+
"dedicated" => !!server["dedicated"],
|
45
46
|
"deprovisioned_at" => nil,
|
46
47
|
"devices" => block_device_map(server),
|
47
48
|
"enabled" => true,
|
data/lib/ey-core/version.rb
CHANGED
data/spec/servers_spec.rb
CHANGED
@@ -82,6 +82,16 @@ describe 'servers' do
|
|
82
82
|
}
|
83
83
|
end
|
84
84
|
|
85
|
+
it "adds a dedicated app server" do
|
86
|
+
server = client.servers.create!(
|
87
|
+
:environment => environment,
|
88
|
+
:role => "app",
|
89
|
+
:flavor_id => "m3.large",
|
90
|
+
:dedicated => true,
|
91
|
+
).resource!
|
92
|
+
expect(server.dedicated).to be_truthy
|
93
|
+
end
|
94
|
+
|
85
95
|
it "adds an app server" do
|
86
96
|
expect {
|
87
97
|
client.servers.create!(
|
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.5
|
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-
|
11
|
+
date: 2017-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -890,4 +890,3 @@ test_files:
|
|
890
890
|
- spec/tokens_spec.rb
|
891
891
|
- spec/untracked_servers_spec.rb
|
892
892
|
- spec/users_spec.rb
|
893
|
-
has_rdoc:
|