fog 1.28.0 → 1.29.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +111 -0
  3. data/CONTRIBUTING.md +255 -1
  4. data/Rakefile +1 -1
  5. data/fog.gemspec +41 -44
  6. data/lib/fog.rb +1 -0
  7. data/lib/fog/bin.rb +1 -0
  8. data/lib/fog/bin/openstack.rb +2 -0
  9. data/lib/fog/cloudsigma/mock_data.rb +37 -33
  10. data/lib/fog/dnsmadeeasy/models/dns/record.rb +1 -1
  11. data/lib/fog/fogdocker/requests/compute/api_version.rb +1 -1
  12. data/lib/fog/glesys/compute.rb +9 -1
  13. data/lib/fog/glesys/models/compute/server.rb +32 -21
  14. data/lib/fog/glesys/models/compute/ssh_key.rb +28 -0
  15. data/lib/fog/glesys/models/compute/ssh_keys.rb +21 -0
  16. data/lib/fog/glesys/requests/compute/edit.rb +11 -0
  17. data/lib/fog/glesys/requests/compute/ssh_key_add.rb +11 -0
  18. data/lib/fog/glesys/requests/compute/ssh_key_list.rb +11 -0
  19. data/lib/fog/glesys/requests/compute/ssh_key_remove.rb +11 -0
  20. data/lib/fog/google/compute.rb +2 -0
  21. data/lib/fog/google/models/compute/server.rb +14 -0
  22. data/lib/fog/google/requests/compute/start_server.rb +24 -0
  23. data/lib/fog/google/requests/compute/stop_server.rb +24 -0
  24. data/lib/fog/linode/compute.rb +7 -0
  25. data/lib/fog/linode/requests/compute/image_delete.rb +42 -0
  26. data/lib/fog/linode/requests/compute/image_list.rb +64 -0
  27. data/lib/fog/linode/requests/compute/linode_disk_createfromimage.rb +37 -0
  28. data/lib/fog/linode/requests/compute/linode_disk_duplicate.rb +33 -0
  29. data/lib/fog/linode/requests/compute/linode_disk_imagize.rb +37 -0
  30. data/lib/fog/linode/requests/compute/linode_disk_resize.rb +36 -0
  31. data/lib/fog/linode/requests/compute/linode_disk_update.rb +34 -0
  32. data/lib/fog/openstack.rb +1 -0
  33. data/lib/fog/openstack/compute.rb +12 -1
  34. data/lib/fog/openstack/core.rb +159 -5
  35. data/lib/fog/openstack/docs/planning.md +270 -0
  36. data/lib/fog/openstack/examples/planning/basics.rb +53 -0
  37. data/lib/fog/openstack/models/planning/plan.rb +81 -0
  38. data/lib/fog/openstack/models/planning/plans.rb +31 -0
  39. data/lib/fog/openstack/models/planning/role.rb +29 -0
  40. data/lib/fog/openstack/models/planning/roles.rb +16 -0
  41. data/lib/fog/openstack/planning.rb +235 -0
  42. data/lib/fog/openstack/requests/compute/get_hypervisor_statistics.rb +39 -0
  43. data/lib/fog/openstack/requests/identity/check_token.rb +4 -2
  44. data/lib/fog/openstack/requests/identity/validate_token.rb +4 -2
  45. data/lib/fog/openstack/requests/planning/add_role_to_plan.rb +40 -0
  46. data/lib/fog/openstack/requests/planning/create_plan.rb +33 -0
  47. data/lib/fog/openstack/requests/planning/delete_plan.rb +23 -0
  48. data/lib/fog/openstack/requests/planning/get_plan.rb +58 -0
  49. data/lib/fog/openstack/requests/planning/get_plan_templates.rb +28 -0
  50. data/lib/fog/openstack/requests/planning/list_plans.rb +60 -0
  51. data/lib/fog/openstack/requests/planning/list_roles.rb +38 -0
  52. data/lib/fog/openstack/requests/planning/patch_plan.rb +51 -0
  53. data/lib/fog/openstack/requests/planning/remove_role_from_plan.rb +32 -0
  54. data/lib/fog/ovirt/compute.rb +10 -0
  55. data/lib/fog/ovirt/models/compute/affinity_group.rb +25 -0
  56. data/lib/fog/ovirt/models/compute/affinity_groups.rb +20 -0
  57. data/lib/fog/ovirt/models/compute/server.rb +12 -0
  58. data/lib/fog/ovirt/models/compute/volume.rb +2 -0
  59. data/lib/fog/ovirt/requests/compute/add_to_affinity_group.rb +21 -0
  60. data/lib/fog/ovirt/requests/compute/create_affinity_group.rb +18 -0
  61. data/lib/fog/ovirt/requests/compute/destroy_affinity_group.rb +19 -0
  62. data/lib/fog/ovirt/requests/compute/get_affinity_group.rb +18 -0
  63. data/lib/fog/ovirt/requests/compute/list_affinity_group_vms.rb +22 -0
  64. data/lib/fog/ovirt/requests/compute/list_affinity_groups.rb +20 -0
  65. data/lib/fog/ovirt/requests/compute/mock_files/affinitygroup.xml +8 -0
  66. data/lib/fog/ovirt/requests/compute/mock_files/affinitygroup_vms.xml +9 -0
  67. data/lib/fog/ovirt/requests/compute/mock_files/affinitygroups.xml +17 -0
  68. data/lib/fog/ovirt/requests/compute/remove_from_affinity_group.rb +21 -0
  69. data/lib/fog/ovirt/requests/compute/update_interface.rb +18 -5
  70. data/lib/fog/rackspace/docs/block_storage.md +1 -1
  71. data/lib/fog/rackspace/docs/cdn_v2.md +1 -1
  72. data/lib/fog/rackspace/docs/compute_v2.md +1 -1
  73. data/lib/fog/rackspace/docs/getting_started.md +1 -1
  74. data/lib/fog/rackspace/docs/networking_v2.md +1 -1
  75. data/lib/fog/rackspace/docs/storage.md +1 -1
  76. data/lib/fog/rackspace/examples/README.md +1 -1
  77. data/lib/fog/rackspace/mock_data.rb +48 -48
  78. data/lib/fog/rackspace/models/networking_v2/security_group.rb +32 -0
  79. data/lib/fog/rackspace/models/networking_v2/security_group_rule.rb +38 -0
  80. data/lib/fog/rackspace/models/networking_v2/security_group_rules.rb +23 -0
  81. data/lib/fog/rackspace/models/networking_v2/security_groups.rb +23 -0
  82. data/lib/fog/rackspace/networking_v2.rb +24 -7
  83. data/lib/fog/rackspace/requests/networking_v2/create_security_group.rb +12 -0
  84. data/lib/fog/rackspace/requests/networking_v2/create_security_group_rule.rb +12 -0
  85. data/lib/fog/rackspace/requests/networking_v2/delete_security_group.rb +5 -0
  86. data/lib/fog/rackspace/requests/networking_v2/delete_security_group_rule.rb +5 -0
  87. data/lib/fog/rackspace/requests/networking_v2/list_security_group_rules.rb +5 -0
  88. data/lib/fog/rackspace/requests/networking_v2/list_security_groups.rb +5 -0
  89. data/lib/fog/rackspace/requests/networking_v2/show_security_group.rb +5 -0
  90. data/lib/fog/rackspace/requests/networking_v2/show_security_group_rule.rb +5 -0
  91. data/lib/fog/rackspace/requests/networking_v2/update_security_group.rb +12 -0
  92. data/lib/fog/rackspace/requests/storage/get_object_https_url.rb +1 -1
  93. data/lib/fog/version.rb +1 -1
  94. data/lib/fog/vsphere/requests/compute/cloudinit_to_customspec.rb +13 -4
  95. data/lib/fog/vsphere/requests/compute/vm_clone.rb +19 -6
  96. data/lib/fog/xenserver/requests/compute/create_vdi.rb +16 -6
  97. data/lib/tasks/changelog_task.rb +2 -1
  98. data/spec/fog/account_spec.rb +1 -2
  99. data/spec/fog/billing_spec.rb +1 -2
  100. data/spec/fog/bin/atmos_spec.rb +25 -2
  101. data/spec/fog/bin/aws_spec.rb +1 -2
  102. data/spec/fog/bin/baremetalcloud_spec.rb +25 -2
  103. data/spec/fog/bin/bluebox_spec.rb +47 -2
  104. data/spec/fog/bin/brightbox_spec.rb +1 -2
  105. data/spec/fog/bin/clodo_spec.rb +1 -2
  106. data/spec/fog/bin/cloudsigma_spec.rb +1 -2
  107. data/spec/fog/bin/cloudstack_spec.rb +1 -2
  108. data/spec/fog/bin/digitalocean_spec.rb +1 -2
  109. data/spec/fog/bin/dnsimple_spec.rb +1 -2
  110. data/spec/fog/bin/dnsmadeeasy_spec.rb +1 -2
  111. data/spec/fog/bin/dreamhost_spec.rb +1 -2
  112. data/spec/fog/bin/dynect_spec.rb +1 -2
  113. data/spec/fog/bin/powerdns_spec.rb +9 -0
  114. data/spec/fog/bin_spec.rb +4 -2
  115. data/spec/fog/cdn_spec.rb +1 -2
  116. data/spec/fog/compute_spec.rb +1 -2
  117. data/spec/fog/dns_spec.rb +1 -2
  118. data/spec/fog/identity_spec.rb +1 -2
  119. data/spec/fog/image_spec.rb +1 -2
  120. data/spec/fog/metering_spec.rb +1 -2
  121. data/spec/fog/monitoring_spec.rb +1 -2
  122. data/spec/fog/network_spec.rb +1 -2
  123. data/spec/fog/orchestration_spec.rb +1 -2
  124. data/spec/fog/storage_spec.rb +1 -2
  125. data/spec/fog/support_spec.rb +1 -2
  126. data/spec/fog/volume_spec.rb +1 -2
  127. data/spec/fog/vpn_spec.rb +1 -2
  128. data/spec/fog/xml/connection_spec.rb +1 -2
  129. data/spec/helpers/bin.rb +4 -0
  130. data/spec/spec_helper.rb +15 -0
  131. data/tests/compute/helper.rb +3 -0
  132. data/tests/glesys/requests/compute/helper.rb +66 -2
  133. data/tests/glesys/requests/compute/server_tests.rb +22 -6
  134. data/tests/glesys/requests/compute/ssh_key_tests.rb +47 -0
  135. data/tests/google/credentials_tests.rb +73 -0
  136. data/tests/helper.rb +5 -1
  137. data/tests/linode/requests/compute/linode_tests.rb +76 -3
  138. data/tests/openstack/authenticate_tests.rb +10 -0
  139. data/tests/openstack/models/planning/.gitkeep +0 -0
  140. data/tests/openstack/models/planning/plan_tests.rb +51 -0
  141. data/tests/openstack/models/planning/plans_tests.rb +18 -0
  142. data/tests/openstack/models/planning/role_tests.rb +14 -0
  143. data/tests/openstack/requests/planning/.gitkeep +0 -0
  144. data/tests/openstack/requests/planning/plan_tests.rb +65 -0
  145. data/tests/openstack/requests/planning/role_tests.rb +16 -0
  146. metadata +193 -75
  147. data/lib/fog/bin/atmos.rb +0 -29
  148. data/lib/fog/bin/local.rb +0 -29
  149. data/lib/fog/local.rb +0 -1
  150. data/lib/fog/local/core.rb +0 -9
  151. data/lib/fog/local/models/storage/directories.rb +0 -33
  152. data/lib/fog/local/models/storage/directory.rb +0 -53
  153. data/lib/fog/local/models/storage/file.rb +0 -132
  154. data/lib/fog/local/models/storage/files.rb +0 -84
  155. data/lib/fog/local/storage.rb +0 -96
  156. data/tests/local/models/directories_tests.rb +0 -17
  157. data/tests/local/models/directory_tests.rb +0 -16
  158. data/tests/local/models/file_tests.rb +0 -43
  159. data/tests/local/storage_tests.rb +0 -40
@@ -1,17 +0,0 @@
1
- Shindo.tests('Storage[:local] | directories', ["local"]) do
2
-
3
- pending if Fog.mocking?
4
-
5
- @options = { :local_root => "/tmp/fogtests" }
6
- @collection = Fog::Storage::Local.new(@options).directories
7
-
8
- collection_tests(@collection, {:key => "fogdirtests"}, true)
9
-
10
- tests("#all") do
11
- tests("succeeds when :local_root does not exist").succeeds do
12
- FileUtils.rm_rf(@options[:local_root])
13
- @collection.all
14
- end
15
- end
16
-
17
- end
@@ -1,16 +0,0 @@
1
- Shindo.tests('Storage[:local] | directory', ["local"]) do
2
-
3
- pending if Fog.mocking?
4
-
5
- before do
6
- @options = { :local_root => '~/.fog' }
7
- end
8
-
9
- tests('save') do
10
- returns(true) do
11
- connection = Fog::Storage::Local.new(@options)
12
- connection.directories.create(:key => 'directory')
13
- connection.directories.create(:key => 'directory')
14
- end
15
- end
16
- end
@@ -1,43 +0,0 @@
1
- Shindo.tests('Storage[:local] | file', ["local"]) do
2
-
3
- pending if Fog.mocking?
4
-
5
- before do
6
- @options = { :local_root => '~/.fog' }
7
- end
8
-
9
- tests('#public_url') do
10
- tests('when connection has an endpoint').
11
- returns('http://example.com/files/directory/file.txt') do
12
- @options[:endpoint] = 'http://example.com/files'
13
-
14
- connection = Fog::Storage::Local.new(@options)
15
- directory = connection.directories.new(:key => 'directory')
16
- file = directory.files.new(:key => 'file.txt')
17
-
18
- file.public_url
19
- end
20
-
21
- tests('when connection has no endpoint').
22
- returns(nil) do
23
- @options[:endpoint] = nil
24
-
25
- connection = Fog::Storage::Local.new(@options)
26
- directory = connection.directories.new(:key => 'directory')
27
- file = directory.files.new(:key => 'file.txt')
28
-
29
- file.public_url
30
- end
31
-
32
- tests('when file path has escapable characters').
33
- returns('http://example.com/files/my%20directory/my%20file.txt') do
34
- @options[:endpoint] = 'http://example.com/files'
35
-
36
- connection = Fog::Storage::Local.new(@options)
37
- directory = connection.directories.new(:key => 'my directory')
38
- file = directory.files.new(:key => 'my file.txt')
39
-
40
- file.public_url
41
- end
42
- end
43
- end
@@ -1,40 +0,0 @@
1
- Shindo.tests('Local | storage') do
2
-
3
- pending if Fog.mocking?
4
-
5
- before do
6
- @options = { :local_root => "~/.fog" }
7
- end
8
-
9
- tests('#endpoint') do
10
- tests('when no endpoint is provided').
11
- returns(nil) do
12
- Fog::Storage::Local.new(@options).endpoint
13
- end
14
-
15
- tests('when no host is provided').
16
- returns(nil) do
17
- @options[:scheme] = 'http'
18
- @options[:path] = '/files'
19
- @options[:port] = 80
20
-
21
- Fog::Storage::Local.new(@options).endpoint
22
- end
23
-
24
- tests('when endpoint is provided').
25
- returns('http://example.com/files') do
26
- @options[:endpoint] = 'http://example.com/files'
27
-
28
- Fog::Storage::Local.new(@options).endpoint
29
- end
30
-
31
- tests('when at least host option is provided').
32
- returns('http://example.com/files') do
33
- @options[:scheme] = 'http'
34
- @options[:host] = 'example.com'
35
- @options[:path] = '/files'
36
-
37
- Fog::Storage::Local.new(@options).endpoint
38
- end
39
- end
40
- end