fog-aws 1.4.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +9 -8
  3. data/CHANGELOG.md +40 -2
  4. data/CONTRIBUTING.md +6 -6
  5. data/CONTRIBUTORS.md +104 -1
  6. data/LICENSE.md +1 -1
  7. data/fog-aws.gemspec +4 -2
  8. data/lib/fog/aws.rb +1 -0
  9. data/lib/fog/aws/compute.rb +86 -2
  10. data/lib/fog/aws/credential_fetcher.rb +4 -2
  11. data/lib/fog/aws/mock.rb +8 -0
  12. data/lib/fog/aws/models/compute/flavors.rb +40 -0
  13. data/lib/fog/aws/models/compute/subnet.rb +1 -0
  14. data/lib/fog/aws/models/compute/vpc.rb +11 -2
  15. data/lib/fog/aws/models/iam/access_keys.rb +0 -2
  16. data/lib/fog/aws/models/rds/instance_option.rb +6 -0
  17. data/lib/fog/aws/parsers/compute/create_subnet.rb +2 -0
  18. data/lib/fog/aws/parsers/compute/describe_subnets.rb +1 -1
  19. data/lib/fog/aws/parsers/compute/describe_vpcs.rb +71 -37
  20. data/lib/fog/aws/parsers/iam/list_access_keys.rb +1 -1
  21. data/lib/fog/aws/parsers/rds/describe_orderable_db_instance_options.rb +4 -3
  22. data/lib/fog/aws/requests/auto_scaling/detach_instances.rb +3 -4
  23. data/lib/fog/aws/requests/compute/authorize_security_group_egress.rb +8 -6
  24. data/lib/fog/aws/requests/compute/authorize_security_group_ingress.rb +25 -21
  25. data/lib/fog/aws/requests/compute/copy_snapshot.rb +22 -9
  26. data/lib/fog/aws/requests/compute/create_network_interface.rb +2 -2
  27. data/lib/fog/aws/requests/compute/create_route_table.rb +1 -1
  28. data/lib/fog/aws/requests/compute/create_security_group.rb +24 -19
  29. data/lib/fog/aws/requests/compute/create_subnet.rb +14 -10
  30. data/lib/fog/aws/requests/compute/create_vpc.rb +38 -10
  31. data/lib/fog/aws/requests/compute/delete_security_group.rb +9 -9
  32. data/lib/fog/aws/requests/compute/describe_network_interface_attribute.rb +16 -14
  33. data/lib/fog/aws/requests/compute/describe_security_groups.rb +30 -6
  34. data/lib/fog/aws/requests/compute/describe_subnets.rb +12 -11
  35. data/lib/fog/aws/requests/compute/modify_network_interface_attribute.rb +3 -3
  36. data/lib/fog/aws/requests/compute/revoke_security_group_egress.rb +19 -25
  37. data/lib/fog/aws/requests/compute/revoke_security_group_ingress.rb +18 -25
  38. data/lib/fog/aws/requests/compute/run_instances.rb +1 -1
  39. data/lib/fog/aws/requests/efs/create_mount_target.rb +8 -4
  40. data/lib/fog/aws/requests/elb/create_load_balancer.rb +6 -37
  41. data/lib/fog/aws/requests/kinesis/put_record.rb +1 -2
  42. data/lib/fog/aws/requests/kinesis/put_records.rb +1 -2
  43. data/lib/fog/aws/requests/lambda/invoke.rb +1 -1
  44. data/lib/fog/aws/requests/rds/describe_orderable_db_instance_options.rb +12 -6
  45. data/lib/fog/aws/requests/storage/put_object.rb +0 -1
  46. data/lib/fog/aws/service_mapper.rb +129 -0
  47. data/lib/fog/aws/version.rb +1 -1
  48. data/tests/helpers/collection_helper.rb +0 -6
  49. data/tests/models/efs/mount_target_tests.rb +3 -1
  50. data/tests/models/elasticache/subnet_groups_tests.rb +0 -1
  51. data/tests/models/storage/file_tests.rb +0 -4
  52. data/tests/models/storage/url_tests.rb +1 -20
  53. data/tests/models/storage/versions_tests.rb +0 -5
  54. data/tests/requests/compute/network_interface_tests.rb +2 -13
  55. data/tests/requests/compute/subnet_tests.rb +3 -1
  56. data/tests/requests/compute/vpc_tests.rb +8 -6
  57. data/tests/requests/dns/dns_tests.rb +0 -4
  58. data/tests/requests/efs/file_system_tests.rb +1 -1
  59. data/tests/requests/iam/managed_policy_tests.rb +0 -1
  60. data/tests/requests/iam/versioned_managed_policy_tests.rb +3 -12
  61. data/tests/requests/lambda/helper.rb +2 -2
  62. data/tests/requests/rds/helper.rb +7 -2
  63. data/tests/requests/rds/instance_option_tests.rb +7 -1
  64. data/tests/requests/storage/object_tests.rb +2 -11
  65. metadata +9 -10
  66. data/gemfiles/Gemfile-ruby-1.8.7 +0 -6
  67. data/gemfiles/Gemfile-ruby-1.9 +0 -7
@@ -46,8 +46,7 @@ module Fog
46
46
  data = options.delete("Data")
47
47
  partition_key = options.delete("PartitionKey")
48
48
 
49
- sample_method = RUBY_VERSION == "1.8.7" ? :choice : :sample
50
- shard_id = stream["Shards"].send(sample_method)["ShardId"]
49
+ shard_id = stream["Shards"].sample["ShardId"]
51
50
  shard = stream["Shards"].detect{ |shard| shard["ShardId"] == shard_id }
52
51
  # store the records on the shard(s)
53
52
  shard["Records"] << {
@@ -43,8 +43,7 @@ module Fog
43
43
  record_results = records.map { |r|
44
44
  sequence_number = next_sequence_number
45
45
 
46
- sample_method = RUBY_VERSION == "1.8.7" ? :choice : :sample
47
- shard_id = stream["Shards"].send(sample_method)["ShardId"]
46
+ shard_id = stream["Shards"].sample["ShardId"]
48
47
  shard = stream["Shards"].detect{ |shard| shard["ShardId"] == shard_id }
49
48
  # store the records on the shard(s)
50
49
  shard["Records"] << r.merge("SequenceNumber" => sequence_number)
@@ -18,7 +18,7 @@ module Fog
18
18
  headers = {}
19
19
  if client_context = params.delete('ClientContext')
20
20
  headers['X-Amz-Client-Context'] =
21
- Base64::encode64(Fog::Json.encode(client_context))
21
+ Base64::encode64(Fog::JSON.encode(client_context))
22
22
  end
23
23
  if client_type = params.delete('InvocationType')
24
24
  headers['X-Amz-Client-Type'] = client_type
@@ -4,8 +4,8 @@ module Fog
4
4
  class Real
5
5
  require 'fog/aws/parsers/rds/describe_orderable_db_instance_options'
6
6
 
7
- # Describe all or specified load db instances
8
- # http://docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_DescribeDBInstances.html
7
+ # Describe all or specified orderable db instances options
8
+ # https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeOrderableDBInstanceOptions.html
9
9
  # ==== Parameters
10
10
  # * Engine <~String> - The name of the engine to retrieve DB Instance options for. Required.
11
11
  # * Options <~Hash> - Hash of options. Optional. The following keys are used:
@@ -47,11 +47,17 @@ module Fog
47
47
  'ReadReplicaCapable' => true,
48
48
  'EngineVersion' => opts[:engine_version] || '5.6.12',
49
49
  'AvailabilityZones' => [
50
- {'Name' => 'us-east-1b', 'ProvisionedIopsCapable' => true},
51
- {'Name' => 'us-east-1c', 'ProvisionedIopsCapable' => true},
52
- {'Name' => 'us-east-1d', 'ProvisionedIopsCapable' => false},
53
- {'Name' => 'us-east-1e', 'ProvisionedIopsCapable' => true}],
50
+ {'Name' => 'us-east-1b'},
51
+ {'Name' => 'us-east-1c'},
52
+ {'Name' => 'us-east-1d'},
53
+ {'Name' => 'us-east-1e'}],
54
54
  'DBInstanceClass' => size,
55
+ 'SupportsStorageEncryption' => true,
56
+ 'SupportsPerformanceInsights' => false,
57
+ 'StorageType' => 'gp2',
58
+ 'SupportsIops' => false,
59
+ 'SupportsIAMDatabaseAuthentication' => false,
60
+ 'SupportsEnhancedMonitoring' => true,
55
61
  'Vpc' => opts[:vpc].nil? ? true : opts[:vpc]}
56
62
 
57
63
  end
@@ -30,7 +30,6 @@ module Fog
30
30
  # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUT.html
31
31
 
32
32
  def self.conforming_to_us_ascii!(keys, hash)
33
- return if RUBY_VERSION =~ /^1\.8\./
34
33
  keys.each do |k|
35
34
  v = hash[k]
36
35
  if !v.encode(::Encoding::US_ASCII, :undef => :replace).eql?(v)
@@ -0,0 +1,129 @@
1
+ module Fog
2
+ module AWS
3
+ # @api private
4
+ #
5
+ # This is a temporary lookup helper for extracting into external module.
6
+ #
7
+ # Cleaner provider/service registration will replace this code.
8
+ #
9
+ class ServiceMapper
10
+ def self.class_for(key)
11
+ case key
12
+ when :auto_scaling
13
+ Fog::AWS::AutoScaling
14
+ when :beanstalk
15
+ Fog::AWS::ElasticBeanstalk
16
+ when :cdn
17
+ Fog::CDN::AWS
18
+ when :cloud_formation
19
+ Fog::AWS::CloudFormation
20
+ when :cloud_watch
21
+ Fog::AWS::CloudWatch
22
+ when :compute
23
+ Fog::Compute::AWS
24
+ when :data_pipeline
25
+ Fog::AWS::DataPipeline
26
+ when :ddb, :dynamodb
27
+ Fog::AWS::DynamoDB
28
+ when :dns
29
+ Fog::DNS::AWS
30
+ when :elasticache
31
+ Fog::AWS::Elasticache
32
+ when :elb
33
+ Fog::AWS::ELB
34
+ when :emr
35
+ Fog::AWS::EMR
36
+ when :glacier
37
+ Fog::AWS::Glacier
38
+ when :iam
39
+ Fog::AWS::IAM
40
+ when :redshift
41
+ Fog::AWS::Redshift
42
+ when :sdb, :simpledb
43
+ Fog::AWS::SimpleDB
44
+ when :ses
45
+ Fog::AWS::SES
46
+ when :sqs
47
+ Fog::AWS::SQS
48
+ when :eu_storage, :storage
49
+ Fog::Storage::AWS
50
+ when :rds
51
+ Fog::AWS::RDS
52
+ when :sns
53
+ Fog::AWS::SNS
54
+ when :sts
55
+ Fog::AWS::STS
56
+ else
57
+ # @todo Replace most instances of ArgumentError with NotImplementedError
58
+ # @todo For a list of widely supported Exceptions, see:
59
+ # => http://www.zenspider.com/Languages/Ruby/QuickRef.html#35
60
+ raise ArgumentError, "Unsupported #{self} service: #{key}"
61
+ end
62
+ end
63
+
64
+ def self.[](service)
65
+ @@connections ||= Hash.new do |hash, key|
66
+ hash[key] = case key
67
+ when :auto_scaling
68
+ Fog::AWS::AutoScaling.new
69
+ when :beanstalk
70
+ Fog::AWS::ElasticBeanstalk.new
71
+ when :cdn
72
+ Fog::Logger.warning("AWS[:cdn] is not recommended, use CDN[:aws] for portability")
73
+ Fog::CDN.new(:provider => 'AWS')
74
+ when :cloud_formation
75
+ Fog::AWS::CloudFormation.new
76
+ when :cloud_watch
77
+ Fog::AWS::CloudWatch.new
78
+ when :compute
79
+ Fog::Logger.warning("AWS[:compute] is not recommended, use Compute[:aws] for portability")
80
+ Fog::Compute.new(:provider => 'AWS')
81
+ when :data_pipeline
82
+ Fog::AWS::DataPipeline.new
83
+ when :ddb, :dynamodb
84
+ Fog::AWS::DynamoDB.new
85
+ when :dns
86
+ Fog::Logger.warning("AWS[:dns] is not recommended, use DNS[:aws] for portability")
87
+ Fog::DNS.new(:provider => 'AWS')
88
+ when :elasticache
89
+ Fog::AWS::Elasticache.new
90
+ when :elb
91
+ Fog::AWS::ELB.new
92
+ when :emr
93
+ Fog::AWS::EMR.new
94
+ when :glacier
95
+ Fog::AWS::Glacier.new
96
+ when :iam
97
+ Fog::AWS::IAM.new
98
+ when :redshift
99
+ Fog::AWS::Redshift.new
100
+ when :rds
101
+ Fog::AWS::RDS.new
102
+ when :eu_storage
103
+ Fog::Storage.new(:provider => 'AWS', :region => 'eu-west-1')
104
+ when :sdb, :simpledb
105
+ Fog::AWS::SimpleDB.new
106
+ when :ses
107
+ Fog::AWS::SES.new
108
+ when :sqs
109
+ Fog::AWS::SQS.new
110
+ when :storage
111
+ Fog::Logger.warning("AWS[:storage] is not recommended, use Storage[:aws] for portability")
112
+ Fog::Storage.new(:provider => 'AWS')
113
+ when :sns
114
+ Fog::AWS::SNS.new
115
+ when :sts
116
+ Fog::AWS::STS.new
117
+ else
118
+ raise ArgumentError, "Unrecognized service: #{key.inspect}"
119
+ end
120
+ end
121
+ @@connections[service]
122
+ end
123
+
124
+ def self.services
125
+ Fog::AWS.services
126
+ end
127
+ end
128
+ end
129
+ end
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AWS
3
- VERSION = "1.4.1"
3
+ VERSION = "2.0.0"
4
4
  end
5
5
  end
@@ -39,12 +39,6 @@ def collection_tests(collection, params = {}, mocks_implemented = true)
39
39
  'none?', 'one?'
40
40
  ]
41
41
 
42
- # JRuby 1.7.5+ issue causes a SystemStackError: stack level too deep
43
- # https://github.com/jruby/jruby/issues/1265
44
- if RUBY_PLATFORM == "java" and JRUBY_VERSION =~ /1\.7\.[5-8]/
45
- methods.delete('all?')
46
- end
47
-
48
42
  methods.each do |enum_method|
49
43
  if collection.respond_to?(enum_method)
50
44
  tests("##{enum_method}").succeeds do
@@ -5,7 +5,9 @@ Shindo.tests("AWS::EFS | mount target", ["aws", "efs"]) do
5
5
  if Fog.mocking?
6
6
  vpc = Fog::Compute[:aws].vpcs.create(:cidr_block => "10.0.0.0/16")
7
7
  subnet = Fog::Compute[:aws].subnets.create(:vpc_id => vpc.id, :cidr_block => "10.0.1.0/24")
8
- default_security_group_data = Fog::Compute[:aws].data[:security_groups]['default']
8
+ default_security_group_data = Fog::Compute[:aws].data[:security_groups].values.find do |sg|
9
+ sg['groupDescription'] == 'default_elb security group'
10
+ end
9
11
  default_security_group = Fog::Compute[:aws].security_groups.new(default_security_group_data)
10
12
  else
11
13
  vpc = Fog::Compute[:aws].vpcs.first
@@ -14,7 +14,6 @@ Shindo.tests('AWS::Elasticache | subnet group', ['aws', 'elasticache']) do
14
14
  @subnets = (1..3).map do
15
15
  result = Fog::Compute[:aws].create_subnet(@vpc.id, "10.#{vpc_range}.#{subnet_range}.0/24",
16
16
  'AvailabilityZone' => subnet_az)
17
- puts result
18
17
  subnet = result.body['subnet']
19
18
  subnet_az = subnet_az.succ
20
19
  subnet_range *= 2
@@ -43,10 +43,6 @@ Shindo.tests("Storage[:aws] | file", ["aws"]) do
43
43
  end
44
44
 
45
45
  tests('#versions are all for the correct key').returns(true) do
46
- # JRuby 1.7.5+ issue causes a SystemStackError: stack level too deep
47
- # https://github.com/jruby/jruby/issues/1265
48
- pending if RUBY_PLATFORM == "java" and JRUBY_VERSION =~ /1\.7\.[5-8]/
49
-
50
46
  @instance.versions.all? { |v| v.key == @instance.key }
51
47
  end
52
48
  end
@@ -1,7 +1,6 @@
1
1
  # encoding: utf-8
2
2
  Shindo.tests('AWS | url', ["aws"]) do
3
3
 
4
-
5
4
  @storage = Fog::Storage.new(
6
5
  :provider => 'AWS',
7
6
  :aws_access_key_id => '123',
@@ -12,15 +11,7 @@ Shindo.tests('AWS | url', ["aws"]) do
12
11
  @file = @storage.directories.new(:key => 'fognonbucket').files.new(:key => 'test.txt')
13
12
 
14
13
  now = Fog::Time.now
15
- if RUBY_VERSION > '1.8.7' # ruby 1.8.x doesn't provide hash ordering
16
- tests('#v4 url w/ response-cache-control').returns(
17
- "https://fognonbucket.s3.amazonaws.com/test.txt?response-cache-control=No-cache&X-Amz-Expires=500&X-Amz-Date=#{now.to_iso8601_basic}&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=123/#{now.utc.strftime('%Y%m%d')}/us-east-1/s3/aws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature="
18
- ) do
19
-
20
- @file.url(now + 500, :query => { 'response-cache-control' => 'No-cache' }).gsub(/(X-Amz-Signature=)[0-9a-f]+\z/,'\\1')
21
- end
22
- end
23
-
14
+
24
15
  @storage = Fog::Storage.new(
25
16
  :provider => 'AWS',
26
17
  :aws_access_key_id => '123',
@@ -31,14 +22,4 @@ Shindo.tests('AWS | url', ["aws"]) do
31
22
 
32
23
  @file = @storage.directories.new(:key => 'fognonbucket').files.new(:key => 'test.txt')
33
24
 
34
- if RUBY_VERSION > '1.8.7' # ruby 1.8.x doesn't provide hash ordering
35
- tests('#v2 url w/ response-cache-control').returns(
36
- "https://fognonbucket.s3.amazonaws.com/test.txt?response-cache-control=No-cache&AWSAccessKeyId=123&Signature=foo&Expires=#{now.to_i + 500}"
37
- ) do
38
-
39
- @file.url(now + 500, :query => { 'response-cache-control' => 'No-cache' })
40
- end
41
- end
42
-
43
-
44
25
  end
@@ -15,15 +15,10 @@ Shindo.tests("Storage[:aws] | versions", ["aws"]) do
15
15
 
16
16
  versions = []
17
17
  versions << @instance.service.put_object(@instance.key, 'one', 'abcde').headers['x-amz-version-id']
18
-
19
- puts versions.first
20
-
21
18
  versions << @instance.service.put_object(@instance.key, 'one', '32423').headers['x-amz-version-id']
22
19
  versions << @instance.service.delete_object(@instance.key, 'one').headers['x-amz-version-id']
23
20
  versions.reverse!
24
21
 
25
- puts versions.first
26
-
27
22
  versions << @instance.service.put_object(@instance.key, 'two', 'aoeu').headers['x-amz-version-id']
28
23
 
29
24
  tests('#versions') do
@@ -47,18 +47,6 @@ Shindo.tests('Fog::Compute[:aws] | network interface requests', ['aws']) do
47
47
  @subnet_id = @subnet.subnet_id
48
48
  @security_group_id = @security_group.group_id
49
49
 
50
- @security_groups = [
51
- @security_group.name, {
52
- 'groupDescription' => @security_group.description,
53
- 'groupName' => @security_group.name,
54
- 'groupId' => @security_group_id,
55
- 'ipPermissionsEgress' => [],
56
- 'ipPermissions' => [],
57
- 'ownerId' => @owner_id,
58
- 'vpcId' => @vpc.id
59
- }
60
- ]
61
-
62
50
  DESCRIPTION = "Small and green"
63
51
  tests("#create_network_interface(#{@subnet_id})").formats(@network_interface_create_format) do
64
52
  data = Fog::Compute[:aws].create_network_interface(@subnet_id, {"PrivateIpAddress" => "10.0.10.23"}).body
@@ -164,7 +152,8 @@ Shindo.tests('Fog::Compute[:aws] | network interface requests', ['aws']) do
164
152
  tests("#describe_network_interface_attribute(#{@nic2_id}, 'description')").returns(DESCRIPTION) do
165
153
  Fog::Compute[:aws].describe_network_interface_attribute(@nic2_id, 'description').body["description"]
166
154
  end
167
- tests("#describe_network_interface_attribute(#{@nic2_id}, 'groupSet')").returns({ @security_group_id => @security_groups }) do
155
+
156
+ tests("#describe_network_interface_attribute(#{@nic2_id}, 'groupSet')").returns({ @security_group_id => @security_group.name }) do
168
157
  Fog::Compute[:aws].describe_network_interface_attribute(@nic2_id, 'groupSet').body["groupSet"]
169
158
  end
170
159
 
@@ -8,6 +8,8 @@ Shindo.tests('Fog::Compute[:aws] | subnet requests', ['aws']) do
8
8
  'availableIpAddressCount' => String,
9
9
  'availabilityZone' => String,
10
10
  'tagSet' => Hash,
11
+ 'mapPublicIpOnLaunch' => Fog::Boolean,
12
+ 'defaultForAz' => Fog::Boolean,
11
13
  }
12
14
 
13
15
  @single_subnet_format = {
@@ -24,7 +26,7 @@ Shindo.tests('Fog::Compute[:aws] | subnet requests', ['aws']) do
24
26
  'requestId' => String,
25
27
  'return' => Fog::Boolean
26
28
  }
27
-
29
+
28
30
  @vpc_network = '10.0.10.0/24'
29
31
  @vpc=Fog::Compute[:aws].vpcs.create('cidr_block' => @vpc_network)
30
32
  @vpc_id = @vpc.id
@@ -32,12 +32,14 @@ Shindo.tests('Fog::Compute[:aws] | vpc requests', ['aws']) do
32
32
 
33
33
  @describe_vpcs_format = {
34
34
  'vpcSet' => [{
35
- 'vpcId' => String,
36
- 'state' => String,
37
- 'cidrBlock' => String,
38
- 'dhcpOptionsId' => String,
39
- 'tagSet' => Hash,
40
- 'instanceTenancy' => Fog::Nullable::String,
35
+ 'vpcId' => String,
36
+ 'state' => String,
37
+ 'cidrBlock' => String,
38
+ 'dhcpOptionsId' => String,
39
+ 'tagSet' => Hash,
40
+ 'instanceTenancy' => Fog::Nullable::String,
41
+ 'cidrBlockAssociationSet' => [{'cidrBlock' => String, 'associationId' => String, 'state' => String}],
42
+ 'ipv6CidrBlockAssociationSet' => [{'ipv6CidrBlock' => String, 'associationId' => String, 'state' => String}]
41
43
  }],
42
44
  'requestId' => String
43
45
  }
@@ -188,10 +188,6 @@ Shindo.tests('Fog::DNS[:aws] | DNS requests', ['aws', 'dns']) do
188
188
  change_batch << resource_record_set
189
189
  options = { :comment => 'add ALIAS record to domain'}
190
190
 
191
- puts "Hosted Zone ID (ELB): #{hosted_zone_id}"
192
- puts "DNS Name (ELB): #{dns_name}"
193
- puts "Zone ID for Route 53: #{@zone_id}"
194
-
195
191
  response = @r53_connection.change_resource_record_sets(@zone_id, change_batch, options)
196
192
 
197
193
  Fog.wait_for { @r53_connection.get_change(response.body["Id"]).body["Status"] != "PENDING" }
@@ -33,7 +33,7 @@ Shindo.tests('AWS::EFS | file systems', ['aws', 'efs']) do
33
33
  :vpc_id => vpc.id,
34
34
  :cidr_block => "10.0.1.0/24"
35
35
  )
36
- default_security_group = Fog::Compute[:aws].security_groups.detect { |sg| sg.description == 'default group' }
36
+ default_security_group = Fog::Compute[:aws].security_groups.detect { |sg| sg.description == 'default_elb security group' }
37
37
  else
38
38
  vpc = Fog::Compute[:aws].vpcs.first
39
39
  subnet = vpc.subnets.first
@@ -43,7 +43,6 @@ Shindo.tests('AWS::IAM | managed policy requests', ['aws']) do
43
43
 
44
44
  tests("#create_policy('fog_policy')").formats(create_policy_format) do
45
45
  body = Fog::AWS[:iam].create_policy('fog_policy', @policy, '/fog/').body
46
- puts body.inspect
47
46
  @policy_arn = body['Policy']['Arn']
48
47
  body
49
48
  end
@@ -57,10 +57,7 @@ Shindo.tests('AWS::IAM | versioned managed policy requests', ['aws']) do
57
57
  }
58
58
 
59
59
  tests("#create_policy('fog_policy')").formats(create_policy_format) do
60
- body = Fog::AWS[:iam].create_policy('fog_policy', @policy, '/fog/').body
61
- puts body.inspect
62
- @policy_arn = body['Policy']['Arn']
63
- body
60
+ Fog::AWS[:iam].create_policy('fog_policy', @policy, '/fog/').body['Policy']['Arn']
64
61
  end
65
62
 
66
63
  tests("#list_policies('fog_policy')").formats(list_policies_format) do
@@ -72,10 +69,7 @@ Shindo.tests('AWS::IAM | versioned managed policy requests', ['aws']) do
72
69
  end
73
70
 
74
71
  tests("#create_versioned_policy('fog_policy')").formats(create_versioned_policy_format) do
75
- body = Fog::AWS[:iam].create_versioned_policy(@policy_arn, @policy_v2, true).body
76
- puts body.inspect
77
- @policy_version_document = body['PolicyVersion']['Document']
78
- body
72
+ Fog::AWS[:iam].create_versioned_policy(@policy_arn, @policy_v2, true).body['PolicyVersion']['Document']
79
73
  end
80
74
 
81
75
  tests("#list_policy_versions('fog_policy')").formats(list_policy_versions_format) do
@@ -95,10 +89,7 @@ Shindo.tests('AWS::IAM | versioned managed policy requests', ['aws']) do
95
89
  end
96
90
 
97
91
  tests("#delete_versioned_policy('fog_policy')").formats(AWS::IAM::Formats::BASIC) do
98
- body = Fog::AWS[:iam].delete_policy(@policy_arn, 'v2').body
99
- puts body.inspect
100
- @policy_version_document = body['PolicyVersion']['Document']
101
- body
92
+ Fog::AWS[:iam].delete_policy(@policy_arn, 'v2').body['PolicyVersion']['Document']
102
93
  end
103
94
 
104
95
  tests("#delete_policy('fog_policy')").formats(AWS::IAM::Formats::BASIC) do