fog 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/fog.gemspec +13 -7
- data/lib/fog.rb +1 -1
- data/lib/fog/aws.rb +0 -4
- data/lib/fog/aws/parsers/ec2/get_console_output.rb +4 -2
- data/lib/fog/aws/requests/ec2/associate_address.rb +1 -1
- data/lib/fog/aws/requests/ec2/attach_volume.rb +2 -2
- data/lib/fog/aws/requests/ec2/authorize_security_group_ingress.rb +1 -1
- data/lib/fog/aws/requests/ec2/delete_security_group.rb +1 -1
- data/lib/fog/aws/requests/ec2/delete_snapshot.rb +1 -1
- data/lib/fog/aws/requests/ec2/delete_volume.rb +1 -1
- data/lib/fog/aws/requests/ec2/describe_addresses.rb +1 -1
- data/lib/fog/aws/requests/ec2/describe_instances.rb +2 -2
- data/lib/fog/aws/requests/ec2/describe_key_pairs.rb +1 -1
- data/lib/fog/aws/requests/ec2/describe_security_groups.rb +1 -1
- data/lib/fog/aws/requests/ec2/describe_snapshots.rb +1 -1
- data/lib/fog/aws/requests/ec2/describe_volumes.rb +1 -1
- data/lib/fog/aws/requests/ec2/detach_volume.rb +1 -1
- data/lib/fog/aws/requests/ec2/get_console_output.rb +2 -2
- data/lib/fog/aws/requests/ec2/reboot_instances.rb +1 -1
- data/lib/fog/aws/requests/ec2/revoke_security_group_ingress.rb +1 -1
- data/lib/fog/aws/requests/ec2/run_instances.rb +2 -1
- data/lib/fog/aws/requests/ec2/terminate_instances.rb +1 -1
- data/lib/fog/collection.rb +7 -3
- data/lib/fog/terremark/shared.rb +4 -2
- data/lib/fog/vcloud.rb +25 -3
- data/lib/fog/vcloud/collection.rb +66 -0
- data/lib/fog/vcloud/model.rb +49 -0
- data/lib/fog/vcloud/models/vdc.rb +36 -0
- data/lib/fog/vcloud/models/vdcs.rb +36 -0
- data/lib/fog/vcloud/parser.rb +4 -1
- data/lib/fog/vcloud/parsers/get_vdc.rb +26 -1
- data/lib/fog/vcloud/parsers/login.rb +2 -6
- data/lib/fog/vcloud/requests/get_organization.rb +1 -1
- data/lib/fog/vcloud/requests/get_vdc.rb +32 -1
- data/lib/fog/vcloud/terremark/ecloud.rb +2 -1
- data/lib/fog/vcloud/terremark/ecloud/models/vdc.rb +20 -0
- data/lib/fog/vcloud/terremark/ecloud/models/vdcs.rb +29 -0
- data/lib/fog/vcloud/terremark/ecloud/parsers/get_vdc.rb +3 -3
- data/lib/fog/vcloud/terremark/ecloud/requests/get_vdc.rb +1 -1
- data/lib/fog/vcloud/terremark/vcloud/requests/get_vdc.rb +1 -1
- data/spec/aws/models/ec2/snapshots_spec.rb +1 -1
- data/spec/shared_examples/servers_examples.rb +1 -1
- data/spec/vcloud/models/vdc_spec.rb +46 -0
- data/spec/vcloud/models/vdcs_spec.rb +1 -0
- data/spec/vcloud/requests/get_organization_spec.rb +2 -2
- data/spec/vcloud/requests/get_vdc_spec.rb +6 -3
- data/spec/vcloud/spec_helper.rb +44 -8
- data/spec/vcloud/terremark/ecloud/models/vdc_spec.rb +43 -0
- data/spec/vcloud/terremark/ecloud/models/vdcs_spec.rb +25 -0
- data/spec/vcloud/terremark/ecloud/requests/get_vdc_spec.rb +8 -8
- data/spec/vcloud/terremark/vcloud/requests/get_vdc_spec.rb +4 -4
- data/tests/aws/helper.rb +0 -8
- data/tests/aws/requests/ec2/address_tests.rb +3 -3
- data/tests/aws/requests/ec2/availability_zone_tests.rb +2 -2
- data/tests/aws/requests/ec2/instance_tests.rb +122 -0
- data/tests/aws/requests/ec2/key_pair_tests.rb +1 -1
- data/tests/aws/requests/ec2/region_tests.rb +2 -2
- data/tests/aws/requests/ec2/security_group_tests.rb +6 -6
- data/tests/aws/requests/ec2/snapshot_tests.rb +2 -2
- data/tests/aws/requests/ec2/volume_tests.rb +5 -5
- data/tests/helper.rb +19 -6
- data/tests/rackspace/requests/servers/list_images_detail_tests.rb +1 -1
- metadata +14 -8
- data/spec/aws/requests/ec2/describe_instances_spec.rb +0 -104
- data/spec/aws/requests/ec2/get_console_output_spec.rb +0 -35
- data/spec/aws/requests/ec2/reboot_instances_spec.rb +0 -30
- data/spec/aws/requests/ec2/run_instances_spec.rb +0 -48
- data/spec/aws/requests/ec2/terminate_instances_spec.rb +0 -35
@@ -1,35 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../../../spec_helper'
|
2
|
-
|
3
|
-
describe 'EC2.terminate_instances' do
|
4
|
-
describe 'success' do
|
5
|
-
|
6
|
-
before(:each) do
|
7
|
-
@instance_id = AWS[:ec2].run_instances(GENTOO_AMI, 1, 1).body['instancesSet'].first['instanceId']
|
8
|
-
end
|
9
|
-
|
10
|
-
it "should return proper attributes" do
|
11
|
-
actual = AWS[:ec2].terminate_instances(@instance_id)
|
12
|
-
actual.body['requestId'].should be_a(String)
|
13
|
-
actual.body['instancesSet'].should be_an(Array)
|
14
|
-
instance = actual.body['instancesSet'].select {|instance| instance['instanceId'] == @instance_id}.first
|
15
|
-
instance['previousState'].should be_a(Hash)
|
16
|
-
previous_state = instance['previousState']
|
17
|
-
previous_state['code'].should be_a(Integer)
|
18
|
-
previous_state['name'].should be_a(String)
|
19
|
-
instance['currentState'].should be_a(Hash)
|
20
|
-
current_state = instance['currentState']
|
21
|
-
current_state['code'].should be_a(Integer)
|
22
|
-
current_state['name'].should be_a(String)
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
26
|
-
describe 'failure' do
|
27
|
-
|
28
|
-
it 'should raise a Fog::AWS::EC2::Error if the instance does not exist' do
|
29
|
-
lambda {
|
30
|
-
AWS[:ec2].terminate_instances('i-00000000')
|
31
|
-
}.should raise_error(Fog::AWS::EC2::Error)
|
32
|
-
end
|
33
|
-
|
34
|
-
end
|
35
|
-
end
|