kitchen-ec2 3.5.0 → 3.6.0

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: 4591ccc89a7ed2c996442b609b0ef4fb96fb868e5d3512e4a3d4283d0b883b07
4
- data.tar.gz: 1ba531086886fddc2f27f9e25843c94df565a5cd86f7b97562a026036709e51a
3
+ metadata.gz: ba67c03a470c6f9e73dc53b886a468a0003c24d9116cee97075ddc99da8a7529
4
+ data.tar.gz: 8c77eba9c51421b234c0f5b2a7b75295eca8b5385a13cb9ca4213d4e65d5ddb9
5
5
  SHA512:
6
- metadata.gz: 9703c6b265c6ab38ec111454b1a620cc8e395e7230316d9ee84e3b56c9a8a77aceffc2537cc1a560ea7c4be2599fa23fa0521cb6a781ac54ba7856eb8bd22bbe
7
- data.tar.gz: 5727ade2a7a41f52e530b999c27198a67631925217c303681af2cef952e0a714e933138d4d475c3c224f148c20dd0abc080a9d0d2f43c65d27c583ffc555908a
6
+ metadata.gz: fdd64c2dd9a1b9e1a0811cc7a9bb34984f5a6bf9791b06d4ee2dcf05136d491a4024fd25b2c8cc996160970a155facad432c64270e2afebee9b6e4b3539ac30b
7
+ data.tar.gz: 7597be672135a237bbfd11b5e40a0f1397d0f374253ac6eb1123834263c6d53b14509f2c7d662dae225bbd399acd494793c9d07fae225cf1480bbb986fc0b871
@@ -49,14 +49,24 @@ module Kitchen
49
49
  ::Aws.config.update(retry_limit: retry_limit) unless retry_limit.nil?
50
50
  end
51
51
 
52
+ # create a new AWS EC2 instance
53
+ # @param options [Hash] has of instance options
54
+ # @see https://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Resource.html#create_instances-instance_method
55
+ # @return [Aws::EC2::Instance]
52
56
  def create_instance(options)
53
57
  resource.create_instances(options).first
54
58
  end
55
59
 
60
+ # get an instance object given an id
61
+ # @param id [String] aws instance id
62
+ # @return [Aws::EC2::Instance]
56
63
  def get_instance(id)
57
64
  resource.instance(id)
58
65
  end
59
66
 
67
+ # get an instance object given a spot request ID
68
+ # @param request_id [String] aws spot instance id
69
+ # @return [Aws::EC2::Instance]
60
70
  def get_instance_from_spot_request(request_id)
61
71
  resource.instances(
62
72
  filters: [{
@@ -39,8 +39,10 @@ module Kitchen
39
39
  @logger = logger
40
40
  end
41
41
 
42
- # Transform the provided config into the hash to send to AWS. Some fields
42
+ # Transform the provided kitchen config into the hash we'll use to create the aws instance
43
43
  # can be passed in null, others need to be ommitted if they are null
44
+ # Some fields can be passed in null, others need to be ommitted if they are null
45
+ # @return [Hash]
44
46
  def ec2_instance_data # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
45
47
  # Support for looking up security group id and subnet id using tags.
46
48
  vpc_id = nil
@@ -23,6 +23,8 @@ module Kitchen
23
23
  class Amazon < StandardPlatform
24
24
  StandardPlatform.platforms["amazon"] = self
25
25
 
26
+ # default username for this platform's ami
27
+ # @return [String]
26
28
  def username
27
29
  "ec2-user"
28
30
  end
@@ -23,6 +23,8 @@ module Kitchen
23
23
  class Amazon2 < StandardPlatform
24
24
  StandardPlatform.platforms["amazon2"] = self
25
25
 
26
+ # default username for this platform's ami
27
+ # @return [String]
26
28
  def username
27
29
  "ec2-user"
28
30
  end
@@ -23,6 +23,8 @@ module Kitchen
23
23
  class Centos < StandardPlatform
24
24
  StandardPlatform.platforms["centos"] = self
25
25
 
26
+ # default username for this platform's ami
27
+ # @return [String]
26
28
  def username
27
29
  # Centos 6.x images use root as the username (but the "centos 6"
28
30
  # updateable image uses "centos")
@@ -26,14 +26,17 @@ module Kitchen
26
26
  # 10/11 are listed last since we default to the first item in the hash
27
27
  # and 10/11 are not released yet. When they're released move them up
28
28
  DEBIAN_CODENAMES = {
29
+ 10 => "buster",
29
30
  9 => "stretch",
30
31
  8 => "jessie",
31
32
  7 => "wheezy",
32
33
  6 => "squeeze",
33
34
  11 => "bullseye",
34
- 10 => "buster",
35
+ 12 => "bookworm",
35
36
  }.freeze
36
37
 
38
+ # default username for this platform's ami
39
+ # @return [String]
37
40
  def username
38
41
  "admin"
39
42
  end
@@ -23,6 +23,8 @@ module Kitchen
23
23
  class Fedora < StandardPlatform
24
24
  StandardPlatform.platforms["fedora"] = self
25
25
 
26
+ # default username for this platform's ami
27
+ # @return [String]
26
28
  def username
27
29
  "fedora"
28
30
  end
@@ -23,6 +23,8 @@ module Kitchen
23
23
  class Freebsd < StandardPlatform
24
24
  StandardPlatform.platforms["freebsd"] = self
25
25
 
26
+ # default username for this platform's ami
27
+ # @return [String]
26
28
  def username
27
29
  "ec2-user"
28
30
  end
@@ -29,6 +29,8 @@ module Kitchen
29
29
  super(driver, "rhel", version, architecture)
30
30
  end
31
31
 
32
+ # default username for this platform's ami
33
+ # @return [String]
32
34
  def username
33
35
  (version && version.to_f < 6.4) ? "root" : "ec2-user"
34
36
  end
@@ -23,6 +23,8 @@ module Kitchen
23
23
  class Ubuntu < StandardPlatform
24
24
  StandardPlatform.platforms["ubuntu"] = self
25
25
 
26
+ # default username for this platform's ami
27
+ # @return [String]
26
28
  def username
27
29
  "ubuntu"
28
30
  end
@@ -23,6 +23,8 @@ module Kitchen
23
23
  class Windows < StandardPlatform
24
24
  StandardPlatform.platforms["windows"] = self
25
25
 
26
+ # default username for this platform's ami
27
+ # @return [String]
26
28
  def username
27
29
  "administrator"
28
30
  end
@@ -22,6 +22,6 @@ module Kitchen
22
22
  module Driver
23
23
 
24
24
  # Version string for EC2 Test Kitchen driver
25
- EC2_VERSION = "3.5.0".freeze
25
+ EC2_VERSION = "3.6.0".freeze
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fletcher Nichol
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-06 00:00:00.000000000 Z
11
+ date: 2020-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -168,14 +168,14 @@ dependencies:
168
168
  requirements:
169
169
  - - '='
170
170
  - !ruby/object:Gem::Version
171
- version: 0.15.1
171
+ version: 1.0.5
172
172
  type: :development
173
173
  prerelease: false
174
174
  version_requirements: !ruby/object:Gem::Requirement
175
175
  requirements:
176
176
  - - '='
177
177
  - !ruby/object:Gem::Version
178
- version: 0.15.1
178
+ version: 1.0.5
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: climate_control
181
181
  requirement: !ruby/object:Gem::Requirement
@@ -224,7 +224,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
224
224
  requirements:
225
225
  - - ">="
226
226
  - !ruby/object:Gem::Version
227
- version: '2.3'
227
+ version: '2.4'
228
228
  required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  requirements:
230
230
  - - ">="