fog-aws 3.8.0 → 3.12.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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +239 -22
  3. data/README.md +1 -1
  4. data/fog-aws.gemspec +5 -4
  5. data/lib/fog/aws/compute.rb +6 -3
  6. data/lib/fog/aws/credential_fetcher.rb +17 -8
  7. data/lib/fog/aws/models/compute/security_group.rb +13 -5
  8. data/lib/fog/aws/models/compute/server.rb +2 -0
  9. data/lib/fog/aws/models/storage/file.rb +13 -10
  10. data/lib/fog/aws/models/storage/files.rb +32 -2
  11. data/lib/fog/aws/parsers/compute/describe_security_groups.rb +18 -4
  12. data/lib/fog/aws/requests/compute/authorize_security_group_ingress.rb +15 -0
  13. data/lib/fog/aws/requests/compute/describe_security_groups.rb +2 -0
  14. data/lib/fog/aws/requests/compute/run_instances.rb +44 -0
  15. data/lib/fog/aws/requests/storage/delete_multiple_objects.rb +18 -8
  16. data/lib/fog/aws/requests/storage/get_object.rb +1 -1
  17. data/lib/fog/aws/storage.rb +42 -3
  18. data/lib/fog/aws/version.rb +1 -1
  19. data/tests/credentials_tests.rb +53 -0
  20. data/tests/helpers/succeeds_helper.rb +2 -2
  21. data/tests/models/storage/directory_tests.rb +113 -2
  22. data/tests/models/storage/files_tests.rb +32 -0
  23. data/tests/requests/compute/security_group_tests.rb +12 -1
  24. data/tests/requests/storage/bucket_tests.rb +1 -1
  25. data/tests/requests/storage/versioning_tests.rb +38 -0
  26. metadata +11 -22
  27. data/.gitignore +0 -17
  28. data/.travis.yml +0 -122
  29. data/Gemfile +0 -14
  30. data/Rakefile +0 -14
  31. data/bin/console +0 -14
  32. data/bin/setup +0 -8
  33. data/gemfiles/Gemfile-edge +0 -14
  34. data/gemfiles/Gemfile-ruby-2.0 +0 -7
  35. data/lib/fog/aws/iam/default_policies.json +0 -1574
  36. data/lib/fog/aws/iam/default_policy_versions.json +0 -3373
  37. data/stale.yml +0 -17
@@ -36,13 +36,20 @@ module Fog
36
36
  data << "<Quiet>true</Quiet>" if headers.delete(:quiet)
37
37
  version_ids = headers.delete('versionId')
38
38
  object_names.each do |object_name|
39
- data << "<Object>"
40
- data << "<Key>#{CGI.escapeHTML(object_name)}</Key>"
41
39
  object_version = version_ids.nil? ? nil : version_ids[object_name]
42
40
  if object_version
43
- data << "<VersionId>#{CGI.escapeHTML(object_version)}</VersionId>"
41
+ object_version = object_version.is_a?(String) ? [object_version] : object_version
42
+ object_version.each do |version_id|
43
+ data << "<Object>"
44
+ data << "<Key>#{CGI.escapeHTML(object_name)}</Key>"
45
+ data << "<VersionId>#{CGI.escapeHTML(version_id)}</VersionId>"
46
+ data << "</Object>"
47
+ end
48
+ else
49
+ data << "<Object>"
50
+ data << "<Key>#{CGI.escapeHTML(object_name)}</Key>"
51
+ data << "</Object>"
44
52
  end
45
- data << "</Object>"
46
53
  end
47
54
  data << "</Delete>"
48
55
 
@@ -72,10 +79,13 @@ module Fog
72
79
  response.body = { 'DeleteResult' => [] }
73
80
  version_ids = headers.delete('versionId')
74
81
  object_names.each do |object_name|
75
- object_version = version_ids.nil? ? nil : version_ids[object_name]
76
- response.body['DeleteResult'] << delete_object_helper(bucket,
77
- object_name,
78
- object_version)
82
+ object_version = version_ids.nil? ? [nil] : version_ids[object_name]
83
+ object_version = object_version.is_a?(String) ? [object_version] : object_version
84
+ object_version.each do |version_id|
85
+ response.body['DeleteResult'] << delete_object_helper(bucket,
86
+ object_name,
87
+ version_id)
88
+ end
79
89
  end
80
90
  else
81
91
  response.status = 404
@@ -50,7 +50,7 @@ module Fog
50
50
 
51
51
  idempotent = true
52
52
  if block_given?
53
- params[:response_block] = Proc.new
53
+ params[:response_block] = Proc.new(&block)
54
54
  idempotent = false
55
55
  end
56
56
 
@@ -14,6 +14,9 @@ module Fog
14
14
  'https' => 443
15
15
  }
16
16
 
17
+ MIN_MULTIPART_CHUNK_SIZE = 5242880
18
+ MAX_SINGLE_PUT_SIZE = 5368709120
19
+
17
20
  VALID_QUERY_KEYS = %w[
18
21
  acl
19
22
  cors
@@ -43,7 +46,7 @@ module Fog
43
46
  ]
44
47
 
45
48
  requires :aws_access_key_id, :aws_secret_access_key
46
- recognizes :endpoint, :region, :host, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :path_style, :acceleration, :instrumentor, :instrumentor_name, :aws_signature_version, :enable_signature_v4_streaming, :virtual_host, :cname
49
+ recognizes :endpoint, :region, :host, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :path_style, :acceleration, :instrumentor, :instrumentor_name, :aws_signature_version, :enable_signature_v4_streaming, :virtual_host, :cname, :max_put_chunk_size, :max_copy_chunk_size
47
50
 
48
51
  secrets :aws_secret_access_key, :hmac
49
52
 
@@ -117,6 +120,17 @@ module Fog
117
120
  module Utils
118
121
  attr_accessor :region
119
122
 
123
+ # Amazon S3 limits max chunk size that can be uploaded/copied in a single request to 5GB.
124
+ # Other S3-compatible storages (like, Ceph) do not have such limit.
125
+ # Ceph shows much better performance when file is copied as a whole, in a single request.
126
+ # fog-aws user can use these settings to configure chunk sizes.
127
+ # A non-positive value will tell fog-aws to use a single put/copy request regardless of file size.
128
+ #
129
+ # @return [Integer]
130
+ # @see https://docs.aws.amazon.com/AmazonS3/latest/userguide/copy-object.html
131
+ attr_reader :max_put_chunk_size
132
+ attr_reader :max_copy_chunk_size
133
+
120
134
  def cdn
121
135
  @cdn ||= Fog::AWS::CDN.new(
122
136
  :aws_access_key_id => @aws_access_key_id,
@@ -171,6 +185,12 @@ module Fog
171
185
  params_to_url(params)
172
186
  end
173
187
 
188
+ # @param value [int]
189
+ # @param description [str]
190
+ def validate_chunk_size(value, description)
191
+ raise "#{description} (#{value}) is less than minimum #{MIN_MULTIPART_CHUNK_SIZE}" unless value <= 0 || value >= MIN_MULTIPART_CHUNK_SIZE
192
+ end
193
+
174
194
  private
175
195
 
176
196
  def validate_signature_version!
@@ -179,6 +199,16 @@ module Fog
179
199
  end
180
200
  end
181
201
 
202
+ def init_max_put_chunk_size!(options = {})
203
+ @max_put_chunk_size = options.fetch(:max_put_chunk_size, MAX_SINGLE_PUT_SIZE)
204
+ validate_chunk_size(@max_put_chunk_size, 'max_put_chunk_size')
205
+ end
206
+
207
+ def init_max_copy_chunk_size!(options = {})
208
+ @max_copy_chunk_size = options.fetch(:max_copy_chunk_size, MAX_SINGLE_PUT_SIZE)
209
+ validate_chunk_size(@max_copy_chunk_size, 'max_copy_chunk_size')
210
+ end
211
+
182
212
  def v4_signed_params_for_url(params, expires)
183
213
  now = Fog::Time.now
184
214
 
@@ -284,10 +314,10 @@ module Fog
284
314
  path_style = params.fetch(:path_style, @path_style)
285
315
  if !path_style
286
316
  if COMPLIANT_BUCKET_NAMES !~ bucket_name
287
- Fog::Logger.warning("fog: the specified s3 bucket name(#{bucket_name}) is not a valid dns name, which will negatively impact performance. For details see: http://docs.amazonwebservices.com/AmazonS3/latest/dev/BucketRestrictions.html")
317
+ Fog::Logger.warning("fog: the specified s3 bucket name(#{bucket_name}) is not a valid dns name, which will negatively impact performance. For details see: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html")
288
318
  path_style = true
289
319
  elsif scheme == 'https' && !path_style && bucket_name =~ /\./
290
- Fog::Logger.warning("fog: the specified s3 bucket name(#{bucket_name}) contains a '.' so is not accessible over https as a virtual hosted bucket, which will negatively impact performance. For details see: http://docs.amazonwebservices.com/AmazonS3/latest/dev/BucketRestrictions.html")
320
+ Fog::Logger.warning("fog: the specified s3 bucket name(#{bucket_name}) contains a '.' so is not accessible over https as a virtual hosted bucket, which will negatively impact performance. For details see: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html")
291
321
  path_style = true
292
322
  end
293
323
  end
@@ -298,6 +328,8 @@ module Fog
298
328
  host = params.fetch(:cname, bucket_name)
299
329
  elsif path_style
300
330
  path = bucket_to_path bucket_name, path
331
+ elsif host.start_with?("#{bucket_name}.")
332
+ # no-op
301
333
  else
302
334
  host = [bucket_name, host].join('.')
303
335
  end
@@ -450,6 +482,10 @@ module Fog
450
482
 
451
483
 
452
484
  @path_style = options[:path_style] || false
485
+
486
+ init_max_put_chunk_size!(options)
487
+ init_max_copy_chunk_size!(options)
488
+
453
489
  @signature_version = options.fetch(:aws_signature_version, 4)
454
490
  validate_signature_version!
455
491
  setup_credentials(options)
@@ -513,6 +549,9 @@ module Fog
513
549
  validate_signature_version!
514
550
  @path_style = options[:path_style] || false
515
551
 
552
+ init_max_put_chunk_size!(options)
553
+ init_max_copy_chunk_size!(options)
554
+
516
555
  @region = options[:region] || DEFAULT_REGION
517
556
 
518
557
  if @endpoint = options[:endpoint]
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AWS
3
- VERSION = "3.8.0"
3
+ VERSION = "3.12.0"
4
4
  end
5
5
  end
@@ -83,10 +83,63 @@ Shindo.tests('AWS | credentials', ['aws']) do
83
83
  aws_secret_access_key: 'dummysecret',
84
84
  aws_session_token: 'dummytoken',
85
85
  region: 'us-west-1',
86
+ sts_endpoint: "https://sts.amazonaws.com",
86
87
  aws_credentials_expire_at: expires_at
87
88
  ) { Fog::AWS::Compute.fetch_credentials(use_iam_profile: true) }
88
89
  end
89
90
 
91
+ ENV['AWS_ROLE_SESSION_NAME'] = nil
92
+
93
+ tests('#fetch_credentials token based without session name') do
94
+ returns(
95
+ aws_access_key_id: 'dummykey',
96
+ aws_secret_access_key: 'dummysecret',
97
+ aws_session_token: 'dummytoken',
98
+ region: 'us-west-1',
99
+ sts_endpoint: "https://sts.amazonaws.com",
100
+ aws_credentials_expire_at: expires_at
101
+ ) { Fog::AWS::Compute.fetch_credentials(use_iam_profile: true, region: 'us-west-1') }
102
+ end
103
+
104
+ ENV["AWS_STS_REGIONAL_ENDPOINTS"] = "regional"
105
+
106
+ tests('#fetch_credentials with no region specified') do
107
+ returns(
108
+ aws_access_key_id: 'dummykey',
109
+ aws_secret_access_key: 'dummysecret',
110
+ aws_session_token: 'dummytoken',
111
+ region: 'us-west-1',
112
+ sts_endpoint: "https://sts.amazonaws.com",
113
+ aws_credentials_expire_at: expires_at
114
+ ) { Fog::AWS::Compute.fetch_credentials(use_iam_profile: true) }
115
+ end
116
+
117
+ tests('#fetch_credentials with regional STS endpoint') do
118
+ returns(
119
+ aws_access_key_id: 'dummykey',
120
+ aws_secret_access_key: 'dummysecret',
121
+ aws_session_token: 'dummytoken',
122
+ region: 'us-west-1',
123
+ sts_endpoint: "https://sts.us-west-1.amazonaws.com",
124
+ aws_credentials_expire_at: expires_at
125
+ ) { Fog::AWS::Compute.fetch_credentials(use_iam_profile: true, region: 'us-west-1') }
126
+ end
127
+
128
+ ENV["AWS_DEFAULT_REGION"] = "us-west-1"
129
+
130
+ tests('#fetch_credentials with regional STS endpoint with region in env') do
131
+ returns(
132
+ aws_access_key_id: 'dummykey',
133
+ aws_secret_access_key: 'dummysecret',
134
+ aws_session_token: 'dummytoken',
135
+ region: 'us-west-1',
136
+ sts_endpoint: "https://sts.us-west-1.amazonaws.com",
137
+ aws_credentials_expire_at: expires_at
138
+ ) { Fog::AWS::Compute.fetch_credentials(use_iam_profile: true) }
139
+ end
140
+
141
+ ENV["AWS_STS_REGIONAL_ENDPOINTS"] = nil
142
+ ENV["AWS_DEFAULT_REGION"] = nil
90
143
  ENV['AWS_WEB_IDENTITY_TOKEN_FILE'] = nil
91
144
 
92
145
  compute = Fog::AWS::Compute.new(use_iam_profile: true)
@@ -1,8 +1,8 @@
1
1
  module Shindo
2
2
  class Tests
3
- def succeeds
3
+ def succeeds(&block)
4
4
  test('succeeds') do
5
- !instance_eval(&Proc.new).nil?
5
+ !instance_eval(&Proc.new(&block)).nil?
6
6
  end
7
7
  end
8
8
  end
@@ -1,4 +1,117 @@
1
1
  Shindo.tests("Storage[:aws] | directory", ["aws"]) do
2
+ tests('Fog::Storage[:aws]', "#request_params") do
3
+ def slice(hash, *args)
4
+ hash.select { |k, _| args.include?(k) }
5
+ end
6
+
7
+ instance = Fog::Storage[:aws]
8
+ method = instance.method(:request_params)
9
+
10
+ params = {bucket_name: 'profile-uploads', host: 'profile-uploads.s3.us-west-2.amazonaws.com'}
11
+ tests("given #{params}, request_params[:host]").returns("profile-uploads.s3.us-west-2.amazonaws.com") do
12
+ method.call(params)[:host]
13
+ end
14
+
15
+ params = {bucket_name: 'profile-uploads.johnsmith.net', cname: 'profile-uploads.johnsmith.net', virtual_host: true}
16
+ tests("given #{params}, request_params[:host]").returns("profile-uploads.johnsmith.net") do
17
+ method.call(params)[:host]
18
+ end
19
+
20
+ params = {bucket_name: 'profile-uploads.johnsmith.net', cname: 'profile-uploads.johnsmith.net', virtual_host: false}
21
+ tests("given #{params}, request_params[:host], request_params[:path]").
22
+ returns({host: "s3.amazonaws.com", path: "/profile-uploads.johnsmith.net/"}) do
23
+ slice(method.call(params), :host, :path)
24
+ end
25
+
26
+ params = {bucket_name: 'profile-uploads.johnsmith.net', bucket_cname: 'profile-uploads.johnsmith.net'}
27
+ tests("given #{params}, request_params[:host]").returns("profile-uploads.johnsmith.net") do
28
+ method.call(params)[:host]
29
+ end
30
+
31
+ params = {bucket_name: 'profile-uploads'}
32
+ tests("given #{params}, request_params[:path], request_params[:host]").
33
+ returns({path: "/", host: "profile-uploads.s3.amazonaws.com"}) do
34
+ slice(method.call(params), :path, :host)
35
+ end
36
+
37
+ params = {bucket_name: 'profile-uploads', path_style: true}
38
+ tests("given #{params}, request_params[:path], request_params[:host]").
39
+ returns({path: "/profile-uploads/", host: "s3.amazonaws.com"}) do
40
+ slice(method.call(params), :path, :host)
41
+ end
42
+
43
+ params = {bucket_name: 'profile-uploads', path_style: false}
44
+ tests("given #{params}, request_params[:path], request_params[:host]").
45
+ returns({path: "/", host: "profile-uploads.s3.amazonaws.com"}) do
46
+ slice(method.call(params), :path, :host)
47
+ end
48
+
49
+ params = {scheme: 'https', bucket_name: 'profile.uploads', path_style: false}
50
+ tests("given #{params}, request_params[:path], request_params[:host]").
51
+ returns(path: "/profile.uploads/", host: "s3.amazonaws.com") do
52
+ slice(method.call(params), :path, :host)
53
+ end
54
+
55
+ params = {:headers=>{:"Content-Type"=>"application/json"}}
56
+ tests("given #{params}, request_params[:headers]").returns({:"Content-Type"=>"application/json"}) do
57
+ method.call(params)[:headers]
58
+ end
59
+
60
+ params = {headers: {}}
61
+ tests("given #{params}, request_params[:headers]").returns({}) do
62
+ method.call(params)[:headers]
63
+ end
64
+
65
+ params = {scheme: 'http'}
66
+ tests("given #{params}, request_params[:scheme]").returns('http') do
67
+ method.call(params)[:scheme]
68
+ end
69
+
70
+ params = {}
71
+ tests("given #{params}, request_params[:scheme]").returns('https') do
72
+ method.call(params)[:scheme]
73
+ end
74
+
75
+ params = {scheme: 'http', port: 8080}
76
+ tests("given #{params} (default scheme), request_params[:port]").returns(8080) do
77
+ method.call(params)[:port]
78
+ end
79
+
80
+ params = {scheme: 'https', port: 443}
81
+ tests("given #{params}, request_params[:port]").returns(nil) do
82
+ method.call(params)[:port]
83
+ end
84
+
85
+ params = {}
86
+ tests("given #{params}, request_params[:host]").returns("s3.amazonaws.com") do
87
+ method.call(params)[:host]
88
+ end
89
+
90
+ params = {region: 'us-east-1'}
91
+ tests("given #{params}, request_params[:host]").returns("s3.amazonaws.com") do
92
+ method.call(params)[:host]
93
+ end
94
+
95
+ params = {region: 'us-west-2'}
96
+ tests("given #{params}, request_params[:host]").returns("s3.us-west-2.amazonaws.com") do
97
+ method.call(params)[:host]
98
+ end
99
+
100
+ params= {region: 'us-east-1', host: 's3.us-west-2.amazonaws.com'}
101
+ tests("given #{params}, request_params[:host]").returns("s3.us-west-2.amazonaws.com") do
102
+ method.call(params)[:host]
103
+ end
104
+
105
+ params = {object_name: 'image.png'}
106
+ tests("given #{params}, request_params[:host]").returns("/image.png") do
107
+ method.call(params)[:path]
108
+ end
109
+
110
+ params = {object_name: 'image.png', path: '/images/image.png'}
111
+ tests("given #{params}, request_params[:host]").returns("/images/image.png") do
112
+ method.call(params)[:path]
113
+ end
114
+ end
2
115
 
3
116
  directory_attributes = {
4
117
  :key => uniq_id('fogdirectorytests')
@@ -85,7 +198,5 @@ Shindo.tests("Storage[:aws] | directory", ["aws"]) do
85
198
  @instance.versioning?
86
199
  end
87
200
  end
88
-
89
201
  end
90
-
91
202
  end
@@ -50,6 +50,38 @@ Shindo.tests("Storage[:aws] | files", ["aws"]) do
50
50
  end
51
51
  end
52
52
 
53
+ tests('#normalize_headers') do
54
+ files = @directory.files
55
+ response = Excon::Response.new
56
+ current_time = Time.new(2021, 02, 21)
57
+
58
+ response.headers['last-modified'] = current_time.to_s
59
+ response.headers['etag'] = '12345'
60
+ response.headers['ETAG'] = '12345'
61
+ response.headers['Cache-Control'] = 'no-cache'
62
+ response.headers['Content-disposition'] = 'attachment'
63
+ response.headers['content-length'] = 100
64
+ response.headers['content-Encoding'] = 'gzip'
65
+ response.headers['content-md5'] = 'ABCDEAB'
66
+ response.headers['content-Md5'] = 'ABCDEAB'
67
+ response.headers['ConTent-Type'] = 'application/json'
68
+
69
+ expected = {
70
+ 'Last-Modified' => current_time,
71
+ 'ETag' => '12345',
72
+ 'Cache-Control' => 'no-cache',
73
+ 'Content-Disposition' => 'attachment',
74
+ 'Content-Length' => 100,
75
+ 'Content-Encoding' => 'gzip',
76
+ 'Content-MD5' => 'ABCDEAB',
77
+ 'Content-Type' => 'application/json'
78
+ }
79
+
80
+ tests('header keys are normalized').returns(expected) do
81
+ files.normalize_headers(response)
82
+ response.headers
83
+ end
84
+ end
53
85
  end
54
86
 
55
87
  @directory.versions.each(&:destroy)
@@ -19,6 +19,7 @@ Shindo.tests('Fog::Compute[:aws] | security group requests', ['aws']) do
19
19
  'groups' => [{ 'groupName' => Fog::Nullable::String, 'userId' => String, 'groupId' => String }],
20
20
  'ipProtocol' => String,
21
21
  'ipRanges' => [Fog::Nullable::Hash],
22
+ 'ipv6Ranges' => [Fog::Nullable::Hash],
22
23
  'toPort' => Fog::Nullable::Integer,
23
24
  }],
24
25
  'ipPermissionsEgress' => [],
@@ -54,16 +55,19 @@ Shindo.tests('Fog::Compute[:aws] | security group requests', ['aws']) do
54
55
  {"groups"=>[{"groupName"=>"default", "userId"=>@owner_id, "groupId"=>@group_id_default}],
55
56
  "fromPort"=>1,
56
57
  "ipRanges"=>[],
58
+ "ipv6Ranges"=>[],
57
59
  "ipProtocol"=>"tcp",
58
60
  "toPort"=>65535},
59
61
  {"groups"=>[{"groupName"=>"default", "userId"=>@owner_id, "groupId"=>@group_id_default}],
60
62
  "fromPort"=>1,
61
63
  "ipRanges"=>[],
64
+ "ipv6Ranges"=>[],
62
65
  "ipProtocol"=>"udp",
63
66
  "toPort"=>65535},
64
67
  {"groups"=>[{"groupName"=>"default", "userId"=>@owner_id, "groupId"=>@group_id_default}],
65
68
  "fromPort"=>-1,
66
69
  "ipRanges"=>[],
70
+ "ipv6Ranges"=>[],
67
71
  "ipProtocol"=>"icmp",
68
72
  "toPort"=>-1}
69
73
  ]
@@ -88,6 +92,7 @@ Shindo.tests('Fog::Compute[:aws] | security group requests', ['aws']) do
88
92
  [{"userId"=>@owner_id, "groupName"=>"default", "groupId"=>@group_id_default},
89
93
  {"userId"=>@owner_id, "groupName"=>"fog_security_group_two", "groupId"=>@group_id_two}],
90
94
  "ipRanges"=>[],
95
+ "ipv6Ranges"=>[],
91
96
  "ipProtocol"=>"tcp",
92
97
  "fromPort"=>1,
93
98
  "toPort"=>65535},
@@ -95,6 +100,7 @@ Shindo.tests('Fog::Compute[:aws] | security group requests', ['aws']) do
95
100
  [{"userId"=>@owner_id, "groupName"=>"default", "groupId"=>@group_id_default},
96
101
  {"userId"=>@owner_id, "groupName"=>"fog_security_group_two", "groupId"=>@group_id_two}],
97
102
  "ipRanges"=>[],
103
+ "ipv6Ranges"=>[],
98
104
  "ipProtocol"=>"udp",
99
105
  "fromPort"=>1,
100
106
  "toPort"=>65535},
@@ -102,6 +108,7 @@ Shindo.tests('Fog::Compute[:aws] | security group requests', ['aws']) do
102
108
  [{"userId"=>@owner_id, "groupName"=>"default", "groupId"=>@group_id_default},
103
109
  {"userId"=>@owner_id, "groupName"=>"fog_security_group_two", "groupId"=>@group_id_two}],
104
110
  "ipRanges"=>[],
111
+ "ipv6Ranges"=>[],
105
112
  "ipProtocol"=>"icmp",
106
113
  "fromPort"=>-1,
107
114
  "toPort"=>-1}
@@ -133,6 +140,7 @@ Shindo.tests('Fog::Compute[:aws] | security group requests', ['aws']) do
133
140
  expected_permissions += [
134
141
  {"groups"=>[],
135
142
  "ipRanges"=>[{"cidrIp"=>"10.0.0.0/8"}],
143
+ "ipv6Ranges"=>[],
136
144
  "ipProtocol"=>"tcp",
137
145
  "fromPort"=>22,
138
146
  "toPort"=>22}
@@ -164,7 +172,8 @@ Shindo.tests('Fog::Compute[:aws] | security group requests', ['aws']) do
164
172
  'IpPermissions' => [
165
173
  {
166
174
  'IpProtocol' => 'tcp', 'FromPort' => '80', 'ToPort' => '80',
167
- 'IpRanges' => [{ 'CidrIp' => '192.168.0.0/24' }]
175
+ 'IpRanges' => [{ 'CidrIp' => '192.168.0.0/24' }],
176
+ 'Ipv6Ranges' => []
168
177
  }
169
178
  ]
170
179
  }
@@ -177,6 +186,7 @@ Shindo.tests('Fog::Compute[:aws] | security group requests', ['aws']) do
177
186
  expected_permissions += [
178
187
  {"groups"=>[],
179
188
  "ipRanges"=>[{"cidrIp"=>"192.168.0.0/24"}],
189
+ "ipv6Ranges"=>[],
180
190
  "ipProtocol"=>"tcp",
181
191
  "fromPort"=>80,
182
192
  "toPort"=>80}
@@ -204,6 +214,7 @@ Shindo.tests('Fog::Compute[:aws] | security group requests', ['aws']) do
204
214
  expected_permissions += [
205
215
  {"groups"=>[{"userId"=>@owner_id, "groupName"=>"fog_security_group_two", "groupId"=>@group_id_two}],
206
216
  "ipRanges"=>[],
217
+ "ipv6Ranges"=>[],
207
218
  "ipProtocol"=>"tcp",
208
219
  "fromPort"=>8000,
209
220
  "toPort"=>8000}