awspec 0.13.0 → 0.14.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 +4 -4
- data/README.md +1 -1
- data/doc/_resource_types/elasticache_cache_parameter_group.md +9 -0
- data/doc/resource_types.md +14 -0
- data/lib/awspec/generator/doc/type.rb +1 -1
- data/lib/awspec/generator/doc/type/elasticache_cache_parameter_group.rb +17 -0
- data/lib/awspec/helper/type.rb +1 -1
- data/lib/awspec/stub/elasticache_cache_parameter_group.rb +16 -0
- data/lib/awspec/type/elasticache_cache_parameter_group.rb +33 -0
- data/lib/awspec/type/rds_db_parameter_group.rb +1 -1
- data/lib/awspec/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23e96e5862271d44c36cb98530c4f99591982f90
|
4
|
+
data.tar.gz: bb036e653751744cf37a696b3ba519e3b79de10b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3b5053b86fd96b6b7410f0b98f3ff1eda38bc7d6c74688f85acde2c2eec14d80965bfe983b25d51019536040ee826109bfe26412ba67a32555658f57ee110f3
|
7
|
+
data.tar.gz: a93d1bbf3d2a491a879e3a03b8b539cb2757fbf7c72695ccae7b7997f169122f70c6a875e78c88bd7977b844fd69495876fd729a741eee80f537c51051a99c91
|
data/README.md
CHANGED
@@ -99,7 +99,7 @@ $ awspec generate ec2 vpc-ab123cde >> spec/ec2_spec.rb
|
|
99
99
|
- [x] IAM Role (`iam_role`)
|
100
100
|
- [x] IAM Policy (`iam_policy`)
|
101
101
|
- [x] ElastiCache (`elasticache`)
|
102
|
-
- [
|
102
|
+
- [x] ElastiCache Cache Parameter Group
|
103
103
|
|
104
104
|
[Resource Types more infomation here](doc/resource_types.md)
|
105
105
|
|
data/doc/resource_types.md
CHANGED
@@ -18,6 +18,7 @@
|
|
18
18
|
| [iam_role](#iam_role)
|
19
19
|
| [iam_policy](#iam_policy)
|
20
20
|
| [elasticache](#elasticache)
|
21
|
+
| [elasticache_cache_parameter_group](#elasticache_cache_parameter_group)
|
21
22
|
|
22
23
|
## <a name="ec2">ec2</a>
|
23
24
|
|
@@ -381,3 +382,16 @@ Elasticache resource type.
|
|
381
382
|
### belong_to_vpc
|
382
383
|
|
383
384
|
#### its(:cache_cluster_id), its(:configuration_endpoint), its(:client_download_landing_page), its(:cache_node_type), its(:engine), its(:engine_version), its(:cache_cluster_status), its(:num_cache_nodes), its(:preferred_availability_zone), its(:cache_cluster_create_time), its(:preferred_maintenance_window), its(:notification_configuration), its(:cache_subnet_group_name), its(:auto_minor_version_upgrade), its(:replication_group_id), its(:snapshot_retention_limit), its(:snapshot_window)
|
385
|
+
## <a name="elasticache_cache_parameter_group">elasticache_cache_parameter_group</a>
|
386
|
+
|
387
|
+
ElasticacheCacheParameterGroup resource type.
|
388
|
+
|
389
|
+
```ruby
|
390
|
+
describe elasticache_cache_parameter_group('my-cache-parameter-group') do
|
391
|
+
it { should exist }
|
392
|
+
its(:activerehashing) { should eq 'yes' }
|
393
|
+
its(:client_output_buffer_limit_pubsub_hard_limit) { should eq '33554432' }
|
394
|
+
end
|
395
|
+
```
|
396
|
+
|
397
|
+
### exist
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Awspec::Generator
|
2
|
+
module Doc
|
3
|
+
module Type
|
4
|
+
class ElasticacheCacheParameterGroup < Base
|
5
|
+
def initialize
|
6
|
+
super
|
7
|
+
@type_name = 'ElasticacheCacheParameterGroup'
|
8
|
+
@type = Awspec::Type::ElasticacheCacheParameterGroup.new('my-cache-parameter-group')
|
9
|
+
@ret = @type.resource
|
10
|
+
@matchers = []
|
11
|
+
@ignore_matchers = []
|
12
|
+
@describes = []
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/awspec/helper/type.rb
CHANGED
@@ -5,7 +5,7 @@ module Awspec
|
|
5
5
|
base ec2 rds rds_db_parameter_group security_group
|
6
6
|
vpc s3 route53_hosted_zone auto_scaling_group subnet
|
7
7
|
route_table ebs elb lambda iam_user iam_group iam_role
|
8
|
-
iam_policy elasticache
|
8
|
+
iam_policy elasticache elasticache_cache_parameter_group
|
9
9
|
)
|
10
10
|
|
11
11
|
TYPES.each do |type|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Aws.config[:elasticache] = {
|
2
|
+
stub_responses: {
|
3
|
+
describe_cache_parameters: {
|
4
|
+
parameters: [
|
5
|
+
{
|
6
|
+
parameter_name: 'activerehashing',
|
7
|
+
parameter_value: 'yes'
|
8
|
+
},
|
9
|
+
{
|
10
|
+
parameter_name: 'client-output-buffer-limit-pubsub-hard-limit',
|
11
|
+
parameter_value: '33554432'
|
12
|
+
}
|
13
|
+
]
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Awspec::Type
|
2
|
+
class ElasticacheCacheParameterGroup < Base
|
3
|
+
attr_reader :parameters
|
4
|
+
|
5
|
+
def initialize(name)
|
6
|
+
super
|
7
|
+
@parameters = {}
|
8
|
+
res = @elasticache_client.describe_cache_parameters({
|
9
|
+
cache_parameter_group_name: name
|
10
|
+
})
|
11
|
+
|
12
|
+
loop do
|
13
|
+
res.parameters.each do |param|
|
14
|
+
@parameters[param.parameter_name] = param.parameter_value
|
15
|
+
end
|
16
|
+
(res.next_page? && res = res.next_page) || break
|
17
|
+
end
|
18
|
+
|
19
|
+
@id = name unless @parameters.empty?
|
20
|
+
@resource = @parameters
|
21
|
+
@id
|
22
|
+
end
|
23
|
+
|
24
|
+
def method_missing(name)
|
25
|
+
param_name = name.to_s.tr('_', '-')
|
26
|
+
if @parameters.include?(param_name)
|
27
|
+
@parameters[param_name].to_s
|
28
|
+
else
|
29
|
+
super
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/awspec/version.rb
CHANGED
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.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -156,6 +156,7 @@ files:
|
|
156
156
|
- awspec.gemspec
|
157
157
|
- bin/awspec
|
158
158
|
- doc/_resource_types/ec2.md
|
159
|
+
- doc/_resource_types/elasticache_cache_parameter_group.md
|
159
160
|
- doc/_resource_types/elb.md
|
160
161
|
- doc/_resource_types/iam_group.md
|
161
162
|
- doc/_resource_types/iam_role.md
|
@@ -178,6 +179,7 @@ files:
|
|
178
179
|
- lib/awspec/generator/doc/type/ebs.rb
|
179
180
|
- lib/awspec/generator/doc/type/ec2.rb
|
180
181
|
- lib/awspec/generator/doc/type/elasticache.rb
|
182
|
+
- lib/awspec/generator/doc/type/elasticache_cache_parameter_group.rb
|
181
183
|
- lib/awspec/generator/doc/type/elb.rb
|
182
184
|
- lib/awspec/generator/doc/type/iam_group.rb
|
183
185
|
- lib/awspec/generator/doc/type/iam_policy.rb
|
@@ -232,6 +234,7 @@ files:
|
|
232
234
|
- lib/awspec/stub/ebs.rb
|
233
235
|
- lib/awspec/stub/ec2.rb
|
234
236
|
- lib/awspec/stub/elasticache.rb
|
237
|
+
- lib/awspec/stub/elasticache_cache_parameter_group.rb
|
235
238
|
- lib/awspec/stub/elb.rb
|
236
239
|
- lib/awspec/stub/iam_group.rb
|
237
240
|
- lib/awspec/stub/iam_policy.rb
|
@@ -252,6 +255,7 @@ files:
|
|
252
255
|
- lib/awspec/type/ebs.rb
|
253
256
|
- lib/awspec/type/ec2.rb
|
254
257
|
- lib/awspec/type/elasticache.rb
|
258
|
+
- lib/awspec/type/elasticache_cache_parameter_group.rb
|
255
259
|
- lib/awspec/type/elb.rb
|
256
260
|
- lib/awspec/type/iam_group.rb
|
257
261
|
- lib/awspec/type/iam_policy.rb
|