convection 2.0.0 → 2.1.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/lib/convection/model/event.rb +2 -1
- data/lib/convection/model/template/resource/aws_efs_file_system.rb +25 -0
- data/lib/convection/model/template/resource/aws_efs_mount_target.rb +19 -0
- data/spec/convection/model/template/resource/aws_efs_file_system_spec.rb +29 -0
- data/spec/convection/model/template/resource/aws_efs_mount_target_spec.rb +36 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb2010f68c26e062f363f9f6cd23d81116289bcc
|
4
|
+
data.tar.gz: fa8a0b5abd46850ea5039a2a66455bc3a737dc88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47c4470be626ca85d8f01fc36bd37cdfecfb7d61ac06f75ef84e28d85ca134338822078ac5db164951ea3a023cdcabe8dcff9c2a4524894b517055f1e157187b
|
7
|
+
data.tar.gz: bcc187ba6881d9037a1f56f5afebfbbc982a2573a14f7142a4170ac689048870def3d8ccd7aee6e1ed09bd80344580c94dbbc46cc94bde1ea671562baa5eef0c
|
@@ -14,7 +14,8 @@ module Convection
|
|
14
14
|
attr_accessor :level
|
15
15
|
attr_accessor :timestamp
|
16
16
|
colorize :level,
|
17
|
-
:
|
17
|
+
:cyan => [:info],
|
18
|
+
:green => [:success, Control::Stack::CREATE_COMPLETE, Control::Stack::UPDATE_COMPLETE, Control::Stack::UPDATE_ROLLBACK_COMPLETE,
|
18
19
|
Control::Stack::TASK_COMPLETE],
|
19
20
|
:red => [:error, :fail, Control::Stack::CREATE_FAILED, Control::Stack::ROLLBACK_FAILED,
|
20
21
|
Control::Stack::DELETE_FAILED, Control::Stack::UPDATE_FAILED,
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative '../resource'
|
2
|
+
|
3
|
+
module Convection
|
4
|
+
module Model
|
5
|
+
class Template
|
6
|
+
class Resource
|
7
|
+
# Represents an {https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-filesystem.html
|
8
|
+
# Amazon EFS File System}
|
9
|
+
class EFSFileSystem < Resource
|
10
|
+
include Model::Mixin::Taggable
|
11
|
+
alias file_system_tag tag
|
12
|
+
|
13
|
+
type 'AWS::EFS::FileSystem'
|
14
|
+
property :performance_mode, 'PerformanceMode'
|
15
|
+
|
16
|
+
def render(*args)
|
17
|
+
super.tap do |resource|
|
18
|
+
resource['Properties']['FileSystemTags'] = tags.render unless tags.empty?
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require_relative '../resource'
|
2
|
+
|
3
|
+
module Convection
|
4
|
+
module Model
|
5
|
+
class Template
|
6
|
+
class Resource
|
7
|
+
# Represents an {https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html
|
8
|
+
# Amazon EFS Mount Target}
|
9
|
+
class EFSMountTarget < Resource
|
10
|
+
type 'AWS::EFS::MountTarget'
|
11
|
+
property :file_system_id, 'FileSystemId'
|
12
|
+
property :ip_address, 'IpAddress'
|
13
|
+
property :security_groups, 'SecurityGroups', :type => :list
|
14
|
+
property :subnet_id, 'SubnetId'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
class Convection::Model::Template::Resource
|
4
|
+
describe EFSFileSystem do
|
5
|
+
subject do
|
6
|
+
parent = double(:template)
|
7
|
+
allow(parent).to receive(:template).and_return(parent)
|
8
|
+
|
9
|
+
described_class.new('MyEFSFileSystem', parent)
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'allows FileSystemTags to be set' do
|
13
|
+
expected_tags = []
|
14
|
+
expected_tags << { 'Key' => 'key-1', 'Value' => 'value-1' }
|
15
|
+
expected_tags << { 'Key' => 'key-2', 'Value' => 'value-2' }
|
16
|
+
|
17
|
+
expect(subject.render['Properties']['FileSystemTags']).to be_nil
|
18
|
+
subject.tag 'key-1', 'value-1'
|
19
|
+
subject.file_system_tag 'key-2', 'value-2'
|
20
|
+
expect(subject.render['Properties']['FileSystemTags']).to eq(expected_tags)
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'allows PerformanceMode to be set' do
|
24
|
+
expect(subject.render['Properties']['PerformanceMode']).to be_nil
|
25
|
+
subject.performance_mode 'maxIO'
|
26
|
+
expect(subject.render['Properties']['PerformanceMode']).to eq('maxIO')
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
class Convection::Model::Template::Resource
|
4
|
+
describe EFSMountTarget do
|
5
|
+
subject do
|
6
|
+
parent = double(:template)
|
7
|
+
allow(parent).to receive(:template).and_return(parent)
|
8
|
+
|
9
|
+
described_class.new('MyEFSMountTarget', parent)
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'allows FileSystemId to be set' do
|
13
|
+
expect(subject.render['Properties']['FileSystemId']).to be_nil
|
14
|
+
subject.file_system_id 'fs-1'
|
15
|
+
expect(subject.render['Properties']['FileSystemId']).to eq('fs-1')
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'allows IpAddress to be set' do
|
19
|
+
expect(subject.render['Properties']['IpAddress']).to be_nil
|
20
|
+
subject.ip_address '127.0.0.1'
|
21
|
+
expect(subject.render['Properties']['IpAddress']).to eq('127.0.0.1')
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'allows SecurityGroups to be set' do
|
25
|
+
expect(subject.render['Properties']['SecurityGroups']).to be_nil
|
26
|
+
subject.security_groups ['sg-1', 'sg-2']
|
27
|
+
expect(subject.render['Properties']['SecurityGroups']).to eq(['sg-1', 'sg-2'])
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'allows SubnetId to be set' do
|
31
|
+
expect(subject.render['Properties']['SubnetId']).to be_nil
|
32
|
+
subject.subnet_id 's-1'
|
33
|
+
expect(subject.render['Properties']['SubnetId']).to eq('s-1')
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: convection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Manero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -185,6 +185,8 @@ files:
|
|
185
185
|
- lib/convection/model/template/resource/aws_ec2_vpn_gateway.rb
|
186
186
|
- lib/convection/model/template/resource/aws_ec2_vpn_gateway_route_propagation.rb
|
187
187
|
- lib/convection/model/template/resource/aws_ecr_repository.rb
|
188
|
+
- lib/convection/model/template/resource/aws_efs_file_system.rb
|
189
|
+
- lib/convection/model/template/resource/aws_efs_mount_target.rb
|
188
190
|
- lib/convection/model/template/resource/aws_elasticache_cluster.rb
|
189
191
|
- lib/convection/model/template/resource/aws_elasticache_parameter_group.rb
|
190
192
|
- lib/convection/model/template/resource/aws_elasticache_replication_group.rb
|
@@ -308,6 +310,8 @@ files:
|
|
308
310
|
- spec/convection/model/cloudfile_spec.rb
|
309
311
|
- spec/convection/model/template/condition_spec.rb
|
310
312
|
- spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
|
313
|
+
- spec/convection/model/template/resource/aws_efs_file_system_spec.rb
|
314
|
+
- spec/convection/model/template/resource/aws_efs_mount_target_spec.rb
|
311
315
|
- spec/convection/model/template/resource/directoryservice_simple_ad_spec.rb
|
312
316
|
- spec/convection/model/template/resource/ec2_dhcp_options_spec.rb
|
313
317
|
- spec/convection/model/template/resource/ec2_security_group_spec.rb
|
@@ -378,6 +382,8 @@ test_files:
|
|
378
382
|
- spec/convection/model/cloudfile_spec.rb
|
379
383
|
- spec/convection/model/template/condition_spec.rb
|
380
384
|
- spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
|
385
|
+
- spec/convection/model/template/resource/aws_efs_file_system_spec.rb
|
386
|
+
- spec/convection/model/template/resource/aws_efs_mount_target_spec.rb
|
381
387
|
- spec/convection/model/template/resource/directoryservice_simple_ad_spec.rb
|
382
388
|
- spec/convection/model/template/resource/ec2_dhcp_options_spec.rb
|
383
389
|
- spec/convection/model/template/resource/ec2_security_group_spec.rb
|