ec2-host 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/ec2/host/host_data.rb +15 -1
- data/lib/ec2/host/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: e80e3a14cf3ad4795bc1273295ee6b035e507d5c
|
4
|
+
data.tar.gz: d032c6349e2f6a6e7a0e9f0463143e244a3aee42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a46430ddba38a195b0a075bef6f09f0eda61753dada4e13f97b349a6ff90b7bdecf75be1fe2ecb44d0035d93b284c4293f8cb63e4c03934cbd509ff8c7919ca4
|
7
|
+
data.tar.gz: 548aca969b81f3988c6b5d668b9f2255df8e528bd24dbb5f96634f9dfec507412a742e9144ba8a46e628c8e7be93d213b64dec1640b0998fe90f798b526db46c
|
data/CHANGELOG.md
CHANGED
data/lib/ec2/host/host_data.rb
CHANGED
@@ -75,6 +75,18 @@ class EC2
|
|
75
75
|
instance.monitoring.state
|
76
76
|
end
|
77
77
|
|
78
|
+
def availability_zone
|
79
|
+
instance.placement.availability_zone
|
80
|
+
end
|
81
|
+
|
82
|
+
def spot?
|
83
|
+
instance.instance_lifecycle == 'spot'
|
84
|
+
end
|
85
|
+
|
86
|
+
def dedicated?
|
87
|
+
instance.placement.tenancy == 'dedicated'
|
88
|
+
end
|
89
|
+
|
78
90
|
# compatibility with dino-host
|
79
91
|
def ip
|
80
92
|
private_ip_address
|
@@ -139,6 +151,7 @@ class EC2
|
|
139
151
|
end
|
140
152
|
params.merge!(
|
141
153
|
"region" => region,
|
154
|
+
"availability_zone" => availability_zone,
|
142
155
|
"instance_id" => instance_id,
|
143
156
|
"instance_type" => instance_type,
|
144
157
|
"private_ip_address" => private_ip_address,
|
@@ -146,6 +159,7 @@ class EC2
|
|
146
159
|
"launch_time" => launch_time,
|
147
160
|
"state" => state,
|
148
161
|
"monitoring" => monitoring,
|
162
|
+
"spot" => spot?,
|
149
163
|
)
|
150
164
|
end
|
151
165
|
|
@@ -212,7 +226,7 @@ class EC2
|
|
212
226
|
v
|
213
227
|
end
|
214
228
|
|
215
|
-
# compatibility with
|
229
|
+
# compatibility with dino-host
|
216
230
|
#
|
217
231
|
# If Service,Status,Tags tags are defined
|
218
232
|
#
|
data/lib/ec2/host/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ec2-host
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|