fog-aws 3.6.5 → 3.6.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb6b720b1154779144fb0f7a9fad14d0db7e968513bcd81f53ef2d2dab9cd0ae
4
- data.tar.gz: e391f374bd90f7e79fb3177c03e75da6facca417fa415204ed4a1b42b4b398e2
3
+ metadata.gz: c594413eed794d4a0e79b9fbba4c9549df6e0a6e83a3e174ea68b6359e71c342
4
+ data.tar.gz: 4b5284a9b08122c2150ae5f5e9c7965214d83359c90f5f8bf70eac77465efea3
5
5
  SHA512:
6
- metadata.gz: 5bfcbc83a0c7159678946d75f3975064fd24fc16e607ed0b7c75e1f9f8bf96ea836e38107a3b633f0975735458043a3bae346e64e04118e10e8ca21e41beedd9
7
- data.tar.gz: c848bb24b012778855303188eed83e8f60acd8344d47fd09e1ff732d5659fb46c0a92dc00c433f48be352bf768f8e3f43165e05c4394e322b3675a2407a1ec81
6
+ metadata.gz: b7fbd8ea26343f7a3de26cc9d64dbe3993eac2433faed55f3d5ad55004c9d5c790e55774dac9b597038986c662c6d0a3fe01c260a9f5901a1c21e259856f377e
7
+ data.tar.gz: bb87840f38386b34e8360d5adf4cb0e0824c7c302f44d96aa7d3f70f2021da718e187ac6b6174691d4c101ede0f21431c0660f403f9e2ffe159feefc0b3dbac9
@@ -1,5 +1,19 @@
1
1
  # Change Log
2
2
 
3
+ ## [v3.6.5](https://github.com/fog/fog-aws/tree/v3.6.5) (2020-05-22)
4
+ [Full Changelog](https://github.com/fog/fog-aws/compare/v3.6.4...v3.6.5)
5
+
6
+ **Closed issues:**
7
+
8
+ - Fog::Compute::AWS is deprecated, please use Fog::AWS::Compute warning [\#565](https://github.com/fog/fog-aws/issues/565)
9
+ - Duplicate compute flavours [\#563](https://github.com/fog/fog-aws/issues/563)
10
+ - 3.6.4 does not fetch iam credentials using IMDSv2 when running from inside containers with IMDSv2 Defaults [\#560](https://github.com/fog/fog-aws/issues/560)
11
+
12
+ **Merged pull requests:**
13
+
14
+ - Fix naming of various AWS compute flavors [\#564](https://github.com/fog/fog-aws/pull/564) ([abrom](https://github.com/abrom))
15
+ - Gracefully handle failure of IMDSv2 and allow fallback to IMDSv1 [\#562](https://github.com/fog/fog-aws/pull/562) ([atyndall](https://github.com/atyndall))
16
+
3
17
  ## [v3.6.4](https://github.com/fog/fog-aws/tree/v3.6.4) (2020-05-14)
4
18
  [Full Changelog](https://github.com/fog/fog-aws/compare/v3.6.3...v3.6.4)
5
19
 
@@ -427,6 +441,7 @@
427
441
  - Expanding IAM support [\#274](https://github.com/fog/fog-aws/pull/274) ([MrPrimate](https://github.com/MrPrimate))
428
442
  - Rds snapshot improvements [\#269](https://github.com/fog/fog-aws/pull/269) ([tekken](https://github.com/tekken))
429
443
  - add default region to use\_iam\_profile [\#268](https://github.com/fog/fog-aws/pull/268) ([shaiguitar](https://github.com/shaiguitar))
444
+ - autoscaler attach/detatch [\#229](https://github.com/fog/fog-aws/pull/229) ([shaiguitar](https://github.com/shaiguitar))
430
445
 
431
446
  ## [v0.9.4](https://github.com/fog/fog-aws/tree/v0.9.4) (2016-06-28)
432
447
  [Full Changelog](https://github.com/fog/fog-aws/compare/v0.9.3...v0.9.4)
@@ -481,10 +496,6 @@
481
496
  ## [v0.8.2](https://github.com/fog/fog-aws/tree/v0.8.2) (2016-03-04)
482
497
  [Full Changelog](https://github.com/fog/fog-aws/compare/v0.9.0...v0.8.2)
483
498
 
484
- **Merged pull requests:**
485
-
486
- - autoscaler attach/detatch [\#229](https://github.com/fog/fog-aws/pull/229) ([shaiguitar](https://github.com/shaiguitar))
487
-
488
499
  ## [v0.9.0](https://github.com/fog/fog-aws/tree/v0.9.0) (2016-03-03)
489
500
  [Full Changelog](https://github.com/fog/fog-aws/compare/v0.8.1...v0.9.0)
490
501
 
@@ -230,7 +230,7 @@ module Fog
230
230
  'cn-northwest-1',
231
231
  'eu-central-1',
232
232
  'eu-north-1',
233
- 'eu-west-1', 'eu-west-2', 'eu-west-3',
233
+ 'eu-west-1', 'eu-west-2', 'eu-west-3', 'eu-south-1',
234
234
  'me-south-1',
235
235
  'us-east-1', 'us-east-2',
236
236
  'us-west-1', 'us-west-2',
@@ -14,6 +14,7 @@ module Fog
14
14
  attribute :associate_public_ip, :aliases => 'associatePublicIP'
15
15
  attribute :availability_zone, :aliases => 'availabilityZone'
16
16
  attribute :block_device_mapping, :aliases => 'blockDeviceMapping'
17
+ attribute :hibernation_options, :aliases => 'hibernationOptions'
17
18
  attribute :network_interfaces, :aliases => 'networkInterfaces'
18
19
  attribute :client_token, :aliases => 'clientToken'
19
20
  attribute :disable_api_termination, :aliases => 'disableApiTermination'
@@ -144,6 +145,7 @@ module Fog
144
145
 
145
146
  options = {
146
147
  'BlockDeviceMapping' => block_device_mapping,
148
+ 'HibernationOptions' => hibernation_options,
147
149
  'NetworkInterfaces' => network_interfaces,
148
150
  'ClientToken' => client_token,
149
151
  'DisableApiTermination' => disable_api_termination,
@@ -227,9 +229,9 @@ module Fog
227
229
  true
228
230
  end
229
231
 
230
- def stop(force = false)
232
+ def stop(options = {})
231
233
  requires :id
232
- service.stop_instances(id, force)
234
+ service.stop_instances(id, options)
233
235
  true
234
236
  end
235
237
 
@@ -22,6 +22,7 @@ module Fog
22
22
  # ami_launch_index=nil,
23
23
  # availability_zone=nil,
24
24
  # block_device_mapping=nil,
25
+ # hibernation_options=nil,
25
26
  # network_interfaces=nil,
26
27
  # client_token=nil,
27
28
  # dns_name=nil,
@@ -119,6 +120,7 @@ module Fog
119
120
  # ami_launch_index=0,
120
121
  # availability_zone="us-east-1b",
121
122
  # block_device_mapping=[],
123
+ # hibernation_options=[],
122
124
  # client_token=nil,
123
125
  # dns_name="ec2-25-2-474-44.compute-1.amazonaws.com",
124
126
  # groups=["default"],
@@ -39,7 +39,7 @@ module Fog
39
39
  end
40
40
 
41
41
  def is_default?
42
- require :is_default
42
+ requires :is_default
43
43
  is_default
44
44
  end
45
45
 
@@ -30,6 +30,8 @@ module Fog
30
30
  # * 'Ebs.Encrypted'<~Boolean> - specifies whether or not the volume is to be encrypted unless snapshot is specified
31
31
  # * 'Ebs.VolumeType'<~String> - Type of EBS volue. Valid options in ['standard', 'io1'] default is 'standard'.
32
32
  # * 'Ebs.Iops'<~String> - The number of I/O operations per second (IOPS) that the volume supports. Required when VolumeType is 'io1'
33
+ # * 'HibernationOptions'<~Array>: array of hashes
34
+ # * 'Configured'<~Boolean> - specifies whether or not the instance is configued for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites.
33
35
  # * 'NetworkInterfaces'<~Array>: array of hashes
34
36
  # * 'NetworkInterfaceId'<~String> - An existing interface to attach to a single instance
35
37
  # * 'DeviceIndex'<~String> - The device index. Applies both to attaching an existing network interface and creating a network interface
@@ -75,6 +77,8 @@ module Fog
75
77
  # * 'deviceName'<~String> - specifies how volume is exposed to instance
76
78
  # * 'status'<~String> - status of attached volume
77
79
  # * 'volumeId'<~String> - Id of attached volume
80
+ # * 'hibernationOptions'<~Array>
81
+ # * 'configured'<~Boolean> - whether or not the instance is enabled for hibernation
78
82
  # * 'dnsName'<~String> - public dns name, blank until instance is running
79
83
  # * 'imageId'<~String> - image id of ami used to launch instance
80
84
  # * 'instanceId'<~String> - id of the instance
@@ -111,6 +115,13 @@ module Fog
111
115
  end
112
116
  end
113
117
  end
118
+ if hibernation_options = options.delete('HibernationOptions')
119
+ hibernation_options.each_with_index do |mapping, index|
120
+ for key, value in mapping
121
+ options.merge!({ format("HibernationOptions.%d.#{key}", index) => value })
122
+ end
123
+ end
124
+ end
114
125
  if security_groups = options.delete('SecurityGroup')
115
126
  options.merge!(Fog::AWS.indexed_param('SecurityGroup', [*security_groups]))
116
127
  end
@@ -182,6 +193,14 @@ module Fog
182
193
  }
183
194
  end
184
195
 
196
+ hibernation_options = (options['HibernationOptions'] || []).reduce([]) do |mapping, device|
197
+ configure = device.fetch("Configure", true)
198
+
199
+ mapping << {
200
+ "Configure" => configure,
201
+ }
202
+ end
203
+
185
204
  if options['SubnetId']
186
205
  if options['PrivateIpAddress']
187
206
  ni_options = {'PrivateIpAddress' => options['PrivateIpAddress']}
@@ -221,6 +240,7 @@ module Fog
221
240
  'associatePublicIP' => options['associatePublicIP'] || false,
222
241
  'architecture' => 'i386',
223
242
  'blockDeviceMapping' => block_device_mapping,
243
+ 'hibernationOptions' => hibernation_options,
224
244
  'networkInterfaces' => network_interfaces,
225
245
  'clientToken' => options['clientToken'],
226
246
  'dnsName' => nil,
@@ -16,9 +16,17 @@ module Fog
16
16
  # * TODO: fill in the blanks
17
17
  #
18
18
  # {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-StopInstances.html]
19
- def stop_instances(instance_id, force = false)
19
+ def stop_instances(instance_id, options = {})
20
20
  params = Fog::AWS.indexed_param('InstanceId', instance_id)
21
- params.merge!('Force' => 'true') if force
21
+ unless options.is_a?(Hash)
22
+ Fog::Logger.warning("stop_instances with #{options.class} param is deprecated, use stop_instances('force' => boolean) instead [light_black](#{caller.first})[/]")
23
+ options = {'force' => options}
24
+ end
25
+ params.merge!('Force' => 'true') if options['force']
26
+ if options['hibernate']
27
+ params.merge!('Hibernate' => 'true')
28
+ params.merge!('Force' => 'false')
29
+ end
22
30
  request({
23
31
  'Action' => 'StopInstances',
24
32
  :idempotent => true,
@@ -28,7 +36,7 @@ module Fog
28
36
  end
29
37
 
30
38
  class Mock
31
- def stop_instances(instance_id, force = false)
39
+ def stop_instances(instance_id, options = {})
32
40
  instance_ids = Array(instance_id)
33
41
 
34
42
  instance_set = self.data[:instances].values
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AWS
3
- VERSION = "3.6.5"
3
+ VERSION = "3.6.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.5
4
+ version: 3.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Lane
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-05-22 00:00:00.000000000 Z
12
+ date: 2020-06-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler