awspec 0.80.1 → 0.81.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79351e0f4e5a1c92f7a8eff5f257148330acbbd6
4
- data.tar.gz: 12789b620b3b6b9c90ffbcefa324fef5e8271883
3
+ metadata.gz: 5625d806b4bd3a01b32955ad8b99b0cb4635b837
4
+ data.tar.gz: 60d454a8d4308daadf5e6cc8537ffc7d9a472672
5
5
  SHA512:
6
- metadata.gz: 95d4a780f9ac2c05a0edb44a13e1e6de4d5cb7e308d56cdfbba50b11d4610709e48330450b30f9b9e60e60b1c6d260249e97b8410b64c48e4184ab540b192b67
7
- data.tar.gz: 2191c44374acb5cd7a48d660f5c200402653e77cf38f89fd348fea60376ab8f6ede60e9e6f15846bd5a97d03058ce25e13e4a8d60422afb934c00afd37992785
6
+ metadata.gz: 18a8f0a1717b80acd561d5873820d0a11900ea935bd5d9f28e31e4f0c919d8df7f8d505f58fc14262fc937194fd4a73ffb7b549c73d7e8e3d21075000d2550ce
7
+ data.tar.gz: af9ad1646190d10353c083ae3df1651d751cd875611dd631eb3b7193b8eff70763703173dc282378489d392de4cd1fd1157b4ed24b0b3592cd72c2677fdac7dc
@@ -159,6 +159,8 @@ end
159
159
  ```
160
160
 
161
161
 
162
+ ### have_suspended_process
163
+
162
164
  ### have_tag
163
165
 
164
166
  ```ruby
@@ -167,7 +169,7 @@ describe autoscaling_group('my-auto-scaling-group') do
167
169
  end
168
170
  ```
169
171
 
170
- ### its(:auto_scaling_group_name), its(:auto_scaling_group_arn), its(:launch_configuration_name), its(:min_size), its(:max_size), its(:desired_capacity), its(:default_cooldown), its(:availability_zones), its(:load_balancer_names), its(:target_group_arns), its(:health_check_type), its(:health_check_grace_period), its(:created_time), its(:suspended_processes), its(:placement_group), its(:vpc_zone_identifier), its(:enabled_metrics), its(:status), its(:termination_policies), its(:new_instances_protected_from_scale_in)
172
+ ### its(:auto_scaling_group_name), its(:auto_scaling_group_arn), its(:launch_configuration_name), its(:min_size), its(:max_size), its(:desired_capacity), its(:default_cooldown), its(:availability_zones), its(:load_balancer_names), its(:target_group_arns), its(:health_check_type), its(:health_check_grace_period), its(:created_time), its(:placement_group), its(:vpc_zone_identifier), its(:enabled_metrics), its(:status), its(:termination_policies), its(:new_instances_protected_from_scale_in)
171
173
  ## <a name="cloudfront_distribution">cloudfront_distribution</a>
172
174
 
173
175
  CloudfrontDistribution resource type.
@@ -1548,6 +1550,8 @@ end
1548
1550
  ```
1549
1551
 
1550
1552
 
1553
+ ### have_block_device_mapping
1554
+
1551
1555
  ### have_security_group
1552
1556
 
1553
1557
  ```ruby
@@ -1556,7 +1560,7 @@ describe launch_configuration('my-lc') do
1556
1560
  end
1557
1561
  ```
1558
1562
 
1559
- ### its(:launch_configuration_name), its(:launch_configuration_arn), its(:image_id), its(:key_name), its(:security_groups), its(:classic_link_vpc_id), its(:classic_link_vpc_security_groups), its(:user_data), its(:instance_type), its(:kernel_id), its(:ramdisk_id), its(:block_device_mappings), its(:spot_price), its(:iam_instance_profile), its(:created_time), its(:ebs_optimized), its(:associate_public_ip_address), its(:placement_tenancy)
1563
+ ### its(:launch_configuration_name), its(:launch_configuration_arn), its(:image_id), its(:key_name), its(:security_groups), its(:classic_link_vpc_id), its(:classic_link_vpc_security_groups), its(:user_data), its(:instance_type), its(:kernel_id), its(:ramdisk_id), its(:spot_price), its(:iam_instance_profile), its(:created_time), its(:ebs_optimized), its(:associate_public_ip_address), its(:placement_tenancy)
1560
1564
  ## <a name="nat_gateway">nat_gateway</a>
1561
1565
 
1562
1566
  NatGateway resource type.
@@ -14,6 +14,14 @@ module Awspec::Helper
14
14
  })
15
15
  res.launch_configurations.single_resource(id)
16
16
  end
17
+
18
+ def find_block_device_mapping(id, device_id)
19
+ ret = find_launch_configuration(id).block_device_mappings.select do |device|
20
+ next true if device.device_name == device_id
21
+ next true if device.virtual_name == device_id
22
+ end
23
+ ret.single_resource(device_id)
24
+ end
17
25
  end
18
26
  end
19
27
  end
@@ -35,6 +35,11 @@ Aws.config[:autoscaling] = {
35
35
  key: 'name',
36
36
  value: 'my-autoscaling-group'
37
37
  }
38
+ ],
39
+ suspended_processes: [
40
+ {
41
+ process_name: 'HealthCheck'
42
+ }
38
43
  ]
39
44
  }
40
45
  ]
@@ -15,7 +15,12 @@ Aws.config[:autoscaling] = {
15
15
  instance_type: 'c3.large',
16
16
  kernel_id: '',
17
17
  ramdisk_id: '',
18
- block_device_mappings: [],
18
+ block_device_mappings: [
19
+ {
20
+ virtual_name: 'ephemeral0',
21
+ device_name: '/dev/sdf'
22
+ }
23
+ ],
19
24
  instance_monitoring: {
20
25
  enabled: true
21
26
  },
@@ -24,5 +24,11 @@ module Awspec::Type
24
24
  instance.instance_id = ec2.instance_id
25
25
  end
26
26
  end
27
+
28
+ def has_suspended_process?(id)
29
+ resource_via_client.suspended_processes.find do |process|
30
+ process.process_name == id
31
+ end
32
+ end
27
33
  end
28
34
  end
@@ -19,5 +19,10 @@ module Awspec::Type
19
19
  sg == sg2.group_id
20
20
  end
21
21
  end
22
+
23
+ def has_block_device_mapping?(device_id)
24
+ ret = find_block_device_mapping(@display_name, device_id)
25
+ return true if ret
26
+ end
22
27
  end
23
28
  end
@@ -1,3 +1,3 @@
1
1
  module Awspec
2
- VERSION = '0.80.1'
2
+ VERSION = '0.81.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.80.1
4
+ version: 0.81.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - k1LoW
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-18 00:00:00.000000000 Z
11
+ date: 2017-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec