fog-aws 1.2.1 → 1.3.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/CHANGELOG.md +16 -1
 - data/lib/fog/aws/compute.rb +6 -0
 - data/lib/fog/aws/models/compute/flavors.rb +60 -0
 - data/lib/fog/aws/models/compute/volume.rb +41 -22
 - data/lib/fog/aws/models/compute/vpc.rb +34 -0
 - data/lib/fog/aws/models/rds/security_group.rb +4 -2
 - data/lib/fog/aws/models/storage/file.rb +1 -1
 - data/lib/fog/aws/parsers/compute/describe_volumes_modifications.rb +30 -0
 - data/lib/fog/aws/parsers/compute/describe_vpc_classic_link.rb +3 -1
 - data/lib/fog/aws/parsers/compute/describe_vpc_classic_link_dns_support.rb +26 -0
 - data/lib/fog/aws/parsers/compute/modify_volume.rb +26 -0
 - data/lib/fog/aws/rds.rb +1 -1
 - data/lib/fog/aws/requests/compute/attach_classic_link_vpc.rb +3 -3
 - data/lib/fog/aws/requests/compute/create_vpc.rb +10 -9
 - data/lib/fog/aws/requests/compute/describe_volumes_modifications.rb +93 -0
 - data/lib/fog/aws/requests/compute/describe_vpc_classic_link.rb +2 -1
 - data/lib/fog/aws/requests/compute/describe_vpc_classic_link_dns_support.rb +53 -0
 - data/lib/fog/aws/requests/compute/detach_classic_link_vpc.rb +1 -3
 - data/lib/fog/aws/requests/compute/disable_vpc_classic_link_dns_support.rb +45 -0
 - data/lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb +45 -0
 - data/lib/fog/aws/requests/compute/modify_volume.rb +88 -0
 - data/lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb +10 -5
 - data/lib/fog/aws/requests/rds/create_db_subnet_group.rb +3 -4
 - data/lib/fog/aws/requests/rds/delete_db_subnet_group.rb +2 -0
 - data/lib/fog/aws/requests/rds/revoke_db_security_group_ingress.rb +9 -4
 - data/lib/fog/aws/version.rb +1 -1
 - data/tests/models/compute/volume_tests.rb +16 -1
 - data/tests/models/compute/vpc_tests.rb +23 -1
 - data/tests/models/rds/security_group_tests.rb +30 -6
 - data/tests/requests/compute/volume_tests.rb +42 -2
 - data/tests/requests/compute/vpc_tests.rb +41 -5
 - metadata +10 -2
 
    
        data/lib/fog/aws/version.rb
    CHANGED
    
    
| 
         @@ -3,7 +3,7 @@ Shindo.tests("Fog::Compute[:aws] | volume", ['aws']) do 
     | 
|
| 
       3 
3 
     | 
    
         
             
              @server = Fog::Compute[:aws].servers.create
         
     | 
| 
       4 
4 
     | 
    
         
             
              @server.wait_for { ready? }
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
     | 
    
         
            -
              model_tests(Fog::Compute[:aws].volumes, {:availability_zone => @server.availability_zone, :size => 1, :device => '/dev/sdz1', :tags => {"key" => "value"}}, true) do
         
     | 
| 
      
 6 
     | 
    
         
            +
              model_tests(Fog::Compute[:aws].volumes, {:availability_zone => @server.availability_zone, :size => 1, :device => '/dev/sdz1', :tags => {"key" => "value"}, :type => 'gp2'}, true) do
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
                @instance.wait_for { ready? }
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
         @@ -32,6 +32,21 @@ Shindo.tests("Fog::Compute[:aws] | volume", ['aws']) do 
     | 
|
| 
       32 
32 
     | 
    
         | 
| 
       33 
33 
     | 
    
         
             
                @instance.wait_for { ready? }
         
     | 
| 
       34 
34 
     | 
    
         | 
| 
      
 35 
     | 
    
         
            +
                @instance.type = 'io1'
         
     | 
| 
      
 36 
     | 
    
         
            +
                @instance.iops = 5000
         
     | 
| 
      
 37 
     | 
    
         
            +
                @instance.size = 100
         
     | 
| 
      
 38 
     | 
    
         
            +
                @instance.save
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
                returns(true) { @instance.modification_in_progress? }
         
     | 
| 
      
 41 
     | 
    
         
            +
                @instance.wait_for { !modification_in_progress? }
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
                # avoid weirdness with merge_attributes
         
     | 
| 
      
 44 
     | 
    
         
            +
                @instance = Fog::Compute[:aws].volumes.get(@instance.identity)
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
                returns('io1') { @instance.type }
         
     | 
| 
      
 47 
     | 
    
         
            +
                returns(5000)  { @instance.iops }
         
     | 
| 
      
 48 
     | 
    
         
            +
                returns(100)   { @instance.size }
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
       35 
50 
     | 
    
         
             
                tests('@instance.reload.tags').returns({'key' => 'value'}) do
         
     | 
| 
       36 
51 
     | 
    
         
             
                  @instance.reload.tags
         
     | 
| 
       37 
52 
     | 
    
         
             
                end
         
     | 
| 
         @@ -1,4 +1,26 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            Shindo.tests("Fog::Compute[:aws] | vpc", ['aws']) do
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
              model_tests(Fog::Compute[:aws].vpcs, {:cidr_block => '10.0.10.0/28'}, true)
         
     | 
| 
      
 3 
     | 
    
         
            +
              model_tests(Fog::Compute[:aws].vpcs, {:cidr_block => '10.0.10.0/28'}, true) do
         
     | 
| 
      
 4 
     | 
    
         
            +
                tests("#enable_classic_link") do
         
     | 
| 
      
 5 
     | 
    
         
            +
                  returns(false) { @instance.classic_link_enabled? }
         
     | 
| 
      
 6 
     | 
    
         
            +
                  returns(true)  { @instance.enable_classic_link }
         
     | 
| 
      
 7 
     | 
    
         
            +
                  returns(true)  { @instance.classic_link_enabled? }
         
     | 
| 
      
 8 
     | 
    
         
            +
                end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                tests("#disable_classic_link") do
         
     | 
| 
      
 11 
     | 
    
         
            +
                  returns(true)  { @instance.disable_classic_link }
         
     | 
| 
      
 12 
     | 
    
         
            +
                  returns(false) { @instance.classic_link_enabled? }
         
     | 
| 
      
 13 
     | 
    
         
            +
                end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                tests("#enable_classic_link_dns") do
         
     | 
| 
      
 16 
     | 
    
         
            +
                  returns(false) { @instance.classic_link_dns_enabled? }
         
     | 
| 
      
 17 
     | 
    
         
            +
                  returns(true)  { @instance.enable_classic_link_dns }
         
     | 
| 
      
 18 
     | 
    
         
            +
                  returns(true)  { @instance.classic_link_dns_enabled? }
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                tests("#disable_classic_link") do
         
     | 
| 
      
 22 
     | 
    
         
            +
                  returns(true)  { @instance.disable_classic_link_dns }
         
     | 
| 
      
 23 
     | 
    
         
            +
                  returns(false) { @instance.classic_link_dns_enabled? }
         
     | 
| 
      
 24 
     | 
    
         
            +
                end
         
     | 
| 
      
 25 
     | 
    
         
            +
              end
         
     | 
| 
       4 
26 
     | 
    
         
             
            end
         
     | 
| 
         @@ -6,9 +6,9 @@ Shindo.tests("AWS::RDS | security_group", ['aws', 'rds']) do 
     | 
|
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
                tests("#description").returns('fog test') { @instance.description }
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
     | 
    
         
            -
                 
     | 
| 
       10 
     | 
    
         
            -
                  @ec2_sec_group = Fog::Compute[:aws].security_groups.create(:name => 'fog-test', :description => 'fog test')
         
     | 
| 
      
 9 
     | 
    
         
            +
                @ec2_sec_group = Fog::Compute[:aws].security_groups.create(:name => uniq_id("fog-rds-test"), :description => 'fog test')
         
     | 
| 
       11 
10 
     | 
    
         | 
| 
      
 11 
     | 
    
         
            +
                tests("#authorize_ec2_security_group('#{@ec2_sec_group.name}')").succeeds do
         
     | 
| 
       12 
12 
     | 
    
         
             
                  @instance.authorize_ec2_security_group(@ec2_sec_group.name)
         
     | 
| 
       13 
13 
     | 
    
         
             
                  returns('authorizing') do
         
     | 
| 
       14 
14 
     | 
    
         
             
                    @instance.ec2_security_groups.find{|h| h['EC2SecurityGroupName'] == @ec2_sec_group.name}['Status']
         
     | 
| 
         @@ -17,9 +17,7 @@ Shindo.tests("AWS::RDS | security_group", ['aws', 'rds']) do 
     | 
|
| 
       17 
17 
     | 
    
         | 
| 
       18 
18 
     | 
    
         
             
                @instance.wait_for { ready? }
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
     | 
    
         
            -
                tests("#revoke_ec2_security_group").succeeds do
         
     | 
| 
       21 
     | 
    
         
            -
                  pending if Fog.mocking?
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
      
 20 
     | 
    
         
            +
                tests("#revoke_ec2_security_group('#{@ec2_sec_group.name}')").succeeds do
         
     | 
| 
       23 
21 
     | 
    
         
             
                  @instance.revoke_ec2_security_group(@ec2_sec_group.name)
         
     | 
| 
       24 
22 
     | 
    
         | 
| 
       25 
23 
     | 
    
         
             
                  returns('revoking') do
         
     | 
| 
         @@ -29,9 +27,35 @@ Shindo.tests("AWS::RDS | security_group", ['aws', 'rds']) do 
     | 
|
| 
       29 
27 
     | 
    
         
             
                  @instance.wait_for { ready? }
         
     | 
| 
       30 
28 
     | 
    
         | 
| 
       31 
29 
     | 
    
         
             
                  returns(false) { @instance.ec2_security_groups.any?{|h| h['EC2SecurityGroupName'] == @ec2_sec_group.name} }
         
     | 
| 
       32 
     | 
    
         
            -
                  @ec2_sec_group.destroy
         
     | 
| 
       33 
30 
     | 
    
         
             
                end
         
     | 
| 
       34 
31 
     | 
    
         | 
| 
      
 32 
     | 
    
         
            +
                @instance.wait_for { ready? }
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                tests("#authorize_ec2_security_group('#{@ec2_sec_group.group_id}')").succeeds do
         
     | 
| 
      
 35 
     | 
    
         
            +
                  @instance.authorize_ec2_security_group(@ec2_sec_group.group_id)
         
     | 
| 
      
 36 
     | 
    
         
            +
                  returns('authorizing') do
         
     | 
| 
      
 37 
     | 
    
         
            +
                    @instance.ec2_security_groups.find{|h| h['EC2SecurityGroupName'] == @ec2_sec_group.name}['Status']
         
     | 
| 
      
 38 
     | 
    
         
            +
                  end
         
     | 
| 
      
 39 
     | 
    
         
            +
                end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                @instance.wait_for { ready? }
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
                tests("#revoke_ec2_security_group('#{@ec2_sec_group.group_id}')").succeeds do
         
     | 
| 
      
 44 
     | 
    
         
            +
                  @instance.revoke_ec2_security_group(@ec2_sec_group.group_id)
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
                  returns('revoking') do
         
     | 
| 
      
 47 
     | 
    
         
            +
                    @instance.ec2_security_groups.find{|h| h['EC2SecurityGroupName'] == @ec2_sec_group.name}['Status']
         
     | 
| 
      
 48 
     | 
    
         
            +
                  end
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
                  @instance.wait_for { ready? }
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
                  returns(false) { @instance.ec2_security_groups.any?{|h| h['EC2SecurityGroupId'] == @ec2_sec_group.group_id} }
         
     | 
| 
      
 53 
     | 
    
         
            +
                end
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
                @instance.wait_for { ready? }
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                @ec2_sec_group.destroy
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
       35 
59 
     | 
    
         
             
                tests("#authorize_cidrip").succeeds do
         
     | 
| 
       36 
60 
     | 
    
         
             
                  @cidr = '127.0.0.1/32'
         
     | 
| 
       37 
61 
     | 
    
         
             
                  @instance.authorize_cidrip(@cidr)
         
     | 
| 
         @@ -68,6 +68,29 @@ Shindo.tests('Fog::Compute[:aws] | volume requests', ['aws']) do 
     | 
|
| 
       68 
68 
     | 
    
         
             
                'requestId' => String
         
     | 
| 
       69 
69 
     | 
    
         
             
              }
         
     | 
| 
       70 
70 
     | 
    
         | 
| 
      
 71 
     | 
    
         
            +
              @volume_modification_format = {
         
     | 
| 
      
 72 
     | 
    
         
            +
                'endTime'            => Fog::Nullable::Time,
         
     | 
| 
      
 73 
     | 
    
         
            +
                'modificationState'  => String,
         
     | 
| 
      
 74 
     | 
    
         
            +
                'originalIops'       => Fog::Nullable::Integer,
         
     | 
| 
      
 75 
     | 
    
         
            +
                'originalSize'       => Fog::Nullable::Integer,
         
     | 
| 
      
 76 
     | 
    
         
            +
                'originalVolumeType' => Fog::Nullable::String,
         
     | 
| 
      
 77 
     | 
    
         
            +
                'startTime'          => Time,
         
     | 
| 
      
 78 
     | 
    
         
            +
                'targetIops'         => Fog::Nullable::Integer,
         
     | 
| 
      
 79 
     | 
    
         
            +
                'targetSize'         => Fog::Nullable::Integer,
         
     | 
| 
      
 80 
     | 
    
         
            +
                'targetVolumeType'   => Fog::Nullable::String,
         
     | 
| 
      
 81 
     | 
    
         
            +
                'volumeId'           => String,
         
     | 
| 
      
 82 
     | 
    
         
            +
              }
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
              @modify_volume_format = {
         
     | 
| 
      
 85 
     | 
    
         
            +
                'requestId'          => String,
         
     | 
| 
      
 86 
     | 
    
         
            +
                'volumeModification' => @volume_modification_format
         
     | 
| 
      
 87 
     | 
    
         
            +
              }
         
     | 
| 
      
 88 
     | 
    
         
            +
             
     | 
| 
      
 89 
     | 
    
         
            +
              @describe_volume_modifications_format = {
         
     | 
| 
      
 90 
     | 
    
         
            +
                'requestId'             => String,
         
     | 
| 
      
 91 
     | 
    
         
            +
                'volumeModificationSet' => [@volume_modification_format]
         
     | 
| 
      
 92 
     | 
    
         
            +
              }
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
       71 
94 
     | 
    
         
             
              @server = Fog::Compute[:aws].servers.create
         
     | 
| 
       72 
95 
     | 
    
         
             
              @server.wait_for { ready? }
         
     | 
| 
       73 
96 
     | 
    
         | 
| 
         @@ -113,13 +136,13 @@ Shindo.tests('Fog::Compute[:aws] | volume requests', ['aws']) do 
     | 
|
| 
       113 
136 
     | 
    
         
             
                Fog::Compute[:aws].delete_volume(@volume_id)
         
     | 
| 
       114 
137 
     | 
    
         | 
| 
       115 
138 
     | 
    
         
             
                tests('#create_volume from snapshot with size').formats(@volume_format) do
         
     | 
| 
       116 
     | 
    
         
            -
                  volume = Fog::Compute[:aws].volumes.create(:availability_zone => 'us-east-1d', :size => 1)
         
     | 
| 
      
 139 
     | 
    
         
            +
                  volume = Fog::Compute[:aws].volumes.create(:availability_zone => 'us-east-1d', :size => 1, :type => 'gp2')
         
     | 
| 
       117 
140 
     | 
    
         
             
                  volume.wait_for { ready? }
         
     | 
| 
       118 
141 
     | 
    
         | 
| 
       119 
142 
     | 
    
         
             
                  snapshot = Fog::Compute[:aws].create_snapshot(volume.identity).body
         
     | 
| 
       120 
143 
     | 
    
         
             
                  Fog::Compute[:aws].snapshots.new(snapshot).wait_for { ready? }
         
     | 
| 
       121 
144 
     | 
    
         | 
| 
       122 
     | 
    
         
            -
                  data = Fog::Compute[:aws].create_volume(@server.availability_zone, 1, 'SnapshotId' => snapshot['snapshotId']).body
         
     | 
| 
      
 145 
     | 
    
         
            +
                  data = Fog::Compute[:aws].create_volume(@server.availability_zone, 1, 'SnapshotId' => snapshot['snapshotId'], 'VolumeType' => 'gp2').body
         
     | 
| 
       123 
146 
     | 
    
         
             
                  @volume_id = data['volumeId']
         
     | 
| 
       124 
147 
     | 
    
         
             
                  data
         
     | 
| 
       125 
148 
     | 
    
         
             
                end
         
     | 
| 
         @@ -155,6 +178,23 @@ Shindo.tests('Fog::Compute[:aws] | volume requests', ['aws']) do 
     | 
|
| 
       155 
178 
     | 
    
         | 
| 
       156 
179 
     | 
    
         
             
                Fog::Compute[:aws].volumes.get(@volume_id).wait_for { ready? }
         
     | 
| 
       157 
180 
     | 
    
         | 
| 
      
 181 
     | 
    
         
            +
                tests("#modify_volume('#{@volume_id}', 'Size' => 100, 'VolumeType' => 'io1', 'Iops' => 5000").formats(@modify_volume_format) do
         
     | 
| 
      
 182 
     | 
    
         
            +
                  Fog::Compute[:aws].modify_volume(@volume_id, 'Size' => 100, 'VolumeType' => 'io1', 'Iops' => 5000).body
         
     | 
| 
      
 183 
     | 
    
         
            +
                end
         
     | 
| 
      
 184 
     | 
    
         
            +
             
     | 
| 
      
 185 
     | 
    
         
            +
                tests("#describe_volumes_modifications('volume-id' => '#{@volume_id}')").formats(@describe_volume_modifications_format) do
         
     | 
| 
      
 186 
     | 
    
         
            +
                  Fog.wait_for do
         
     | 
| 
      
 187 
     | 
    
         
            +
                    Fog::Compute[:aws].describe_volumes_modifications('volume-id' => @volume_id).body['volumeModificationSet'].first['modificationState'] == 'completed'
         
     | 
| 
      
 188 
     | 
    
         
            +
                  end
         
     | 
| 
      
 189 
     | 
    
         
            +
             
     | 
| 
      
 190 
     | 
    
         
            +
                  volume = Fog::Compute[:aws].describe_volumes('volume-id' => @volume_id).body['volumeSet'].first
         
     | 
| 
      
 191 
     | 
    
         
            +
                  returns(100)   { volume['size'] }
         
     | 
| 
      
 192 
     | 
    
         
            +
                  returns('io1') { volume['volumeType'] }
         
     | 
| 
      
 193 
     | 
    
         
            +
                  returns(5000)  { volume['iops'] }
         
     | 
| 
      
 194 
     | 
    
         
            +
             
     | 
| 
      
 195 
     | 
    
         
            +
                  Fog::Compute[:aws].describe_volumes_modifications('volume-id' => @volume_id).body
         
     | 
| 
      
 196 
     | 
    
         
            +
                end
         
     | 
| 
      
 197 
     | 
    
         
            +
             
     | 
| 
       158 
198 
     | 
    
         
             
                tests("#modify_volume_attribute('#{@volume_id}', true)").formats(AWS::Compute::Formats::BASIC) do
         
     | 
| 
       159 
199 
     | 
    
         
             
                  Fog::Compute[:aws].modify_volume_attribute(@volume_id, true).body
         
     | 
| 
       160 
200 
     | 
    
         
             
                end
         
     | 
| 
         @@ -42,6 +42,13 @@ Shindo.tests('Fog::Compute[:aws] | vpc requests', ['aws']) do 
     | 
|
| 
       42 
42 
     | 
    
         
             
                'requestId' => String
         
     | 
| 
       43 
43 
     | 
    
         
             
              }
         
     | 
| 
       44 
44 
     | 
    
         | 
| 
      
 45 
     | 
    
         
            +
              @describe_vpc_classic_link_dns_support_format = {
         
     | 
| 
      
 46 
     | 
    
         
            +
                "vpcs" => [{
         
     | 
| 
      
 47 
     | 
    
         
            +
                  "vpcId"                   => String,
         
     | 
| 
      
 48 
     | 
    
         
            +
                  "classicLinkDnsSupported" => Fog::Boolean
         
     | 
| 
      
 49 
     | 
    
         
            +
                }]
         
     | 
| 
      
 50 
     | 
    
         
            +
              }
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
       45 
52 
     | 
    
         
             
              tests('success') do
         
     | 
| 
       46 
53 
     | 
    
         | 
| 
       47 
54 
     | 
    
         
             
                @vpc_id = nil
         
     | 
| 
         @@ -126,14 +133,14 @@ Shindo.tests('Fog::Compute[:aws] | vpc requests', ['aws']) do 
     | 
|
| 
       126 
133 
     | 
    
         
             
                end
         
     | 
| 
       127 
134 
     | 
    
         | 
| 
       128 
135 
     | 
    
         
             
                tests("describe_vpc_classic_link(:filters => {'tag-key' => 'foo'}").formats(@describe_vpcs_classic_link_format) do
         
     | 
| 
       129 
     | 
    
         
            -
                  body = Fog::Compute[:aws].describe_vpc_classic_link(:filters => {'tag-key' => 'foo'})
         
     | 
| 
      
 136 
     | 
    
         
            +
                  body = Fog::Compute[:aws].describe_vpc_classic_link(:filters => {'tag-key' => 'foo'}).body
         
     | 
| 
       130 
137 
     | 
    
         
             
                  tests("returns 1 vpc").returns(1) { body['vpcSet'].size }
         
     | 
| 
       131 
138 
     | 
    
         
             
                  body
         
     | 
| 
       132 
139 
     | 
    
         
             
                end
         
     | 
| 
       133 
140 
     | 
    
         | 
| 
       134 
141 
     | 
    
         
             
                tests("enable_vpc_classic_link").returns(true) do
         
     | 
| 
       135 
142 
     | 
    
         
             
                  Fog::Compute[:aws].enable_vpc_classic_link @vpc_id
         
     | 
| 
       136 
     | 
    
         
            -
                  body = Fog::Compute[:aws].describe_vpc_classic_link(:vpc_ids => [@vpc_id])
         
     | 
| 
      
 143 
     | 
    
         
            +
                  body = Fog::Compute[:aws].describe_vpc_classic_link(:vpc_ids => [@vpc_id]).body
         
     | 
| 
       137 
144 
     | 
    
         
             
                  body['vpcSet'].first['classicLinkEnabled']
         
     | 
| 
       138 
145 
     | 
    
         
             
                end
         
     | 
| 
       139 
146 
     | 
    
         | 
| 
         @@ -143,7 +150,7 @@ Shindo.tests('Fog::Compute[:aws] | vpc requests', ['aws']) do 
     | 
|
| 
       143 
150 
     | 
    
         
             
                @group = Fog::Compute[:aws].security_groups.create :name => 'test-group', :description => 'vpc security group'
         
     | 
| 
       144 
151 
     | 
    
         | 
| 
       145 
152 
     | 
    
         
             
                tests("attach_classic_link_vpc") do
         
     | 
| 
       146 
     | 
    
         
            -
                  Fog::Compute[:aws].attach_classic_link_vpc(@server.id, @vpc_id, [@group])
         
     | 
| 
      
 153 
     | 
    
         
            +
                  Fog::Compute[:aws].attach_classic_link_vpc(@server.id, @vpc_id, [@group.group_id])
         
     | 
| 
       147 
154 
     | 
    
         
             
                end
         
     | 
| 
       148 
155 
     | 
    
         | 
| 
       149 
156 
     | 
    
         
             
                tests('describe_classic_link_instances').formats(@describe_classic_link_instances) do
         
     | 
| 
         @@ -154,7 +161,36 @@ Shindo.tests('Fog::Compute[:aws] | vpc requests', ['aws']) do 
     | 
|
| 
       154 
161 
     | 
    
         
             
                  Fog::Compute[:aws].detach_classic_link_vpc(@server.id, @vpc_id)
         
     | 
| 
       155 
162 
     | 
    
         
             
                  Fog::Compute[:aws].describe_classic_link_instances().body['instancesSet']
         
     | 
| 
       156 
163 
     | 
    
         
             
                end
         
     | 
| 
       157 
     | 
    
         
            -
             
     | 
| 
      
 164 
     | 
    
         
            +
             
     | 
| 
      
 165 
     | 
    
         
            +
                tests("enable_vpc_classic_link_dns_support('#{@vpc_id}')").formats(AWS::Compute::Formats::BASIC) do
         
     | 
| 
      
 166 
     | 
    
         
            +
                  body = Fog::Compute[:aws].enable_vpc_classic_link_dns_support(@vpc_id).body
         
     | 
| 
      
 167 
     | 
    
         
            +
                  body
         
     | 
| 
      
 168 
     | 
    
         
            +
                end
         
     | 
| 
      
 169 
     | 
    
         
            +
             
     | 
| 
      
 170 
     | 
    
         
            +
                tests("#describe_vpc_classic_link_dns_support").formats(@describe_vpc_classic_link_dns_support_format) do
         
     | 
| 
      
 171 
     | 
    
         
            +
                  Fog::Compute[:aws].describe_vpc_classic_link_dns_support.body
         
     | 
| 
      
 172 
     | 
    
         
            +
                end
         
     | 
| 
      
 173 
     | 
    
         
            +
             
     | 
| 
      
 174 
     | 
    
         
            +
                tests("#describe_vpc_classic_link_dns_support(:vpc_ids => ['#{@vpc_id}'])").formats(@describe_vpc_classic_link_dns_support_format) do
         
     | 
| 
      
 175 
     | 
    
         
            +
                  body = Fog::Compute[:aws].describe_vpc_classic_link_dns_support(:vpc_ids => [@vpc_id]).body
         
     | 
| 
      
 176 
     | 
    
         
            +
                  returns(1)       { body['vpcs'].count }
         
     | 
| 
      
 177 
     | 
    
         
            +
                  returns(@vpc_id) { body['vpcs'].first['vpcId'] }
         
     | 
| 
      
 178 
     | 
    
         
            +
                  returns(true)    { body['vpcs'].first['classicLinkDnsSupported'] }
         
     | 
| 
      
 179 
     | 
    
         
            +
                  body
         
     | 
| 
      
 180 
     | 
    
         
            +
                end
         
     | 
| 
      
 181 
     | 
    
         
            +
             
     | 
| 
      
 182 
     | 
    
         
            +
                tests("disable_vpc_classic_link_dns_support('#{@vpc_id}')").formats(AWS::Compute::Formats::BASIC) do
         
     | 
| 
      
 183 
     | 
    
         
            +
                  Fog::Compute[:aws].disable_vpc_classic_link_dns_support(@vpc_id).body
         
     | 
| 
      
 184 
     | 
    
         
            +
                end
         
     | 
| 
      
 185 
     | 
    
         
            +
             
     | 
| 
      
 186 
     | 
    
         
            +
                tests("#describe_vpc_classic_link_dns_support(:vpc_ids => ['#{@vpc_id}'])").formats(@describe_vpc_classic_link_dns_support_format) do
         
     | 
| 
      
 187 
     | 
    
         
            +
                  body = Fog::Compute[:aws].describe_vpc_classic_link_dns_support(:vpc_ids => [@vpc_id]).body
         
     | 
| 
      
 188 
     | 
    
         
            +
                  returns(1)       { body['vpcs'].count }
         
     | 
| 
      
 189 
     | 
    
         
            +
                  returns(@vpc_id) { body['vpcs'].first['vpcId'] }
         
     | 
| 
      
 190 
     | 
    
         
            +
                  returns(false)   { body['vpcs'].first['classicLinkDnsSupported'] }
         
     | 
| 
      
 191 
     | 
    
         
            +
                  body
         
     | 
| 
      
 192 
     | 
    
         
            +
                end
         
     | 
| 
      
 193 
     | 
    
         
            +
             
     | 
| 
       158 
194 
     | 
    
         
             
                if !Fog.mocking?
         
     | 
| 
       159 
195 
     | 
    
         
             
                  @server.destroy
         
     | 
| 
       160 
196 
     | 
    
         
             
                  @server.wait_for {state == 'terminated'}
         
     | 
| 
         @@ -162,7 +198,7 @@ Shindo.tests('Fog::Compute[:aws] | vpc requests', ['aws']) do 
     | 
|
| 
       162 
198 
     | 
    
         | 
| 
       163 
199 
     | 
    
         
             
                tests("disable_vpc_classic_link").returns(false) do
         
     | 
| 
       164 
200 
     | 
    
         
             
                  Fog::Compute[:aws].disable_vpc_classic_link @vpc_id
         
     | 
| 
       165 
     | 
    
         
            -
                  body = Fog::Compute[:aws].describe_vpc_classic_link(:vpc_ids => [@vpc_id])
         
     | 
| 
      
 201 
     | 
    
         
            +
                  body = Fog::Compute[:aws].describe_vpc_classic_link(:vpc_ids => [@vpc_id]).body
         
     | 
| 
       166 
202 
     | 
    
         
             
                  body['vpcSet'].first['classicLinkEnabled']
         
     | 
| 
       167 
203 
     | 
    
         
             
                end
         
     | 
| 
       168 
204 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: fog-aws
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.3.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Josh Lane
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2017- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2017-03-29 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: bundler
         
     | 
| 
         @@ -456,14 +456,17 @@ files: 
     | 
|
| 
       456 
456 
     | 
    
         
             
            - lib/fog/aws/parsers/compute/describe_tags.rb
         
     | 
| 
       457 
457 
     | 
    
         
             
            - lib/fog/aws/parsers/compute/describe_volume_status.rb
         
     | 
| 
       458 
458 
     | 
    
         
             
            - lib/fog/aws/parsers/compute/describe_volumes.rb
         
     | 
| 
      
 459 
     | 
    
         
            +
            - lib/fog/aws/parsers/compute/describe_volumes_modifications.rb
         
     | 
| 
       459 
460 
     | 
    
         
             
            - lib/fog/aws/parsers/compute/describe_vpc_attribute.rb
         
     | 
| 
       460 
461 
     | 
    
         
             
            - lib/fog/aws/parsers/compute/describe_vpc_classic_link.rb
         
     | 
| 
      
 462 
     | 
    
         
            +
            - lib/fog/aws/parsers/compute/describe_vpc_classic_link_dns_support.rb
         
     | 
| 
       461 
463 
     | 
    
         
             
            - lib/fog/aws/parsers/compute/describe_vpcs.rb
         
     | 
| 
       462 
464 
     | 
    
         
             
            - lib/fog/aws/parsers/compute/detach_volume.rb
         
     | 
| 
       463 
465 
     | 
    
         
             
            - lib/fog/aws/parsers/compute/get_console_output.rb
         
     | 
| 
       464 
466 
     | 
    
         
             
            - lib/fog/aws/parsers/compute/get_password_data.rb
         
     | 
| 
       465 
467 
     | 
    
         
             
            - lib/fog/aws/parsers/compute/import_key_pair.rb
         
     | 
| 
       466 
468 
     | 
    
         
             
            - lib/fog/aws/parsers/compute/modify_subnet_attribute.rb
         
     | 
| 
      
 469 
     | 
    
         
            +
            - lib/fog/aws/parsers/compute/modify_volume.rb
         
     | 
| 
       467 
470 
     | 
    
         
             
            - lib/fog/aws/parsers/compute/monitor_unmonitor_instances.rb
         
     | 
| 
       468 
471 
     | 
    
         
             
            - lib/fog/aws/parsers/compute/move_address_to_vpc.rb
         
     | 
| 
       469 
472 
     | 
    
         
             
            - lib/fog/aws/parsers/compute/network_acl_parser.rb
         
     | 
| 
         @@ -927,17 +930,21 @@ files: 
     | 
|
| 
       927 
930 
     | 
    
         
             
            - lib/fog/aws/requests/compute/describe_tags.rb
         
     | 
| 
       928 
931 
     | 
    
         
             
            - lib/fog/aws/requests/compute/describe_volume_status.rb
         
     | 
| 
       929 
932 
     | 
    
         
             
            - lib/fog/aws/requests/compute/describe_volumes.rb
         
     | 
| 
      
 933 
     | 
    
         
            +
            - lib/fog/aws/requests/compute/describe_volumes_modifications.rb
         
     | 
| 
       930 
934 
     | 
    
         
             
            - lib/fog/aws/requests/compute/describe_vpc_attribute.rb
         
     | 
| 
       931 
935 
     | 
    
         
             
            - lib/fog/aws/requests/compute/describe_vpc_classic_link.rb
         
     | 
| 
      
 936 
     | 
    
         
            +
            - lib/fog/aws/requests/compute/describe_vpc_classic_link_dns_support.rb
         
     | 
| 
       932 
937 
     | 
    
         
             
            - lib/fog/aws/requests/compute/describe_vpcs.rb
         
     | 
| 
       933 
938 
     | 
    
         
             
            - lib/fog/aws/requests/compute/detach_classic_link_vpc.rb
         
     | 
| 
       934 
939 
     | 
    
         
             
            - lib/fog/aws/requests/compute/detach_internet_gateway.rb
         
     | 
| 
       935 
940 
     | 
    
         
             
            - lib/fog/aws/requests/compute/detach_network_interface.rb
         
     | 
| 
       936 
941 
     | 
    
         
             
            - lib/fog/aws/requests/compute/detach_volume.rb
         
     | 
| 
       937 
942 
     | 
    
         
             
            - lib/fog/aws/requests/compute/disable_vpc_classic_link.rb
         
     | 
| 
      
 943 
     | 
    
         
            +
            - lib/fog/aws/requests/compute/disable_vpc_classic_link_dns_support.rb
         
     | 
| 
       938 
944 
     | 
    
         
             
            - lib/fog/aws/requests/compute/disassociate_address.rb
         
     | 
| 
       939 
945 
     | 
    
         
             
            - lib/fog/aws/requests/compute/disassociate_route_table.rb
         
     | 
| 
       940 
946 
     | 
    
         
             
            - lib/fog/aws/requests/compute/enable_vpc_classic_link.rb
         
     | 
| 
      
 947 
     | 
    
         
            +
            - lib/fog/aws/requests/compute/enable_vpc_classic_link_dns_support.rb
         
     | 
| 
       941 
948 
     | 
    
         
             
            - lib/fog/aws/requests/compute/get_console_output.rb
         
     | 
| 
       942 
949 
     | 
    
         
             
            - lib/fog/aws/requests/compute/get_password_data.rb
         
     | 
| 
       943 
950 
     | 
    
         
             
            - lib/fog/aws/requests/compute/import_key_pair.rb
         
     | 
| 
         @@ -946,6 +953,7 @@ files: 
     | 
|
| 
       946 
953 
     | 
    
         
             
            - lib/fog/aws/requests/compute/modify_network_interface_attribute.rb
         
     | 
| 
       947 
954 
     | 
    
         
             
            - lib/fog/aws/requests/compute/modify_snapshot_attribute.rb
         
     | 
| 
       948 
955 
     | 
    
         
             
            - lib/fog/aws/requests/compute/modify_subnet_attribute.rb
         
     | 
| 
      
 956 
     | 
    
         
            +
            - lib/fog/aws/requests/compute/modify_volume.rb
         
     | 
| 
       949 
957 
     | 
    
         
             
            - lib/fog/aws/requests/compute/modify_volume_attribute.rb
         
     | 
| 
       950 
958 
     | 
    
         
             
            - lib/fog/aws/requests/compute/modify_vpc_attribute.rb
         
     | 
| 
       951 
959 
     | 
    
         
             
            - lib/fog/aws/requests/compute/monitor_instances.rb
         
     |