fog 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. data/fog.gemspec +1 -1
  2. data/lib/fog.rb +15 -4
  3. data/lib/fog/aws/ec2.rb +10 -2
  4. data/lib/fog/aws/models/ec2/addresses.rb +1 -1
  5. data/lib/fog/aws/models/ec2/images.rb +1 -1
  6. data/lib/fog/aws/models/ec2/key_pairs.rb +1 -1
  7. data/lib/fog/aws/models/ec2/security_groups.rb +1 -1
  8. data/lib/fog/aws/models/ec2/servers.rb +1 -1
  9. data/lib/fog/aws/models/ec2/snapshots.rb +1 -1
  10. data/lib/fog/aws/models/ec2/volumes.rb +1 -1
  11. data/lib/fog/aws/requests/ec2/describe_reserved_instances.rb +1 -1
  12. data/lib/fog/aws/requests/ec2/modify_image_attributes.rb +1 -1
  13. data/lib/fog/aws/requests/elb/create_load_balancer.rb +1 -1
  14. data/lib/fog/aws/requests/elb/delete_load_balancer.rb +1 -1
  15. data/lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb +1 -1
  16. data/lib/fog/aws/requests/elb/describe_instance_health.rb +1 -1
  17. data/lib/fog/aws/requests/elb/describe_load_balancers.rb +1 -1
  18. data/lib/fog/aws/requests/elb/disable_availability_zones_for_load_balancer.rb +1 -1
  19. data/lib/fog/aws/requests/elb/enable_availability_zones_for_load_balancer.rb +1 -1
  20. data/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb +1 -1
  21. data/lib/fog/aws/requests/s3/get_bucket_acl.rb +1 -1
  22. data/lib/fog/aws/requests/s3/get_bucket_logging.rb +1 -1
  23. data/lib/fog/aws/requests/s3/get_bucket_object_versions.rb +1 -1
  24. data/lib/fog/aws/requests/s3/get_bucket_versioning.rb +1 -1
  25. data/lib/fog/aws/requests/s3/get_object_acl.rb +1 -1
  26. data/lib/fog/aws/requests/s3/get_object_torrent.rb +1 -1
  27. data/lib/fog/aws/requests/s3/put_bucket_acl.rb +1 -1
  28. data/lib/fog/aws/requests/s3/put_bucket_logging.rb +1 -1
  29. data/lib/fog/aws/requests/s3/put_bucket_versioning.rb +1 -1
  30. data/lib/fog/aws/requests/simpledb/select.rb +1 -1
  31. data/lib/fog/rackspace/requests/files/delete_container.rb +1 -1
  32. data/lib/fog/rackspace/requests/files/delete_object.rb +1 -1
  33. data/lib/fog/rackspace/requests/files/get_container.rb +1 -1
  34. data/lib/fog/rackspace/requests/files/get_containers.rb +1 -1
  35. data/lib/fog/rackspace/requests/files/get_object.rb +1 -1
  36. data/lib/fog/rackspace/requests/files/head_container.rb +1 -1
  37. data/lib/fog/rackspace/requests/files/head_containers.rb +1 -1
  38. data/lib/fog/rackspace/requests/files/head_object.rb +1 -1
  39. data/lib/fog/rackspace/requests/files/put_container.rb +1 -1
  40. data/lib/fog/rackspace/requests/files/put_object.rb +1 -1
  41. data/lib/fog/rackspace/requests/servers/get_flavor_details.rb +1 -1
  42. data/lib/fog/rackspace/requests/servers/get_image_details.rb +1 -1
  43. data/lib/fog/rackspace/requests/servers/list_flavors.rb +1 -1
  44. data/lib/fog/rackspace/requests/servers/list_flavors_detail.rb +1 -1
  45. data/lib/fog/rackspace/requests/servers/reboot_server.rb +1 -1
  46. data/lib/fog/slicehost/requests/create_slice.rb +1 -1
  47. data/lib/fog/slicehost/requests/delete_slice.rb +1 -1
  48. data/lib/fog/slicehost/requests/get_backups.rb +1 -1
  49. data/lib/fog/slicehost/requests/get_flavor.rb +1 -1
  50. data/lib/fog/slicehost/requests/get_flavors.rb +1 -1
  51. data/lib/fog/slicehost/requests/get_image.rb +1 -1
  52. data/lib/fog/slicehost/requests/get_images.rb +1 -1
  53. data/lib/fog/slicehost/requests/get_slice.rb +1 -1
  54. data/lib/fog/slicehost/requests/get_slices.rb +1 -1
  55. data/lib/fog/slicehost/requests/reboot_slice.rb +1 -1
  56. data/lib/fog/ssh.rb +1 -1
  57. data/lib/fog/terremark/requests/shared/add_internet_service.rb +1 -1
  58. data/lib/fog/terremark/requests/shared/add_node_service.rb +1 -1
  59. data/lib/fog/terremark/requests/shared/create_internet_service.rb +1 -1
  60. data/lib/fog/terremark/requests/shared/delete_internet_service.rb +1 -1
  61. data/lib/fog/terremark/requests/shared/delete_node_service.rb +1 -1
  62. data/lib/fog/terremark/requests/shared/delete_public_ip.rb +1 -1
  63. data/lib/fog/terremark/requests/shared/delete_vapp.rb +1 -1
  64. data/lib/fog/terremark/requests/shared/deploy_vapp.rb +1 -1
  65. data/lib/fog/terremark/requests/shared/get_catalog.rb +1 -1
  66. data/lib/fog/terremark/requests/shared/get_catalog_item.rb +1 -1
  67. data/lib/fog/terremark/requests/shared/get_internet_services.rb +1 -1
  68. data/lib/fog/terremark/requests/shared/get_network_ips.rb +1 -1
  69. data/lib/fog/terremark/requests/shared/get_node_services.rb +1 -1
  70. data/lib/fog/terremark/requests/shared/get_public_ip.rb +1 -1
  71. data/lib/fog/terremark/requests/shared/get_task.rb +1 -1
  72. data/lib/fog/terremark/requests/shared/get_tasks_list.rb +1 -1
  73. data/lib/fog/terremark/requests/shared/get_vapp.rb +1 -1
  74. data/lib/fog/terremark/requests/shared/get_vapp_template.rb +1 -1
  75. data/lib/fog/terremark/requests/shared/instantiate_vapp_template.rb +1 -1
  76. data/lib/fog/terremark/requests/shared/power_off.rb +1 -1
  77. data/lib/fog/terremark/requests/shared/power_on.rb +1 -1
  78. data/lib/fog/terremark/requests/shared/power_reset.rb +1 -1
  79. data/lib/fog/terremark/requests/shared/power_shutdown.rb +1 -1
  80. data/tests/aws/helper.rb +0 -89
  81. data/tests/aws/requests/ec2/address_tests.rb +10 -2
  82. data/tests/aws/requests/ec2/availability_zone_tests.rb +11 -2
  83. data/tests/aws/requests/ec2/key_pair_tests.rb +18 -3
  84. data/tests/aws/requests/ec2/region_tests.rb +10 -2
  85. data/tests/aws/requests/ec2/security_group_tests.rb +18 -2
  86. data/tests/aws/requests/ec2/snapshot_tests.rb +21 -4
  87. data/tests/aws/requests/ec2/volume_tests.rb +43 -8
  88. data/tests/helper_tests.rb +7 -36
  89. metadata +2 -2
@@ -26,7 +26,7 @@ module Fog
26
26
  class Mock
27
27
 
28
28
  def get_image_details(image_id)
29
- raise MockNotImplemented.new("Contributions welcome!")
29
+ Fog::Mock.not_implemented
30
30
  end
31
31
 
32
32
  end
@@ -23,7 +23,7 @@ module Fog
23
23
  class Mock
24
24
 
25
25
  def list_flavors
26
- raise MockNotImplemented.new("Contributions welcome!")
26
+ Fog::Mock.not_implemented
27
27
  end
28
28
 
29
29
  end
@@ -25,7 +25,7 @@ module Fog
25
25
  class Mock
26
26
 
27
27
  def list_flavors_detail
28
- raise MockNotImplemented.new("Contributions welcome!")
28
+ Fog::Mock.not_implemented
29
29
  end
30
30
 
31
31
  end
@@ -23,7 +23,7 @@ module Fog
23
23
  class Mock
24
24
 
25
25
  def reboot_server(server_id, type)
26
- raise MockNotImplemented.new("Contributions welcome!")
26
+ Fog::Mock.not_implemented
27
27
  end
28
28
 
29
29
  end
@@ -39,7 +39,7 @@ module Fog
39
39
  class Mock
40
40
 
41
41
  def create_slice(flavor_id, image_id, name)
42
- raise MockNotImplemented.new("Contributions welcome!")
42
+ Fog::Mock.not_implemented
43
43
  end
44
44
 
45
45
  end
@@ -35,7 +35,7 @@ module Fog
35
35
  class Mock
36
36
 
37
37
  def delete_slice(slice_id)
38
- raise MockNotImplemented.new("Contributions welcome!")
38
+ Fog::Mock.not_implemented
39
39
  end
40
40
 
41
41
  end
@@ -27,7 +27,7 @@ module Fog
27
27
  class Mock
28
28
 
29
29
  def get_backups
30
- raise MockNotImplemented.new("Contributions welcome!")
30
+ Fog::Mock.not_implemented
31
31
  end
32
32
 
33
33
  end
@@ -30,7 +30,7 @@ module Fog
30
30
  class Mock
31
31
 
32
32
  def get_flavor(flavor_id)
33
- raise MockNotImplemented.new("Contributions welcome!")
33
+ Fog::Mock.not_implemented
34
34
  end
35
35
 
36
36
  end
@@ -27,7 +27,7 @@ module Fog
27
27
  class Mock
28
28
 
29
29
  def get_flavors
30
- raise MockNotImplemented.new("Contributions welcome!")
30
+ Fog::Mock.not_implemented
31
31
  end
32
32
 
33
33
  end
@@ -28,7 +28,7 @@ module Fog
28
28
  class Mock
29
29
 
30
30
  def get_image(image_id)
31
- raise MockNotImplemented.new("Contributions welcome!")
31
+ Fog::Mock.not_implemented
32
32
  end
33
33
 
34
34
  end
@@ -25,7 +25,7 @@ module Fog
25
25
  class Mock
26
26
 
27
27
  def get_images
28
- raise MockNotImplemented.new("Contributions welcome!")
28
+ Fog::Mock.not_implemented
29
29
  end
30
30
 
31
31
  end
@@ -36,7 +36,7 @@ module Fog
36
36
  class Mock
37
37
 
38
38
  def get_slice(id)
39
- raise MockNotImplemented.new("Contributions welcome!")
39
+ Fog::Mock.not_implemented
40
40
  end
41
41
 
42
42
  end
@@ -33,7 +33,7 @@ module Fog
33
33
  class Mock
34
34
 
35
35
  def get_slices
36
- raise MockNotImplemented.new("Contributions welcome!")
36
+ Fog::Mock.not_implemented
37
37
  end
38
38
 
39
39
  end
@@ -34,7 +34,7 @@ module Fog
34
34
  class Mock
35
35
 
36
36
  def get_slice(id)
37
- raise MockNotImplemented.new("Contributions welcome!")
37
+ Fog::Mock.not_implemented
38
38
  end
39
39
 
40
40
  end
@@ -31,7 +31,7 @@ module Fog
31
31
  end
32
32
 
33
33
  def run(commands)
34
- raise MockNotImplemented.new("Contributions welcome!")
34
+ Fog::Mock.not_implemented
35
35
  end
36
36
 
37
37
  end
@@ -54,7 +54,7 @@ module Fog
54
54
  module Mock
55
55
 
56
56
  def add_internet_service(ip_id)
57
- raise MockNotImplemented.new("Contributions welcome!")
57
+ Fog::Mock.not_implemented
58
58
  end
59
59
 
60
60
  end
@@ -54,7 +54,7 @@ module Fog
54
54
  module Mock
55
55
 
56
56
  def add_node_service(ip)
57
- raise MockNotImplemented.new("Contributions welcome!")
57
+ Fog::Mock.not_implemented
58
58
  end
59
59
 
60
60
  end
@@ -54,7 +54,7 @@ module Fog
54
54
  module Mock
55
55
 
56
56
  def create_internet_service(vdc_id)
57
- raise MockNotImplemented.new("Contributions welcome!")
57
+ Fog::Mock.not_implemented
58
58
  end
59
59
 
60
60
  end
@@ -21,7 +21,7 @@ module Fog
21
21
  module Mock
22
22
 
23
23
  def delete_internet_service(internet_service_id)
24
- raise MockNotImplemented.new("Contributions welcome!")
24
+ Fog::Mock.not_implemented
25
25
  end
26
26
 
27
27
  end
@@ -21,7 +21,7 @@ module Fog
21
21
  module Mock
22
22
 
23
23
  def delete_node_service(node_id)
24
- raise MockNotImplemented.new("Contributions welcome!")
24
+ Fog::Mock.not_implemented
25
25
  end
26
26
 
27
27
  end
@@ -21,7 +21,7 @@ module Fog
21
21
  module Mock
22
22
 
23
23
  def delete_public_ip(public_ip_id)
24
- raise MockNotImplemented.new("Contributions welcome!")
24
+ Fog::Mock.not_implemented
25
25
  end
26
26
 
27
27
  end
@@ -21,7 +21,7 @@ module Fog
21
21
  module Mock
22
22
 
23
23
  def delete_vapp(vapp_id)
24
- raise MockNotImplemented.new("Contributions welcome!")
24
+ Fog::Mock.not_implemented
25
25
  end
26
26
 
27
27
  end
@@ -34,7 +34,7 @@ module Fog
34
34
  module Mock
35
35
 
36
36
  def deploy_vapp(vapp_id)
37
- raise MockNotImplemented.new("Contributions welcome!")
37
+ Fog::Mock.not_implemented
38
38
  end
39
39
 
40
40
  end
@@ -31,7 +31,7 @@ module Fog
31
31
  module Mock
32
32
 
33
33
  def get_catalog(vdc_id)
34
- raise MockNotImplemented.new("Contributions welcome!")
34
+ Fog::Mock.not_implemented
35
35
  end
36
36
 
37
37
  end
@@ -34,7 +34,7 @@ module Fog
34
34
  module Mock
35
35
 
36
36
  def get_catalog_item(catalog_item_id)
37
- raise MockNotImplemented.new("Contributions welcome!")
37
+ Fog::Mock.not_implemented
38
38
  end
39
39
 
40
40
  end
@@ -34,7 +34,7 @@ module Fog
34
34
  module Mock
35
35
 
36
36
  def get_internet_services(vdc_id)
37
- raise MockNotImplemented.new("Contributions welcome!")
37
+ Fog::Mock.not_implemented
38
38
  end
39
39
 
40
40
  end
@@ -30,7 +30,7 @@ module Fog
30
30
  module Mock
31
31
 
32
32
  def get_network_ips(network_id)
33
- raise MockNotImplemented.new("Contributions welcome!")
33
+ Fog::Mock.not_implemented
34
34
  end
35
35
 
36
36
  end
@@ -29,7 +29,7 @@ module Fog
29
29
  module Mock
30
30
 
31
31
  def get_node_services(vdc_id)
32
- raise MockNotImplemented.new("Contributions welcome!")
32
+ Fog::Mock.not_implemented
33
33
  end
34
34
 
35
35
  end
@@ -32,7 +32,7 @@ module Fog
32
32
  module Mock
33
33
 
34
34
  def get_public_ip(public_ip_id)
35
- raise MockNotImplemented.new("Contributions welcome!")
35
+ Fog::Mock.not_implemented
36
36
  end
37
37
 
38
38
  end
@@ -38,7 +38,7 @@ module Fog
38
38
  module Mock
39
39
 
40
40
  def get_task(task_id)
41
- raise MockNotImplemented.new("Contributions welcome!")
41
+ Fog::Mock.not_implemented
42
42
  end
43
43
 
44
44
  end
@@ -31,7 +31,7 @@ module Fog
31
31
  module Mock
32
32
 
33
33
  def get_tasks_list(tasks_list_id)
34
- raise MockNotImplemented.new("Contributions welcome!")
34
+ Fog::Mock.not_implemented
35
35
  end
36
36
 
37
37
  end
@@ -41,7 +41,7 @@ module Fog
41
41
  module Mock
42
42
 
43
43
  def get_vapp(vapp_id)
44
- raise MockNotImplemented.new("Contributions welcome!")
44
+ Fog::Mock.not_implemented
45
45
  end
46
46
 
47
47
  end
@@ -34,7 +34,7 @@ module Fog
34
34
  module Mock
35
35
 
36
36
  def get_vapp_template(vapp_template_id)
37
- raise MockNotImplemented.new("Contributions welcome!")
37
+ Fog::Mock.not_implemented
38
38
  end
39
39
 
40
40
  end
@@ -70,7 +70,7 @@ DATA
70
70
  module Mock
71
71
 
72
72
  def instatiate_vapp_template(vapp_template_id)
73
- raise MockNotImplemented.new("Contributions welcome!")
73
+ Fog::Mock.not_implemented
74
74
  end
75
75
 
76
76
  end
@@ -34,7 +34,7 @@ module Fog
34
34
  module Mock
35
35
 
36
36
  def power_off(vapp_id)
37
- raise MockNotImplemented.new("Contributions welcome!")
37
+ Fog::Mock.not_implemented
38
38
  end
39
39
 
40
40
  end
@@ -34,7 +34,7 @@ module Fog
34
34
  module Mock
35
35
 
36
36
  def power_on(vapp_id)
37
- raise MockNotImplemented.new("Contributions welcome!")
37
+ Fog::Mock.not_implemented
38
38
  end
39
39
 
40
40
  end
@@ -34,7 +34,7 @@ module Fog
34
34
  module Mock
35
35
 
36
36
  def reset(vapp_id)
37
- raise MockNotImplemented.new("Contributions welcome!")
37
+ Fog::Mock.not_implemented
38
38
  end
39
39
 
40
40
  end
@@ -23,7 +23,7 @@ module Fog
23
23
  module Mock
24
24
 
25
25
  def power_shutdown(vapp_id)
26
- raise MockNotImplemented.new("Contributions welcome!")
26
+ Fog::Mock.not_implemented
27
27
  end
28
28
 
29
29
  end
@@ -33,100 +33,11 @@ module AWS
33
33
 
34
34
  module Formats
35
35
 
36
- ADDRESSES = {
37
- 'addressesSet' => [{
38
- 'instanceId' => NilClass,
39
- 'publicIp' => String
40
- }],
41
- 'requestId' => String
42
- }
43
-
44
- AVAILABILITY_ZONES = {
45
- 'availabilityZoneInfo' => [{
46
- 'regionName' => String,
47
- 'zoneName' => String,
48
- 'zoneState' => String
49
- }],
50
- 'requestId' => String
51
- }
52
-
53
36
  BASIC = {
54
37
  'requestId' => String,
55
38
  'return' => ::Fog::Boolean
56
39
  }
57
40
 
58
- REGIONS = {
59
- 'regionInfo' => [{
60
- 'regionEndpoint' => String,
61
- 'regionName' => String
62
- }],
63
- 'requestId' => String
64
- }
65
-
66
- SECURITY_GROUPS = {
67
- 'requestId' => String,
68
- 'securityGroupInfo' => [{
69
- 'groupDescription' => String,
70
- 'groupName' => String,
71
- 'ipPermissions' => [{
72
- 'fromPort' => Integer,
73
- 'groups' => [{ 'groupName' => String, 'userId' => String }],
74
- 'ipProtocol' => String,
75
- 'ipRanges' => [],
76
- 'toPort' => Integer,
77
- }],
78
- 'ownerId' => String
79
- }]
80
- }
81
-
82
- SNAPSHOT = {
83
- 'description' => NilClass,
84
- 'ownerId' => String,
85
- 'progress' => String,
86
- 'snapshotId' => String,
87
- 'startTime' => Time,
88
- 'status' => String,
89
- 'volumeId' => String,
90
- 'volumeSize' => Integer
91
- }
92
-
93
- SNAPSHOTS = {
94
- 'requestId' => String,
95
- 'snapshotSet' => [SNAPSHOT]
96
- }
97
-
98
- VOLUME = {
99
- 'availabilityZone' => String,
100
- 'createTime' => Time,
101
- 'requestId' => String,
102
- 'size' => Integer,
103
- 'snapshotId' => NilClass,
104
- 'status' => String,
105
- 'volumeId' => String
106
- }
107
-
108
- VOLUME_ATTACHMENT = {
109
- 'attachTime' => Time,
110
- 'device' => String,
111
- 'instanceId' => String,
112
- 'requestId' => String,
113
- 'status' => String,
114
- 'volumeId' => String
115
- }
116
-
117
- VOLUMES = {
118
- 'volumeSet' => [{
119
- 'availabilityZone' => String,
120
- 'attachmentSet' => [],
121
- 'createTime' => Time,
122
- 'size' => Integer,
123
- 'snapshotId' => NilClass,
124
- 'status' => String,
125
- 'volumeId' => String
126
- }],
127
- 'requestId' => String
128
- }
129
-
130
41
  end
131
42
 
132
43
  end