fog-digitalocean 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -2
  3. data/README.md +1 -2
  4. data/lib/fog/bin/digitalocean.rb +30 -0
  5. data/lib/fog/digitalocean/compute.rb +27 -15
  6. data/lib/fog/digitalocean/models/compute/volume.rb +15 -0
  7. data/lib/fog/digitalocean/models/compute/volumes.rb +42 -0
  8. data/lib/fog/digitalocean/requests/compute/attach_volume.rb +122 -0
  9. data/lib/fog/digitalocean/requests/compute/create_server.rb +2 -0
  10. data/lib/fog/digitalocean/requests/compute/create_volume.rb +50 -0
  11. data/lib/fog/digitalocean/requests/compute/destroy_volume.rb +32 -0
  12. data/lib/fog/digitalocean/requests/compute/detach_volume.rb +121 -0
  13. data/lib/fog/digitalocean/requests/compute/get_image_details.rb +1 -1
  14. data/lib/fog/digitalocean/requests/compute/get_volume_details.rb +60 -0
  15. data/lib/fog/digitalocean/requests/compute/list_volume_actions.rb +64 -0
  16. data/lib/fog/digitalocean/requests/compute/list_volumes.rb +64 -0
  17. data/lib/fog/digitalocean/requests/compute/resize_volume.rb +65 -0
  18. data/lib/fog/digitalocean/version.rb +1 -1
  19. data/tests/digitalocean/requests/compute/attach_volume_tests.rb +10 -0
  20. data/tests/digitalocean/requests/compute/create_volume_tests.rb +10 -0
  21. data/tests/digitalocean/requests/{compute_v2 → compute}/list_ssh_keys_tests.rb +2 -2
  22. data/tests/digitalocean/requests/compute/list_volumes_tests.rb +23 -0
  23. metadata +21 -136
  24. data/benchs/each_provider.sh +0 -6
  25. data/benchs/each_service.sh +0 -6
  26. data/benchs/fog_vs.rb +0 -106
  27. data/benchs/load_times.rb +0 -37
  28. data/benchs/params.rb +0 -43
  29. data/benchs/parse_vs_push.rb +0 -67
  30. data/spec/fog/account_spec.rb +0 -14
  31. data/spec/fog/billing_spec.rb +0 -14
  32. data/spec/fog/bin/atmos_spec.rb +0 -33
  33. data/spec/fog/bin/aws_spec.rb +0 -98
  34. data/spec/fog/bin/baremetalcloud_spec.rb +0 -33
  35. data/spec/fog/bin/bluebox_spec.rb +0 -55
  36. data/spec/fog/bin/brightbox_spec.rb +0 -30
  37. data/spec/fog/bin/clodo_spec.rb +0 -9
  38. data/spec/fog/bin/cloudsigma_spec.rb +0 -9
  39. data/spec/fog/bin/cloudstack_spec.rb +0 -9
  40. data/spec/fog/bin/digitalocean_spec.rb +0 -9
  41. data/spec/fog/bin/dnsimple_spec.rb +0 -9
  42. data/spec/fog/bin/dnsmadeeasy_spec.rb +0 -9
  43. data/spec/fog/bin/dreamhost_spec.rb +0 -9
  44. data/spec/fog/bin/dynect_spec.rb +0 -9
  45. data/spec/fog/bin/ecloud_spec.rb +0 -10
  46. data/spec/fog/bin/fogdocker_spec.rb +0 -10
  47. data/spec/fog/bin/glesys_spec.rb +0 -10
  48. data/spec/fog/bin/gogrid_spec.rb +0 -10
  49. data/spec/fog/bin/google_spec.rb +0 -10
  50. data/spec/fog/bin/ibm_spec.rb +0 -10
  51. data/spec/fog/bin/internetarchive_spec.rb +0 -10
  52. data/spec/fog/bin/joyent_spec.rb +0 -10
  53. data/spec/fog/bin/linode_spec.rb +0 -10
  54. data/spec/fog/bin/local_spec.rb +0 -10
  55. data/spec/fog/bin/ninefold_spec.rb +0 -10
  56. data/spec/fog/bin/opennebula_spec.rb +0 -10
  57. data/spec/fog/bin/openstack_spec.rb +0 -10
  58. data/spec/fog/bin/openvz_spec.rb +0 -10
  59. data/spec/fog/bin/ovirt_spec.rb +0 -10
  60. data/spec/fog/bin/powerdns_spec.rb +0 -9
  61. data/spec/fog/bin/profitbricks_spec.rb +0 -10
  62. data/spec/fog/bin/rackspace_spec.rb +0 -10
  63. data/spec/fog/bin/rage4_spec.rb +0 -10
  64. data/spec/fog/bin/riakcs_spec.rb +0 -10
  65. data/spec/fog/bin/sakuracloud_spec.rb +0 -10
  66. data/spec/fog/bin/serverlove_spec.rb +0 -10
  67. data/spec/fog/bin/softlayer_spec.rb +0 -10
  68. data/spec/fog/bin/stormondemand_spec.rb +0 -10
  69. data/spec/fog/bin/vcloud_spec.rb +0 -10
  70. data/spec/fog/bin/vclouddirector_spec.rb +0 -10
  71. data/spec/fog/bin/vmfusion_spec.rb +0 -10
  72. data/spec/fog/bin/voxel_spec.rb +0 -10
  73. data/spec/fog/bin/vsphere_spec.rb +0 -10
  74. data/spec/fog/bin/xenserver_spec.rb +0 -10
  75. data/spec/fog/bin/zerigo_spec.rb +0 -10
  76. data/spec/fog/bin_spec.rb +0 -161
  77. data/spec/fog/cdn_spec.rb +0 -14
  78. data/spec/fog/compute_spec.rb +0 -19
  79. data/spec/fog/dns_spec.rb +0 -19
  80. data/spec/fog/identity_spec.rb +0 -14
  81. data/spec/fog/image_spec.rb +0 -14
  82. data/spec/fog/metering_spec.rb +0 -14
  83. data/spec/fog/monitoring_spec.rb +0 -14
  84. data/spec/fog/network_spec.rb +0 -14
  85. data/spec/fog/orchestration_spec.rb +0 -14
  86. data/spec/fog/storage_spec.rb +0 -14
  87. data/spec/fog/support_spec.rb +0 -14
  88. data/spec/fog/volume_spec.rb +0 -14
  89. data/spec/fog/vpn_spec.rb +0 -14
  90. data/spec/fog/xml/connection_spec.rb +0 -33
  91. data/spec/helpers/bin.rb +0 -34
  92. data/spec/spec_helper.rb +0 -18
@@ -1,55 +0,0 @@
1
- require "spec_helper"
2
- require "fog/bin"
3
- require "helpers/bin"
4
-
5
- describe Bluebox do
6
- include Fog::BinSpec
7
-
8
- let(:subject) { Bluebox }
9
-
10
- describe "#services" do
11
- it "includes all services" do
12
- assert_includes Bluebox.services, :compute
13
- assert_includes Bluebox.services, :dns
14
- assert_includes Bluebox.services, :blb
15
- end
16
- end
17
-
18
- describe "#class_for" do
19
- describe "when requesting compute service" do
20
- it "returns correct class" do
21
- assert_equal Fog::Compute::Bluebox, Bluebox.class_for(:compute)
22
- end
23
- end
24
-
25
- describe "when requesting dns service" do
26
- it "returns correct class" do
27
- assert_equal Fog::DNS::Bluebox, Bluebox.class_for(:dns)
28
- end
29
- end
30
-
31
- describe "when requesting blb service" do
32
- it "returns correct class" do
33
- assert_equal Fog::Bluebox::BLB, Bluebox.class_for(:blb)
34
- end
35
- end
36
- end
37
-
38
- describe "#[]" do
39
- describe "when requesting compute service" do
40
- it "returns instance" do
41
- Fog::Compute::Bluebox.stub(:new, "instance") do
42
- assert_equal "instance", Bluebox[:compute]
43
- end
44
- end
45
- end
46
-
47
- describe "when requesting dns service" do
48
- it "returns instance" do
49
- Fog::DNS::Bluebox.stub(:new, "instance") do
50
- assert_equal "instance", Bluebox[:dns]
51
- end
52
- end
53
- end
54
- end
55
- end
@@ -1,30 +0,0 @@
1
- require "spec_helper"
2
- require "fog/bin"
3
- require "helpers/bin"
4
-
5
- describe Brightbox do
6
- include Fog::BinSpec
7
-
8
- let(:subject) { Brightbox }
9
-
10
- describe "#services" do
11
- it "includes all services" do
12
- assert_includes Brightbox.services, :compute
13
- assert_includes Brightbox.services, :storage
14
- end
15
- end
16
-
17
- describe "#class_for" do
18
- describe "when requesting compute service" do
19
- it "returns correct class" do
20
- assert_equal Fog::Compute::Brightbox, Brightbox.class_for(:compute)
21
- end
22
- end
23
-
24
- describe "when requesting storage service" do
25
- it "returns correct class" do
26
- assert_equal Fog::Storage::Brightbox, Brightbox.class_for(:storage)
27
- end
28
- end
29
- end
30
- end
@@ -1,9 +0,0 @@
1
- require "spec_helper"
2
- require "fog/bin"
3
- require "helpers/bin"
4
-
5
- describe Clodo do
6
- include Fog::BinSpec
7
-
8
- let(:subject) { Clodo }
9
- end
@@ -1,9 +0,0 @@
1
- require "spec_helper"
2
- require "fog/bin"
3
- require "helpers/bin"
4
-
5
- describe CloudSigma do
6
- include Fog::BinSpec
7
-
8
- let(:subject) { CloudSigma }
9
- end
@@ -1,9 +0,0 @@
1
- require "spec_helper"
2
- require "fog/bin"
3
- require "helpers/bin"
4
-
5
- describe Cloudstack do
6
- include Fog::BinSpec
7
-
8
- let(:subject) { Cloudstack }
9
- end
@@ -1,9 +0,0 @@
1
- require "spec_helper"
2
- require "fog/bin"
3
- require "helpers/bin"
4
-
5
- describe DigitalOcean do
6
- include Fog::BinSpec
7
-
8
- let(:subject) { DigitalOcean }
9
- end
@@ -1,9 +0,0 @@
1
- require "spec_helper"
2
- require "fog/bin"
3
- require "helpers/bin"
4
-
5
- describe DNSimple do
6
- include Fog::BinSpec
7
-
8
- let(:subject) { DNSimple }
9
- end
@@ -1,9 +0,0 @@
1
- require "spec_helper"
2
- require "fog/bin"
3
- require "helpers/bin"
4
-
5
- describe DNSMadeEasy do
6
- include Fog::BinSpec
7
-
8
- let(:subject) { DNSMadeEasy }
9
- end
@@ -1,9 +0,0 @@
1
- require "spec_helper"
2
- require "fog/bin"
3
- require "helpers/bin"
4
-
5
- describe Dreamhost do
6
- include Fog::BinSpec
7
-
8
- let(:subject) { Dreamhost }
9
- end
@@ -1,9 +0,0 @@
1
- require "spec_helper"
2
- require "fog/bin"
3
- require "helpers/bin"
4
-
5
- describe Dynect do
6
- include Fog::BinSpec
7
-
8
- let(:subject) { Dynect }
9
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe Ecloud do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { Ecloud }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe Fogdocker do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { Fogdocker }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe Glesys do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { Glesys }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe GoGrid do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { GoGrid }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe Google do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { Google }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe IBM do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { IBM }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe InternetArchive do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { InternetArchive }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe Joyent do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { Joyent }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe Linode do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { Linode }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe Local do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { Local }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe Ninefold do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { Ninefold }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe OpenNebula do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { OpenNebula }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe OpenStack do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { OpenStack }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe Openvz do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { Openvz }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe Ovirt do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { Ovirt }
10
- end
@@ -1,9 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe Fog::PowerDNS do
7
- include Fog::BinSpec
8
- let(:subject) { PowerDNS }
9
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe ProfitBricks do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { ProfitBricks }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe Rackspace do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { Rackspace }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe Rage4 do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { Rage4 }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe RiakCS do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { RiakCS }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe SakuraCloud do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { SakuraCloud }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe Serverlove do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { Serverlove }
10
- end
@@ -1,10 +0,0 @@
1
- require "minitest/autorun"
2
- require "fog"
3
- require "fog/bin"
4
- require "helpers/bin"
5
-
6
- describe Softlayer do
7
- include Fog::BinSpec
8
-
9
- let(:subject) { Softlayer }
10
- end