fog 0.0.67 → 0.0.68
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/VERSION.yml +1 -1
- data/fog.gemspec +24 -6
- data/lib/fog/aws/ec2.rb +48 -47
- data/lib/fog/aws/requests/ec2/describe_instances.rb +1 -1
- data/lib/fog/aws/requests/ec2/describe_snapshots.rb +3 -3
- data/lib/fog/aws/requests/ec2/run_instances.rb +2 -3
- data/lib/fog/aws/s3.rb +18 -17
- data/lib/fog/aws/simpledb.rb +11 -10
- data/lib/fog/bin.rb +12 -4
- data/lib/fog/rackspace/files.rb +16 -15
- data/lib/fog/rackspace/requests/servers/get_image_details.rb +35 -0
- data/lib/fog/rackspace/servers.rb +26 -24
- data/lib/fog/slicehost.rb +18 -17
- data/lib/fog/slicehost/models/flavors.rb +11 -3
- data/lib/fog/slicehost/models/images.rb +14 -4
- data/lib/fog/slicehost/models/servers.rb +10 -2
- data/lib/fog/terremark.rb +83 -17
- data/lib/fog/terremark/parsers/get_public_Ips.rb +28 -0
- data/lib/fog/terremark/parsers/internet_service.rb +63 -0
- data/lib/fog/terremark/parsers/node_service.rb +30 -0
- data/lib/fog/terremark/requests/add_internet_service.rb +63 -0
- data/lib/fog/terremark/requests/add_node_service.rb +63 -0
- data/lib/fog/terremark/requests/create_internet_service.rb +63 -0
- data/lib/fog/terremark/requests/delete_internet_service.rb +40 -0
- data/lib/fog/terremark/requests/delete_node_service.rb +40 -0
- data/lib/fog/terremark/requests/deploy_vapp.rb +2 -2
- data/lib/fog/terremark/requests/get_public_ips.rb +37 -0
- data/lib/fog/terremark/requests/get_task.rb +1 -1
- data/lib/fog/terremark/requests/get_tasks_list.rb +1 -1
- data/lib/fog/terremark/requests/get_vapp.rb +1 -1
- data/lib/fog/terremark/requests/instantiate_vapp_template.rb +4 -8
- data/lib/fog/terremark/requests/power_off.rb +1 -1
- data/lib/fog/terremark/requests/power_on.rb +1 -1
- data/lib/fog/terremark/requests/reset.rb +1 -1
- data/lib/fog/terremark/requests/shutdown.rb +1 -1
- data/tests/{test_helper.rb → helper.rb} +8 -7
- data/tests/{test_helper_tests.rb → helper_tests.rb} +7 -9
- data/tests/rackspace/helper.rb +64 -0
- data/tests/rackspace/requests/servers/create_image_tests.rb +22 -0
- data/tests/rackspace/requests/servers/create_server_tests.rb +19 -0
- data/tests/rackspace/requests/servers/delete_image_tests.rb +32 -0
- data/tests/rackspace/requests/servers/delete_server_tests.rb +26 -0
- data/tests/rackspace/requests/servers/get_flavor_details_tests.rb +25 -0
- data/tests/rackspace/requests/servers/get_image_details_tests.rb +25 -0
- data/tests/rackspace/requests/servers/get_server_details_tests.rb +31 -0
- data/tests/slicehost/{slicehost_helper.rb → helper.rb} +0 -0
- data/tests/slicehost/requests/create_slice_tests.rb +1 -1
- data/tests/slicehost/requests/get_backups_tests.rb +1 -1
- data/tests/slicehost/requests/get_flavor_tests.rb +5 -2
- data/tests/slicehost/requests/get_flavors_tests.rb +5 -2
- data/tests/slicehost/requests/get_image_tests.rb +5 -2
- data/tests/slicehost/requests/get_images_tests.rb +5 -2
- data/tests/slicehost/requests/get_slice_tests.rb +2 -2
- data/tests/slicehost/requests/get_slices_tests.rb +5 -2
- data/tests/slicehost/requests/reboot_slice_tests.rb +1 -1
- metadata +24 -6
@@ -0,0 +1,22 @@
|
|
1
|
+
Shindo.tests('Rackspace::Servers#create_image', 'rackspace') do
|
2
|
+
tests('success') do
|
3
|
+
|
4
|
+
before do
|
5
|
+
@server_id = Rackspace[:servers].create_server(1, 3, 'fogcreateserver').body['server']['id']
|
6
|
+
wait_for { Rackspace[:servers].get_server_details(@server_id).body['server']['status'] == 'ACTIVE' }
|
7
|
+
@data = Rackspace[:servers].create_image(@server_id).body['image']
|
8
|
+
@image_id = @data['id']
|
9
|
+
end
|
10
|
+
|
11
|
+
after do
|
12
|
+
Rackspace[:servers].delete_server(@server_id)
|
13
|
+
wait_for { Rackspace[:servers].get_image_details(@image_id).body['image']['status'] == 'ACTIVE' }
|
14
|
+
Rackspace[:servers].delete_image(@image_id)
|
15
|
+
end
|
16
|
+
|
17
|
+
test('has proper output format') do
|
18
|
+
validate_format(@data, Rackspace::Servers::Formats::IMAGE)
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Shindo.tests('Rackspace::Servers#create_server', 'rackspace') do
|
2
|
+
tests('success') do
|
3
|
+
|
4
|
+
before do
|
5
|
+
@data = Rackspace[:servers].create_server(1, 3, 'fogcreateserver').body['server']
|
6
|
+
@server_id = @data['id']
|
7
|
+
end
|
8
|
+
|
9
|
+
after do
|
10
|
+
wait_for { Rackspace[:servers].get_server_details(@server_id).body['server']['status'] == 'ACTIVE' }
|
11
|
+
Rackspace[:servers].delete_server(@server_id)
|
12
|
+
end
|
13
|
+
|
14
|
+
test('has proper output format') do
|
15
|
+
validate_format(@data, Rackspace::Servers::Formats::SERVER.merge('adminPass' => String))
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
Shindo.tests('Rackspace::Servers#delete_image', 'rackspace') do
|
2
|
+
tests('success') do
|
3
|
+
|
4
|
+
before do
|
5
|
+
@server_id = Rackspace[:servers].create_server(1, 3, 'fogcreateserver').body['server']['id']
|
6
|
+
@image_id = Rackspace[:servers].create_image(@server_id).body['image']['id']
|
7
|
+
end
|
8
|
+
|
9
|
+
after do
|
10
|
+
wait_for { Rackspace[:servers].get_server_details(@server_id).body['server']['status'] == 'ACTIVE' }
|
11
|
+
Rackspace[:servers].delete_server(@server_id)
|
12
|
+
end
|
13
|
+
|
14
|
+
test('has proper output format') do
|
15
|
+
wait_for { Rackspace[:servers].get_image_details(@image_id).body['image']['status'] == 'ACTIVE' }
|
16
|
+
Rackspace[:servers].delete_image(@image_id)
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
tests('failure') do
|
21
|
+
|
22
|
+
test('raises NotFound error if image does not exist') do
|
23
|
+
begin
|
24
|
+
Rackspace[:servers].delete_image(0)
|
25
|
+
false
|
26
|
+
rescue Excon::Errors::NotFound
|
27
|
+
true
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
Shindo.tests('Rackspace::Servers#delete_server', 'rackspace') do
|
2
|
+
tests('success') do
|
3
|
+
|
4
|
+
before do
|
5
|
+
@server_id = Rackspace[:servers].create_server(1, 3, 'fogcreateserver').body['server']['id']
|
6
|
+
end
|
7
|
+
|
8
|
+
test('has proper output format') do
|
9
|
+
wait_for { Rackspace[:servers].get_server_details(@server_id).body['server']['status'] == 'ACTIVE' }
|
10
|
+
Rackspace[:servers].delete_server(@server_id)
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
tests('failure') do
|
15
|
+
|
16
|
+
test('raises NotFound error if server does not exist') do
|
17
|
+
begin
|
18
|
+
Rackspace[:servers].delete_server(0)
|
19
|
+
false
|
20
|
+
rescue Excon::Errors::NotFound
|
21
|
+
true
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
Shindo.tests('Rackspace::Servers#get_flavor_details', 'rackspace') do
|
2
|
+
tests('success') do
|
3
|
+
|
4
|
+
before do
|
5
|
+
@data = Rackspace[:servers].get_flavor_details(1).body['flavor']
|
6
|
+
end
|
7
|
+
|
8
|
+
test('has proper output format') do
|
9
|
+
validate_format(@data, Rackspace::Servers::Formats::FLAVOR)
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
tests('failure') do
|
14
|
+
|
15
|
+
test('raises NotFound error if flavor does not exist') do
|
16
|
+
begin
|
17
|
+
Rackspace[:servers].get_flavor_details(0)
|
18
|
+
false
|
19
|
+
rescue Excon::Errors::NotFound
|
20
|
+
true
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
Shindo.tests('Rackspace::Servers#get_image_details', 'rackspace') do
|
2
|
+
tests('success') do
|
3
|
+
|
4
|
+
before do
|
5
|
+
@data = Rackspace[:servers].get_image_details(3).body['image']
|
6
|
+
end
|
7
|
+
|
8
|
+
test('has proper output format') do
|
9
|
+
validate_format(@data, Rackspace::Servers::Formats::IMAGE)
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
tests('failure') do
|
14
|
+
|
15
|
+
test('raises NotFound error if image does not exist') do
|
16
|
+
begin
|
17
|
+
Rackspace[:servers].get_image_details(0)
|
18
|
+
false
|
19
|
+
rescue Excon::Errors::NotFound
|
20
|
+
true
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
Shindo.tests('Rackspace::Servers#get_server_details', 'rackspace') do
|
2
|
+
tests('success') do
|
3
|
+
|
4
|
+
before do
|
5
|
+
@server_id = Rackspace[:servers].create_server(1, 3, 'fogcreateserver').body['server']['id']
|
6
|
+
@data = Rackspace[:servers].get_server_details(@server_id).body['server']
|
7
|
+
end
|
8
|
+
|
9
|
+
after do
|
10
|
+
wait_for { Rackspace[:servers].get_server_details(@server_id).body['server']['status'] == 'ACTIVE' }
|
11
|
+
Rackspace[:servers].delete_server(@server_id)
|
12
|
+
end
|
13
|
+
|
14
|
+
test('has proper output format') do
|
15
|
+
validate_format(@data, Rackspace::Servers::Formats::SERVER)
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
tests('failure') do
|
20
|
+
|
21
|
+
test('raises NotFound error if server does not exist') do
|
22
|
+
begin
|
23
|
+
Rackspace[:servers].get_server_details(0)
|
24
|
+
false
|
25
|
+
rescue Excon::Errors::NotFound
|
26
|
+
true
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
File without changes
|
@@ -12,7 +12,7 @@ Shindo.tests('Slicehost#create_slice', 'slicehost') do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
test('has proper output format') do
|
15
|
-
|
15
|
+
validate_format(@data, Slicehost::Formats::SLICE.merge('root-password' => String))
|
16
16
|
end
|
17
17
|
|
18
18
|
end
|
@@ -7,7 +7,7 @@ Shindo.tests('Slicehost#get_backups', 'slicehost') do
|
|
7
7
|
|
8
8
|
# TODO: ensure this still works with a non-empty list
|
9
9
|
test('has proper output format') do
|
10
|
-
|
10
|
+
validate_format(@data, { 'backups' => [Slicehost::Formats::BACKUP] })
|
11
11
|
end
|
12
12
|
|
13
13
|
end
|
@@ -1,9 +1,12 @@
|
|
1
1
|
Shindo.tests('Slicehost#get_flavor', 'slicehost') do
|
2
2
|
tests('success') do
|
3
3
|
|
4
|
-
|
4
|
+
before do
|
5
5
|
@data = Slicehost[:slices].get_flavor(1).body
|
6
|
-
|
6
|
+
end
|
7
|
+
|
8
|
+
test('has proper output format') do
|
9
|
+
validate_format(@data, Slicehost::Formats::FLAVOR)
|
7
10
|
end
|
8
11
|
|
9
12
|
end
|
@@ -1,9 +1,12 @@
|
|
1
1
|
Shindo.tests('Slicehost#get_flavors', 'slicehost') do
|
2
2
|
tests('success') do
|
3
3
|
|
4
|
-
|
4
|
+
before do
|
5
5
|
@data = Slicehost[:slices].get_flavors.body
|
6
|
-
|
6
|
+
end
|
7
|
+
|
8
|
+
test('has proper output format') do
|
9
|
+
validate_format(@data, { 'flavors' => [Slicehost::Formats::FLAVOR] })
|
7
10
|
end
|
8
11
|
|
9
12
|
end
|
@@ -1,9 +1,12 @@
|
|
1
1
|
Shindo.tests('Slicehost#get_image', 'slicehost') do
|
2
2
|
tests('success') do
|
3
3
|
|
4
|
-
|
4
|
+
before do
|
5
5
|
@data = Slicehost[:slices].get_image(3).body
|
6
|
-
|
6
|
+
end
|
7
|
+
|
8
|
+
test('has proper output format') do
|
9
|
+
validate_format(@data, Slicehost::Formats::IMAGE)
|
7
10
|
end
|
8
11
|
|
9
12
|
end
|
@@ -1,9 +1,12 @@
|
|
1
1
|
Shindo.tests('Slicehost#get_images', 'slicehost') do
|
2
2
|
tests('success') do
|
3
3
|
|
4
|
-
|
4
|
+
before do
|
5
5
|
@data = Slicehost[:slices].get_images.body
|
6
|
-
|
6
|
+
end
|
7
|
+
|
8
|
+
test('has proper output format') do
|
9
|
+
validate_format(@data, { 'images' => [Slicehost::Formats::IMAGE] })
|
7
10
|
end
|
8
11
|
|
9
12
|
end
|
@@ -4,6 +4,7 @@ Shindo.tests('Slicehost#get_slice', 'slicehost') do
|
|
4
4
|
before do
|
5
5
|
@data = Slicehost[:slices].create_slice(1, 3, 'foggetslice').body
|
6
6
|
@id = @data['id']
|
7
|
+
@data = Slicehost[:slices].get_slice(@id).body
|
7
8
|
end
|
8
9
|
|
9
10
|
after do
|
@@ -12,8 +13,7 @@ Shindo.tests('Slicehost#get_slice', 'slicehost') do
|
|
12
13
|
end
|
13
14
|
|
14
15
|
test('has proper output format') do
|
15
|
-
@data
|
16
|
-
validate_data_format(@data, Slicehost::Formats::SLICE)
|
16
|
+
validate_format(@data, Slicehost::Formats::SLICE)
|
17
17
|
end
|
18
18
|
|
19
19
|
end
|
@@ -1,9 +1,12 @@
|
|
1
1
|
Shindo.tests('Slicehost#get_slices', 'slicehost') do
|
2
2
|
tests('success') do
|
3
3
|
|
4
|
-
|
4
|
+
before do
|
5
5
|
@data = Slicehost[:slices].get_slices.body
|
6
|
-
|
6
|
+
end
|
7
|
+
|
8
|
+
test('has proper output format') do
|
9
|
+
validate_format(@data, { 'slices' => [Slicehost::Formats::SLICE] })
|
7
10
|
end
|
8
11
|
|
9
12
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 68
|
9
|
+
version: 0.0.68
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- geemus (Wesley Beary)
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-08 00:00:00 -07:00
|
18
18
|
default_executable: fog
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -253,6 +253,7 @@ files:
|
|
253
253
|
- lib/fog/rackspace/requests/servers/delete_image.rb
|
254
254
|
- lib/fog/rackspace/requests/servers/delete_server.rb
|
255
255
|
- lib/fog/rackspace/requests/servers/get_flavor_details.rb
|
256
|
+
- lib/fog/rackspace/requests/servers/get_image_details.rb
|
256
257
|
- lib/fog/rackspace/requests/servers/get_server_details.rb
|
257
258
|
- lib/fog/rackspace/requests/servers/list_addresses.rb
|
258
259
|
- lib/fog/rackspace/requests/servers/list_flavors.rb
|
@@ -298,18 +299,27 @@ files:
|
|
298
299
|
- lib/fog/terremark/parsers/get_catalog_item.rb
|
299
300
|
- lib/fog/terremark/parsers/get_organization.rb
|
300
301
|
- lib/fog/terremark/parsers/get_organizations.rb
|
302
|
+
- lib/fog/terremark/parsers/get_public_Ips.rb
|
301
303
|
- lib/fog/terremark/parsers/get_tasks_list.rb
|
302
304
|
- lib/fog/terremark/parsers/get_vapp_template.rb
|
303
305
|
- lib/fog/terremark/parsers/get_vdc.rb
|
304
306
|
- lib/fog/terremark/parsers/instantiate_vapp_template.rb
|
307
|
+
- lib/fog/terremark/parsers/internet_service.rb
|
308
|
+
- lib/fog/terremark/parsers/node_service.rb
|
305
309
|
- lib/fog/terremark/parsers/task.rb
|
306
310
|
- lib/fog/terremark/parsers/vapp.rb
|
311
|
+
- lib/fog/terremark/requests/add_internet_service.rb
|
312
|
+
- lib/fog/terremark/requests/add_node_service.rb
|
313
|
+
- lib/fog/terremark/requests/create_internet_service.rb
|
314
|
+
- lib/fog/terremark/requests/delete_internet_service.rb
|
315
|
+
- lib/fog/terremark/requests/delete_node_service.rb
|
307
316
|
- lib/fog/terremark/requests/delete_vapp.rb
|
308
317
|
- lib/fog/terremark/requests/deploy_vapp.rb
|
309
318
|
- lib/fog/terremark/requests/get_catalog.rb
|
310
319
|
- lib/fog/terremark/requests/get_catalog_item.rb
|
311
320
|
- lib/fog/terremark/requests/get_organization.rb
|
312
321
|
- lib/fog/terremark/requests/get_organizations.rb
|
322
|
+
- lib/fog/terremark/requests/get_public_ips.rb
|
313
323
|
- lib/fog/terremark/requests/get_task.rb
|
314
324
|
- lib/fog/terremark/requests/get_tasks_list.rb
|
315
325
|
- lib/fog/terremark/requests/get_vapp.rb
|
@@ -426,6 +436,17 @@ files:
|
|
426
436
|
- spec/slicehost/models/server_spec.rb
|
427
437
|
- spec/slicehost/models/servers_spec.rb
|
428
438
|
- spec/spec_helper.rb
|
439
|
+
- tests/helper.rb
|
440
|
+
- tests/helper_tests.rb
|
441
|
+
- tests/rackspace/helper.rb
|
442
|
+
- tests/rackspace/requests/servers/create_image_tests.rb
|
443
|
+
- tests/rackspace/requests/servers/create_server_tests.rb
|
444
|
+
- tests/rackspace/requests/servers/delete_image_tests.rb
|
445
|
+
- tests/rackspace/requests/servers/delete_server_tests.rb
|
446
|
+
- tests/rackspace/requests/servers/get_flavor_details_tests.rb
|
447
|
+
- tests/rackspace/requests/servers/get_image_details_tests.rb
|
448
|
+
- tests/rackspace/requests/servers/get_server_details_tests.rb
|
449
|
+
- tests/slicehost/helper.rb
|
429
450
|
- tests/slicehost/requests/create_slice_tests.rb
|
430
451
|
- tests/slicehost/requests/delete_slice_tests.rb
|
431
452
|
- tests/slicehost/requests/get_backups_tests.rb
|
@@ -436,9 +457,6 @@ files:
|
|
436
457
|
- tests/slicehost/requests/get_slice_tests.rb
|
437
458
|
- tests/slicehost/requests/get_slices_tests.rb
|
438
459
|
- tests/slicehost/requests/reboot_slice_tests.rb
|
439
|
-
- tests/slicehost/slicehost_helper.rb
|
440
|
-
- tests/test_helper.rb
|
441
|
-
- tests/test_helper_tests.rb
|
442
460
|
has_rdoc: true
|
443
461
|
homepage: http://github.com/geemus/fog
|
444
462
|
licenses: []
|