fog 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. data/fog.gemspec +13 -7
  2. data/lib/fog.rb +1 -1
  3. data/lib/fog/aws.rb +0 -4
  4. data/lib/fog/aws/parsers/ec2/get_console_output.rb +4 -2
  5. data/lib/fog/aws/requests/ec2/associate_address.rb +1 -1
  6. data/lib/fog/aws/requests/ec2/attach_volume.rb +2 -2
  7. data/lib/fog/aws/requests/ec2/authorize_security_group_ingress.rb +1 -1
  8. data/lib/fog/aws/requests/ec2/delete_security_group.rb +1 -1
  9. data/lib/fog/aws/requests/ec2/delete_snapshot.rb +1 -1
  10. data/lib/fog/aws/requests/ec2/delete_volume.rb +1 -1
  11. data/lib/fog/aws/requests/ec2/describe_addresses.rb +1 -1
  12. data/lib/fog/aws/requests/ec2/describe_instances.rb +2 -2
  13. data/lib/fog/aws/requests/ec2/describe_key_pairs.rb +1 -1
  14. data/lib/fog/aws/requests/ec2/describe_security_groups.rb +1 -1
  15. data/lib/fog/aws/requests/ec2/describe_snapshots.rb +1 -1
  16. data/lib/fog/aws/requests/ec2/describe_volumes.rb +1 -1
  17. data/lib/fog/aws/requests/ec2/detach_volume.rb +1 -1
  18. data/lib/fog/aws/requests/ec2/get_console_output.rb +2 -2
  19. data/lib/fog/aws/requests/ec2/reboot_instances.rb +1 -1
  20. data/lib/fog/aws/requests/ec2/revoke_security_group_ingress.rb +1 -1
  21. data/lib/fog/aws/requests/ec2/run_instances.rb +2 -1
  22. data/lib/fog/aws/requests/ec2/terminate_instances.rb +1 -1
  23. data/lib/fog/collection.rb +7 -3
  24. data/lib/fog/terremark/shared.rb +4 -2
  25. data/lib/fog/vcloud.rb +25 -3
  26. data/lib/fog/vcloud/collection.rb +66 -0
  27. data/lib/fog/vcloud/model.rb +49 -0
  28. data/lib/fog/vcloud/models/vdc.rb +36 -0
  29. data/lib/fog/vcloud/models/vdcs.rb +36 -0
  30. data/lib/fog/vcloud/parser.rb +4 -1
  31. data/lib/fog/vcloud/parsers/get_vdc.rb +26 -1
  32. data/lib/fog/vcloud/parsers/login.rb +2 -6
  33. data/lib/fog/vcloud/requests/get_organization.rb +1 -1
  34. data/lib/fog/vcloud/requests/get_vdc.rb +32 -1
  35. data/lib/fog/vcloud/terremark/ecloud.rb +2 -1
  36. data/lib/fog/vcloud/terremark/ecloud/models/vdc.rb +20 -0
  37. data/lib/fog/vcloud/terremark/ecloud/models/vdcs.rb +29 -0
  38. data/lib/fog/vcloud/terremark/ecloud/parsers/get_vdc.rb +3 -3
  39. data/lib/fog/vcloud/terremark/ecloud/requests/get_vdc.rb +1 -1
  40. data/lib/fog/vcloud/terremark/vcloud/requests/get_vdc.rb +1 -1
  41. data/spec/aws/models/ec2/snapshots_spec.rb +1 -1
  42. data/spec/shared_examples/servers_examples.rb +1 -1
  43. data/spec/vcloud/models/vdc_spec.rb +46 -0
  44. data/spec/vcloud/models/vdcs_spec.rb +1 -0
  45. data/spec/vcloud/requests/get_organization_spec.rb +2 -2
  46. data/spec/vcloud/requests/get_vdc_spec.rb +6 -3
  47. data/spec/vcloud/spec_helper.rb +44 -8
  48. data/spec/vcloud/terremark/ecloud/models/vdc_spec.rb +43 -0
  49. data/spec/vcloud/terremark/ecloud/models/vdcs_spec.rb +25 -0
  50. data/spec/vcloud/terremark/ecloud/requests/get_vdc_spec.rb +8 -8
  51. data/spec/vcloud/terremark/vcloud/requests/get_vdc_spec.rb +4 -4
  52. data/tests/aws/helper.rb +0 -8
  53. data/tests/aws/requests/ec2/address_tests.rb +3 -3
  54. data/tests/aws/requests/ec2/availability_zone_tests.rb +2 -2
  55. data/tests/aws/requests/ec2/instance_tests.rb +122 -0
  56. data/tests/aws/requests/ec2/key_pair_tests.rb +1 -1
  57. data/tests/aws/requests/ec2/region_tests.rb +2 -2
  58. data/tests/aws/requests/ec2/security_group_tests.rb +6 -6
  59. data/tests/aws/requests/ec2/snapshot_tests.rb +2 -2
  60. data/tests/aws/requests/ec2/volume_tests.rb +5 -5
  61. data/tests/helper.rb +19 -6
  62. data/tests/rackspace/requests/servers/list_images_detail_tests.rb +1 -1
  63. metadata +14 -8
  64. data/spec/aws/requests/ec2/describe_instances_spec.rb +0 -104
  65. data/spec/aws/requests/ec2/get_console_output_spec.rb +0 -35
  66. data/spec/aws/requests/ec2/reboot_instances_spec.rb +0 -30
  67. data/spec/aws/requests/ec2/run_instances_spec.rb +0 -48
  68. 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