File tree Expand file tree Collapse file tree 17 files changed +63
-88
lines changed
puppet_x/puppetlabs/property Expand file tree Collapse file tree 17 files changed +63
-88
lines changed Original file line number Diff line number Diff line change
1
+ require_relative '../../puppet_x/puppetlabs/property/region'
2
+
1
3
Puppet ::Type . newtype ( :cloudwatch_alarm ) do
2
4
@doc = 'Type representing an AWS CloudWatch Alarm.'
3
5
73
75
end
74
76
end
75
77
76
- newproperty ( :region ) do
78
+ newproperty ( :region , :parent => PuppetX :: Property :: AwsRegion ) do
77
79
desc 'The region in which to launch the instances.'
78
- validate do |value |
79
- fail 'region should not contain spaces' if value =~ /\s /
80
- fail 'region should not be blank' if value == ''
81
- fail 'region should be a String' unless value . is_a? ( String )
82
- end
83
80
end
84
81
85
82
newproperty ( :dimensions , :array_matching => :all ) do
Original file line number Diff line number Diff line change
1
+ require_relative '../../puppet_x/puppetlabs/property/region'
2
+
1
3
Puppet ::Type . newtype ( :ec2_autoscalinggroup ) do
2
4
@doc = 'Type representing an EC2 auto scaling group.'
3
5
31
33
end
32
34
end
33
35
34
- newproperty ( :region ) do
36
+ newproperty ( :region , :parent => PuppetX :: Property :: AwsRegion ) do
35
37
desc 'The region in which to launch the instances.'
36
- validate do |value |
37
- fail 'region should not contain spaces' if value =~ /\s /
38
- fail 'region should not be blank' if value == ''
39
- fail 'region should be a String' unless value . is_a? ( String )
40
- end
41
38
end
42
39
43
40
newproperty ( :launch_configuration ) do
Original file line number Diff line number Diff line change
1
+ require_relative '../../puppet_x/puppetlabs/property/region'
2
+
1
3
Puppet ::Type . newtype ( :ec2_elastic_ip ) do
2
4
@doc = "Type representing an Elastic IP and it's association."
3
5
19
21
end
20
22
end
21
23
22
- newproperty ( :region ) do
24
+ newproperty ( :region , :parent => PuppetX :: Property :: AwsRegion ) do
23
25
desc 'The name of the region in which the Elastic IP is found.'
24
- validate do |value |
25
- fail 'region should be a String' unless value . is_a? ( String )
26
- fail 'You must provide a region for Elastic IPs.' if value . nil? || value . empty?
27
- end
28
26
end
29
27
30
28
newproperty ( :instance ) do
Original file line number Diff line number Diff line change
1
+ require_relative '../../puppet_x/puppetlabs/property/region'
2
+
1
3
Puppet ::Type . newtype ( :ec2_launchconfiguration ) do
2
4
@doc = 'Type representing an EC2 launch configuration.'
3
5
@@ -33,13 +35,8 @@ def insync?(is)
33
35
end
34
36
end
35
37
36
- newproperty ( :region ) do
38
+ newproperty ( :region , :parent => PuppetX :: Property :: AwsRegion ) do
37
39
desc 'The region in which to launch the instances.'
38
- validate do |value |
39
- fail 'region should not contain spaces' if value =~ /\s /
40
- fail 'region should not be blank' if value == ''
41
- fail 'region should be a String' unless value . is_a? ( String )
42
- end
43
40
end
44
41
45
42
newproperty ( :instance_type ) do
Original file line number Diff line number Diff line change
1
+ require_relative '../../puppet_x/puppetlabs/property/region'
2
+
1
3
Puppet ::Type . newtype ( :ec2_scalingpolicy ) do
2
4
@doc = 'Type representing an EC2 scaling policy.'
3
5
21
23
end
22
24
end
23
25
24
- newproperty ( :region ) do
26
+ newproperty ( :region , :parent => PuppetX :: Property :: AwsRegion ) do
25
27
desc 'The region in which to launch the policy.'
26
- validate do |value |
27
- fail 'region should not contain spaces' if value =~ /\s /
28
- fail 'region should not be blank' if value == ''
29
- fail 'region should be a String' unless value . is_a? ( String )
30
- end
31
28
end
32
29
33
30
newproperty ( :adjustment_type ) do
Original file line number Diff line number Diff line change 1
- require_relative '../../puppet_x/puppetlabs/property/tag.rb'
1
+ require_relative '../../puppet_x/puppetlabs/property/tag'
2
+ require_relative '../../puppet_x/puppetlabs/property/region'
2
3
require_relative '../../puppet_x/puppetlabs/aws_ingress_rules_parser'
3
4
4
5
Puppet ::Type . newtype ( :ec2_securitygroup ) do
14
15
end
15
16
end
16
17
17
- newproperty ( :region ) do
18
+ newproperty ( :region , :parent => PuppetX :: Property :: AwsRegion ) do
18
19
desc 'the region in which to launch the security group'
19
- validate do |value |
20
- fail 'region should not contain spaces' if value =~ /\s /
21
- fail 'region should be a String' unless value . is_a? ( String )
22
- end
23
20
end
24
21
25
22
newproperty ( :ingress , :array_matching => :all ) do
Original file line number Diff line number Diff line change 1
- require_relative '../../puppet_x/puppetlabs/property/tag.rb'
1
+ require_relative '../../puppet_x/puppetlabs/property/tag'
2
+ require_relative '../../puppet_x/puppetlabs/property/region'
2
3
3
4
Puppet ::Type . newtype ( :ec2_vpc ) do
4
5
@doc = 'A type representing an AWS VPC.'
13
14
end
14
15
end
15
16
16
- newproperty ( :region ) do
17
+ newproperty ( :region , :parent => PuppetX :: Property :: AwsRegion ) do
17
18
desc 'The region in which to launch the VPC.'
18
- validate do |value |
19
- fail 'region should not contain spaces' if value =~ /\s /
20
- fail 'region should be a String' unless value . is_a? ( String )
21
- end
22
19
end
23
20
24
21
newproperty ( :cidr_block ) do
Original file line number Diff line number Diff line change 1
- require_relative '../../puppet_x/puppetlabs/property/tag.rb'
1
+ require_relative '../../puppet_x/puppetlabs/property/tag'
2
+ require_relative '../../puppet_x/puppetlabs/property/region'
2
3
3
4
Puppet ::Type . newtype ( :ec2_vpc_customer_gateway ) do
4
5
@doc = 'Type representing an AWS VPC customer gateways.'
31
32
desc 'The tags for the customer gateway.'
32
33
end
33
34
34
- newproperty ( :region ) do
35
+ newproperty ( :region , :parent => PuppetX :: Property :: AwsRegion ) do
35
36
desc 'The region in which to launch the customer gateway.'
36
- validate do |value |
37
- fail 'region should not contain spaces' if value =~ /\s /
38
- fail 'region should be a String' unless value . is_a? ( String )
39
- end
40
37
end
41
38
42
39
newproperty ( :type ) do
Original file line number Diff line number Diff line change 1
- require_relative '../../puppet_x/puppetlabs/property/tag.rb'
1
+ require_relative '../../puppet_x/puppetlabs/property/tag'
2
+ require_relative '../../puppet_x/puppetlabs/property/region'
2
3
3
4
Puppet ::Type . newtype ( :ec2_vpc_dhcp_options ) do
4
5
@doc = 'Type representing a DHCP option set for AWS VPC.'
17
18
desc 'Tags for the DHCP option set.'
18
19
end
19
20
20
- newproperty ( :region ) do
21
+ newproperty ( :region , :parent => PuppetX :: Property :: AwsRegion ) do
21
22
desc 'The region in which to assign the DHCP option set.'
22
23
validate do |value |
23
24
fail 'region should not contain spaces' if value =~ /\s /
Original file line number Diff line number Diff line change 1
- require_relative '../../puppet_x/puppetlabs/property/tag.rb'
1
+ require_relative '../../puppet_x/puppetlabs/property/tag'
2
+ require_relative '../../puppet_x/puppetlabs/property/region'
2
3
3
4
Puppet ::Type . newtype ( :ec2_vpc_internet_gateway ) do
4
5
@doc = 'Type representing an EC2 VPC Internet Gateway.'
17
18
desc 'Tags to assign to the internet gateway.'
18
19
end
19
20
20
- newproperty ( :region ) do
21
+ newproperty ( :region , :parent => PuppetX :: Property :: AwsRegion ) do
21
22
desc 'The region in which to launch the internet gateway.'
22
- validate do |value |
23
- fail 'region should not contain spaces' if value =~ /\s /
24
- fail 'region should be a String' unless value . is_a? ( String )
25
- end
26
23
end
27
24
28
25
newproperty ( :vpc ) do
You can’t perform that action at this time.
0 commit comments