fog 1.41.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (256) hide show
  1. checksums.yaml +5 -5
  2. data/.github/stale.yml +17 -0
  3. data/.travis.yml +1 -8
  4. data/CHANGELOG.md +78 -0
  5. data/README.md +4 -5
  6. data/Rakefile +0 -3
  7. data/fog.gemspec +13 -13
  8. data/lib/fog/bin/brightbox.rb +2 -2
  9. data/lib/fog/bin.rb +0 -2
  10. data/lib/fog/cloudstack/models/compute/server.rb +2 -0
  11. data/lib/fog/linode/requests/compute/avail_datacenters.rb +1 -0
  12. data/lib/fog/opennebula/compute.rb +6 -1
  13. data/lib/fog/opennebula/requests/compute/OpenNebulaVNC.rb +5 -1
  14. data/lib/fog/vcloud_director/compute.rb +3 -2
  15. data/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb +2 -2
  16. data/lib/fog/vcloud_director/generators/compute/network_config_section.rb +68 -0
  17. data/lib/fog/vcloud_director/requests/compute/get_vapp.rb +0 -4
  18. data/lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb +11 -11
  19. data/lib/fog/vcloud_director/requests/compute/post_power_on_vapp.rb +1 -1
  20. data/lib/fog/vcloud_director/requests/compute/put_config_network_section_vapp.rb +26 -0
  21. data/lib/fog/version.rb +1 -1
  22. data/lib/fog.rb +0 -2
  23. data/lib/tasks/changelog_task.rb +4 -1
  24. data/lib/tasks/github_release_task.rb +1 -1
  25. data/spec/fog/bin/atmos_spec.rb +0 -10
  26. data/spec/fog/bin/aws_spec.rb +0 -18
  27. data/spec/fog/bin/baremetalcloud_spec.rb +0 -10
  28. data/spec/fog/bin/brightbox_spec.rb +2 -2
  29. data/spec/fog/bin_spec.rb +0 -6
  30. data/tests/cloudsigma/models/snapshot_tests.rb +2 -0
  31. data/tests/cloudsigma/models/snapshots_tests.rb +1 -0
  32. data/tests/cloudsigma/requests/snapshots_tests.rb +1 -0
  33. data/tests/cloudsigma/requests/volumes_tests.rb +1 -1
  34. data/tests/cloudstack/compute/models/volume_tests.rb +1 -1
  35. data/tests/compute/helper.rb +0 -9
  36. data/tests/dns/helper.rb +0 -9
  37. data/tests/helpers/collection_helper.rb +0 -6
  38. data/tests/helpers/mock_helper.rb +0 -7
  39. data/tests/opennebula/compute_tests.rb +5 -2
  40. data/tests/opennebula/models/compute/flavor_tests.rb +5 -1
  41. data/tests/opennebula/models/compute/flavors_tests.rb +5 -2
  42. data/tests/opennebula/models/compute/group_tests.rb +5 -2
  43. data/tests/opennebula/models/compute/groups_tests.rb +5 -2
  44. data/tests/opennebula/models/compute/network_tests.rb +5 -1
  45. data/tests/opennebula/models/compute/networks_tests.rb +5 -2
  46. data/tests/opennebula/requests/compute/vm_allocate_tests.rb +5 -1
  47. data/tests/opennebula/requests/compute/vm_suspend_resume_tests.rb +5 -2
  48. metadata +37 -546
  49. data/gemfiles/Gemfile-1.9 +0 -16
  50. data/gemfiles/Gemfile-edge-1.9 +0 -20
  51. data/lib/fog/bin/bluebox.rb +0 -36
  52. data/lib/fog/bin/ovirt.rb +0 -28
  53. data/lib/fog/bin/zerigo.rb +0 -29
  54. data/lib/fog/bluebox/blb.rb +0 -82
  55. data/lib/fog/bluebox/compute.rb +0 -98
  56. data/lib/fog/bluebox/core.rb +0 -12
  57. data/lib/fog/bluebox/dns.rb +0 -101
  58. data/lib/fog/bluebox/models/blb/lb_application.rb +0 -29
  59. data/lib/fog/bluebox/models/blb/lb_applications.rb +0 -24
  60. data/lib/fog/bluebox/models/blb/lb_backend.rb +0 -19
  61. data/lib/fog/bluebox/models/blb/lb_backends.rb +0 -27
  62. data/lib/fog/bluebox/models/blb/lb_service.rb +0 -32
  63. data/lib/fog/bluebox/models/blb/lb_services.rb +0 -27
  64. data/lib/fog/bluebox/models/compute/flavor.rb +0 -41
  65. data/lib/fog/bluebox/models/compute/flavors.rb +0 -24
  66. data/lib/fog/bluebox/models/compute/image.rb +0 -30
  67. data/lib/fog/bluebox/models/compute/images.rb +0 -24
  68. data/lib/fog/bluebox/models/compute/location.rb +0 -13
  69. data/lib/fog/bluebox/models/compute/locations.rb +0 -24
  70. data/lib/fog/bluebox/models/compute/server.rb +0 -121
  71. data/lib/fog/bluebox/models/compute/servers.rb +0 -32
  72. data/lib/fog/bluebox/models/dns/record.rb +0 -52
  73. data/lib/fog/bluebox/models/dns/records.rb +0 -32
  74. data/lib/fog/bluebox/models/dns/zone.rb +0 -62
  75. data/lib/fog/bluebox/models/dns/zones.rb +0 -24
  76. data/lib/fog/bluebox/parsers/dns/create_record.rb +0 -22
  77. data/lib/fog/bluebox/parsers/dns/create_zone.rb +0 -22
  78. data/lib/fog/bluebox/parsers/dns/get_record.rb +0 -17
  79. data/lib/fog/bluebox/parsers/dns/get_records.rb +0 -24
  80. data/lib/fog/bluebox/parsers/dns/get_zone.rb +0 -22
  81. data/lib/fog/bluebox/parsers/dns/get_zones.rb +0 -26
  82. data/lib/fog/bluebox/requests/blb/add_machine_to_lb_application.rb +0 -33
  83. data/lib/fog/bluebox/requests/blb/add_machine_to_lb_backend.rb +0 -31
  84. data/lib/fog/bluebox/requests/blb/get_lb_application.rb +0 -32
  85. data/lib/fog/bluebox/requests/blb/get_lb_applications.rb +0 -30
  86. data/lib/fog/bluebox/requests/blb/get_lb_backend.rb +0 -35
  87. data/lib/fog/bluebox/requests/blb/get_lb_backends.rb +0 -35
  88. data/lib/fog/bluebox/requests/blb/get_lb_machine.rb +0 -34
  89. data/lib/fog/bluebox/requests/blb/get_lb_machines.rb +0 -34
  90. data/lib/fog/bluebox/requests/blb/get_lb_service.rb +0 -35
  91. data/lib/fog/bluebox/requests/blb/get_lb_services.rb +0 -35
  92. data/lib/fog/bluebox/requests/blb/remove_machine_from_lb_backend.rb +0 -28
  93. data/lib/fog/bluebox/requests/blb/update_lb_backend_machine.rb +0 -29
  94. data/lib/fog/bluebox/requests/compute/create_block.rb +0 -44
  95. data/lib/fog/bluebox/requests/compute/create_template.rb +0 -25
  96. data/lib/fog/bluebox/requests/compute/destroy_block.rb +0 -24
  97. data/lib/fog/bluebox/requests/compute/destroy_template.rb +0 -24
  98. data/lib/fog/bluebox/requests/compute/get_block.rb +0 -24
  99. data/lib/fog/bluebox/requests/compute/get_blocks.rb +0 -26
  100. data/lib/fog/bluebox/requests/compute/get_location.rb +0 -24
  101. data/lib/fog/bluebox/requests/compute/get_locations.rb +0 -22
  102. data/lib/fog/bluebox/requests/compute/get_product.rb +0 -24
  103. data/lib/fog/bluebox/requests/compute/get_products.rb +0 -23
  104. data/lib/fog/bluebox/requests/compute/get_template.rb +0 -24
  105. data/lib/fog/bluebox/requests/compute/get_templates.rb +0 -24
  106. data/lib/fog/bluebox/requests/compute/reboot_block.rb +0 -25
  107. data/lib/fog/bluebox/requests/dns/create_record.rb +0 -44
  108. data/lib/fog/bluebox/requests/dns/create_zone.rb +0 -48
  109. data/lib/fog/bluebox/requests/dns/delete_record.rb +0 -27
  110. data/lib/fog/bluebox/requests/dns/delete_zone.rb +0 -27
  111. data/lib/fog/bluebox/requests/dns/get_record.rb +0 -36
  112. data/lib/fog/bluebox/requests/dns/get_records.rb +0 -37
  113. data/lib/fog/bluebox/requests/dns/get_zone.rb +0 -40
  114. data/lib/fog/bluebox/requests/dns/get_zones.rb +0 -39
  115. data/lib/fog/bluebox/requests/dns/update_record.rb +0 -30
  116. data/lib/fog/bluebox/requests/dns/update_zone.rb +0 -26
  117. data/lib/fog/bluebox.rb +0 -3
  118. data/lib/fog/ovirt/compute.rb +0 -155
  119. data/lib/fog/ovirt/core.rb +0 -16
  120. data/lib/fog/ovirt/models/compute/affinity_group.rb +0 -25
  121. data/lib/fog/ovirt/models/compute/affinity_groups.rb +0 -20
  122. data/lib/fog/ovirt/models/compute/cluster.rb +0 -20
  123. data/lib/fog/ovirt/models/compute/clusters.rb +0 -20
  124. data/lib/fog/ovirt/models/compute/instance_type.rb +0 -39
  125. data/lib/fog/ovirt/models/compute/instance_types.rb +0 -20
  126. data/lib/fog/ovirt/models/compute/interface.rb +0 -19
  127. data/lib/fog/ovirt/models/compute/interfaces.rb +0 -29
  128. data/lib/fog/ovirt/models/compute/quota.rb +0 -16
  129. data/lib/fog/ovirt/models/compute/quotas.rb +0 -20
  130. data/lib/fog/ovirt/models/compute/server.rb +0 -175
  131. data/lib/fog/ovirt/models/compute/servers.rb +0 -27
  132. data/lib/fog/ovirt/models/compute/template.rb +0 -58
  133. data/lib/fog/ovirt/models/compute/templates.rb +0 -20
  134. data/lib/fog/ovirt/models/compute/volume.rb +0 -36
  135. data/lib/fog/ovirt/models/compute/volumes.rb +0 -28
  136. data/lib/fog/ovirt/requests/compute/activate_volume.rb +0 -22
  137. data/lib/fog/ovirt/requests/compute/add_interface.rb +0 -20
  138. data/lib/fog/ovirt/requests/compute/add_to_affinity_group.rb +0 -21
  139. data/lib/fog/ovirt/requests/compute/add_volume.rb +0 -21
  140. data/lib/fog/ovirt/requests/compute/attach_volume.rb +0 -22
  141. data/lib/fog/ovirt/requests/compute/create_affinity_group.rb +0 -18
  142. data/lib/fog/ovirt/requests/compute/create_vm.rb +0 -18
  143. data/lib/fog/ovirt/requests/compute/datacenters.rb +0 -20
  144. data/lib/fog/ovirt/requests/compute/deactivate_volume.rb +0 -22
  145. data/lib/fog/ovirt/requests/compute/destroy_affinity_group.rb +0 -19
  146. data/lib/fog/ovirt/requests/compute/destroy_interface.rb +0 -22
  147. data/lib/fog/ovirt/requests/compute/destroy_vm.rb +0 -19
  148. data/lib/fog/ovirt/requests/compute/destroy_volume.rb +0 -22
  149. data/lib/fog/ovirt/requests/compute/detach_volume.rb +0 -22
  150. data/lib/fog/ovirt/requests/compute/get_affinity_group.rb +0 -18
  151. data/lib/fog/ovirt/requests/compute/get_api_version.rb +0 -16
  152. data/lib/fog/ovirt/requests/compute/get_cluster.rb +0 -17
  153. data/lib/fog/ovirt/requests/compute/get_instance_type.rb +0 -17
  154. data/lib/fog/ovirt/requests/compute/get_quota.rb +0 -17
  155. data/lib/fog/ovirt/requests/compute/get_template.rb +0 -17
  156. data/lib/fog/ovirt/requests/compute/get_virtual_machine.rb +0 -17
  157. data/lib/fog/ovirt/requests/compute/list_affinity_group_vms.rb +0 -22
  158. data/lib/fog/ovirt/requests/compute/list_affinity_groups.rb +0 -20
  159. data/lib/fog/ovirt/requests/compute/list_clusters.rb +0 -19
  160. data/lib/fog/ovirt/requests/compute/list_instance_types.rb +0 -19
  161. data/lib/fog/ovirt/requests/compute/list_networks.rb +0 -16
  162. data/lib/fog/ovirt/requests/compute/list_quotas.rb +0 -19
  163. data/lib/fog/ovirt/requests/compute/list_template_interfaces.rb +0 -19
  164. data/lib/fog/ovirt/requests/compute/list_template_volumes.rb +0 -19
  165. data/lib/fog/ovirt/requests/compute/list_templates.rb +0 -19
  166. data/lib/fog/ovirt/requests/compute/list_virtual_machines.rb +0 -19
  167. data/lib/fog/ovirt/requests/compute/list_vm_interfaces.rb +0 -19
  168. data/lib/fog/ovirt/requests/compute/list_vm_volumes.rb +0 -19
  169. data/lib/fog/ovirt/requests/compute/list_volumes.rb +0 -19
  170. data/lib/fog/ovirt/requests/compute/mock_files/affinitygroup.xml +0 -8
  171. data/lib/fog/ovirt/requests/compute/mock_files/affinitygroup_vms.xml +0 -9
  172. data/lib/fog/ovirt/requests/compute/mock_files/affinitygroups.xml +0 -17
  173. data/lib/fog/ovirt/requests/compute/mock_files/cluster.xml +0 -20
  174. data/lib/fog/ovirt/requests/compute/mock_files/clusters.xml +0 -39
  175. data/lib/fog/ovirt/requests/compute/mock_files/data_centers.xml +0 -17
  176. data/lib/fog/ovirt/requests/compute/mock_files/disks.xml +0 -58
  177. data/lib/fog/ovirt/requests/compute/mock_files/instance_type.xml +0 -42
  178. data/lib/fog/ovirt/requests/compute/mock_files/instance_types.xml +0 -197
  179. data/lib/fog/ovirt/requests/compute/mock_files/nics.xml +0 -10
  180. data/lib/fog/ovirt/requests/compute/mock_files/quotas.xml +0 -7
  181. data/lib/fog/ovirt/requests/compute/mock_files/storage_domains.xml +0 -36
  182. data/lib/fog/ovirt/requests/compute/mock_files/template.xml +0 -39
  183. data/lib/fog/ovirt/requests/compute/mock_files/templates.xml +0 -110
  184. data/lib/fog/ovirt/requests/compute/mock_files/vm.xml +0 -52
  185. data/lib/fog/ovirt/requests/compute/mock_files/vms.xml +0 -152
  186. data/lib/fog/ovirt/requests/compute/mock_files/volumes.xml +0 -40
  187. data/lib/fog/ovirt/requests/compute/remove_from_affinity_group.rb +0 -21
  188. data/lib/fog/ovirt/requests/compute/storage_domains.rb +0 -20
  189. data/lib/fog/ovirt/requests/compute/update_interface.rb +0 -35
  190. data/lib/fog/ovirt/requests/compute/update_vm.rb +0 -18
  191. data/lib/fog/ovirt/requests/compute/update_volume.rb +0 -39
  192. data/lib/fog/ovirt/requests/compute/vm_action.rb +0 -22
  193. data/lib/fog/ovirt/requests/compute/vm_start_with_cloudinit.rb +0 -19
  194. data/lib/fog/ovirt/requests/compute/vm_ticket.rb +0 -17
  195. data/lib/fog/ovirt.rb +0 -1
  196. data/lib/fog/zerigo/core.rb +0 -10
  197. data/lib/fog/zerigo/dns.rb +0 -114
  198. data/lib/fog/zerigo/models/dns/record.rb +0 -66
  199. data/lib/fog/zerigo/models/dns/records.rb +0 -45
  200. data/lib/fog/zerigo/models/dns/zone.rb +0 -84
  201. data/lib/fog/zerigo/models/dns/zones.rb +0 -26
  202. data/lib/fog/zerigo/parsers/dns/count_hosts.rb +0 -20
  203. data/lib/fog/zerigo/parsers/dns/count_zones.rb +0 -20
  204. data/lib/fog/zerigo/parsers/dns/create_host.rb +0 -24
  205. data/lib/fog/zerigo/parsers/dns/create_zone.rb +0 -22
  206. data/lib/fog/zerigo/parsers/dns/find_hosts.rb +0 -28
  207. data/lib/fog/zerigo/parsers/dns/get_host.rb +0 -24
  208. data/lib/fog/zerigo/parsers/dns/get_zone.rb +0 -53
  209. data/lib/fog/zerigo/parsers/dns/get_zone_stats.rb +0 -22
  210. data/lib/fog/zerigo/parsers/dns/list_hosts.rb +0 -28
  211. data/lib/fog/zerigo/parsers/dns/list_zones.rb +0 -26
  212. data/lib/fog/zerigo/requests/dns/count_hosts.rb +0 -45
  213. data/lib/fog/zerigo/requests/dns/count_zones.rb +0 -37
  214. data/lib/fog/zerigo/requests/dns/create_host.rb +0 -125
  215. data/lib/fog/zerigo/requests/dns/create_zone.rb +0 -128
  216. data/lib/fog/zerigo/requests/dns/delete_host.rb +0 -41
  217. data/lib/fog/zerigo/requests/dns/delete_zone.rb +0 -40
  218. data/lib/fog/zerigo/requests/dns/find_hosts.rb +0 -74
  219. data/lib/fog/zerigo/requests/dns/get_host.rb +0 -54
  220. data/lib/fog/zerigo/requests/dns/get_zone.rb +0 -64
  221. data/lib/fog/zerigo/requests/dns/get_zone_stats.rb +0 -57
  222. data/lib/fog/zerigo/requests/dns/list_hosts.rb +0 -73
  223. data/lib/fog/zerigo/requests/dns/list_zones.rb +0 -62
  224. data/lib/fog/zerigo/requests/dns/update_host.rb +0 -68
  225. data/lib/fog/zerigo/requests/dns/update_zone.rb +0 -86
  226. data/lib/fog/zerigo.rb +0 -1
  227. data/spec/fog/bin/bluebox_spec.rb +0 -55
  228. data/spec/fog/bin/ovirt_spec.rb +0 -10
  229. data/spec/fog/bin/zerigo_spec.rb +0 -10
  230. data/spec/fog/compute_spec.rb +0 -19
  231. data/spec/fog/dns_spec.rb +0 -19
  232. data/tests/bluebox/requests/blb/helper.rb +0 -64
  233. data/tests/bluebox/requests/blb/lb_tests.rb +0 -75
  234. data/tests/bluebox/requests/compute/block_tests.rb +0 -83
  235. data/tests/bluebox/requests/compute/helper.rb +0 -16
  236. data/tests/bluebox/requests/compute/location_tests.rb +0 -32
  237. data/tests/bluebox/requests/compute/product_tests.rb +0 -34
  238. data/tests/bluebox/requests/compute/template_tests.rb +0 -37
  239. data/tests/bluebox/requests/dns/dns_tests.rb +0 -258
  240. data/tests/ovirt/compute_tests.rb +0 -25
  241. data/tests/ovirt/models/compute/cluster_tests.rb +0 -31
  242. data/tests/ovirt/models/compute/clusters_tests.rb +0 -9
  243. data/tests/ovirt/models/compute/interface_tests.rb +0 -27
  244. data/tests/ovirt/models/compute/interfaces_tests.rb +0 -9
  245. data/tests/ovirt/models/compute/server_tests.rb +0 -51
  246. data/tests/ovirt/models/compute/servers_tests.rb +0 -14
  247. data/tests/ovirt/models/compute/template_tests.rb +0 -28
  248. data/tests/ovirt/models/compute/templates_tests.rb +0 -9
  249. data/tests/ovirt/requests/compute/create_vm_tests.rb +0 -26
  250. data/tests/ovirt/requests/compute/destroy_vm_tests.rb +0 -18
  251. data/tests/ovirt/requests/compute/list_datacenters_tests.rb +0 -13
  252. data/tests/ovirt/requests/compute/list_quotas_tests.rb +0 -12
  253. data/tests/ovirt/requests/compute/list_storage_domains_tests.rb +0 -13
  254. data/tests/ovirt/requests/compute/update_vm_tests.rb +0 -18
  255. data/tests/ovirt/requests/compute/update_volume_tests.rb +0 -20
  256. data/tests/zerigo/requests/dns/dns_tests.rb +0 -440
@@ -1,35 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Get details of an lb_backend.
6
- #
7
- # ==== Parameters
8
- # * lb_service_id<~String> - service backend belongs to
9
- # * lb_backend_id<~String> - backend to look up
10
- #
11
- # ==== Returns
12
- # * response<~Excon::Response>:
13
- # * body<~Hash>:
14
- # * id<~String> - backend ID
15
- # * backend_name<~String>
16
- # * lb_machines<~Array> - array of backend members
17
- # * acl_name<~String> - name of ACL for this backend
18
- # * acl_rule<~String>
19
- # * monitoring_url_hostname<~String> - HTTP host header for health check
20
- # * monitoring_url<~String> - URL for health check
21
- # * check_interval<~Integer> - time between checks, in milliseconds
22
- def get_lb_backend(lb_service_id, lb_backend_id)
23
- request(
24
- :expects => 200,
25
- :method => 'GET',
26
- :path => "api/lb_services/#{lb_service_id}/lb_backends/#{lb_backend_id}.json"
27
- )
28
- end
29
- end
30
-
31
- class Mock
32
- end
33
- end
34
- end
35
- end
@@ -1,35 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Get list of backends
6
- #
7
- # ==== Parameters
8
- # * lb_service_id<~String> - service containing backends
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # * backend<~Hash>:
14
- # * id<~String> - backend ID
15
- # * backend_name<~String>
16
- # * lb_machines<~Array> - array of backend members
17
- # * acl_name<~String> - name of ACL for this backend
18
- # * acl_rule<~String>
19
- # * monitoring_url_hostname<~String> - HTTP host header for health check
20
- # * monitoring_url<~String> - URL for health check
21
- # * check_interval<~Integer> - time between checks, in milliseconds
22
- def get_lb_backends(lb_service_id)
23
- request(
24
- :expects => 200,
25
- :method => 'GET',
26
- :path => "api/lb_services/#{lb_service_id}/lb_backends.json"
27
- )
28
- end
29
- end
30
-
31
- class Mock
32
- end
33
- end
34
- end
35
- end
@@ -1,34 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Get details of an lb_machine.
6
- #
7
- # ==== Parameters
8
- # * lb_backend_id<~String> - backend machine belongs to
9
- # * lb_machine_id<~String> - machine to look up
10
- #
11
- # ==== Returns
12
- # * response<~Excon::Response>:
13
- # * body<~Hash>:
14
- # * id<~String> - machine ID
15
- # * ip<~String> - machine IP address for this member (v4 or v6)
16
- # * port<~Integer> - service port for this member
17
- # * hostname<~String> - name as registered with Box Panel
18
- # * acl_name<~String> - name of ACL for this machine
19
- # * created<~DateTime> - when machine was added to load balancer backend
20
- # * maxconn<~Integer> - maximum concurrent connections for this member (BLBv2 only)
21
- def get_lb_machine(lb_backend_id, lb_machine_id)
22
- request(
23
- :expects => 200,
24
- :method => 'GET',
25
- :path => "api/lb_backends/#{lb_backend_id}/lb_machines/#{lb_machine_id}.json"
26
- )
27
- end
28
- end
29
-
30
- class Mock
31
- end
32
- end
33
- end
34
- end
@@ -1,34 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Get list of machines
6
- #
7
- # ==== Parameters
8
- # * lb_backend_id<~String> - backend containing machines
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # * machine<~Hash>:
14
- # * id<~String> - machine ID
15
- # * ip<~String> - machine IP address for this member (v4 or v6)
16
- # * port<~Integer> - service port for this member
17
- # * hostname<~String> - name as registered with Box Panel
18
- # * acl_name<~String> - name of ACL for this machine
19
- # * created<~DateTime> - when machine was added to load balancer backend
20
- # * maxconn<~Integer> - maximum concurrent connections for this member (BLBv2 only)
21
- def get_lb_machines(lb_backend_id)
22
- request(
23
- :expects => 200,
24
- :method => 'GET',
25
- :path => "api/lb_backends/#{lb_backend_id}/lb_machines.json"
26
- )
27
- end
28
- end
29
-
30
- class Mock
31
- end
32
- end
33
- end
34
- end
@@ -1,35 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Get details of a lb_service.
6
- #
7
- # ==== Parameters
8
- # * lb_application_id<~String> - ID of application the service belongs to
9
- # * lb_service_id<~String> - ID of service to look up
10
- #
11
- # ==== Returns
12
- # * response<~Excon::Response>:
13
- # * body<~Hash>:
14
- # * name<~String> - service name
15
- # * port<~Integer> - port of load balanced service
16
- # * private<~Boolean> - whether service is only available internally
17
- # * status_username<~String> - HTTP basic auth username
18
- # * status_password<~String> - HTTP basic auth password
19
- # * status_url<~String> - URL of stats page
20
- # * service_type<~String> - proto being load balanced (e.g. 'http', 'tcp')
21
- # * created<~DateTime> - when service was created
22
- def get_lb_service(lb_application_id, lb_service_id)
23
- request(
24
- :expects => 200,
25
- :method => 'GET',
26
- :path => "api/lb_applications/#{lb_application_id}/lb_services/#{lb_service_id}.json",
27
- )
28
- end
29
- end
30
-
31
- class Mock
32
- end
33
- end
34
- end
35
- end
@@ -1,35 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Get list of load balancing services
6
- #
7
- # ==== Parameters
8
- # * lb_application_id<~String> - Id of application services to list
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # * backend<~Hash>:
14
- # * name<~String> - service name
15
- # * port<~Integer> - port of load balanced service
16
- # * private<~Boolean> - whether service is only available internally
17
- # * status_username<~String> - HTTP basic auth username
18
- # * status_password<~String> - HTTP basic auth password
19
- # * status_url<~String> - URL of stats page
20
- # * service_type<~String> - proto being load balanced (e.g. 'http', 'tcp')
21
- # * created<~DateTime> - when service was created
22
- def get_lb_services(lb_application_id)
23
- request(
24
- :expects => 200,
25
- :method => 'GET',
26
- :path => "api/lb_applications/#{lb_application_id}/lb_services.json"
27
- )
28
- end
29
- end
30
-
31
- class Mock
32
- end
33
- end
34
- end
35
- end
@@ -1,28 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # remove machine from single backend
6
- #
7
- # === Parameters
8
- # * lb_backend_id<~String> - ID of backend
9
- # * lb_machine_id<~String> - ID of machine
10
- #
11
- # ==== Returns
12
- # * response<~Excon::Response>:
13
- # * body<~String> - success or failure message
14
- def remove_machine_from_lb_backend(lb_backend_id, lb_machine_id)
15
- request(
16
- :expects => 200,
17
- :method => 'DELETE',
18
- :path => "/api/lb_backends/#{lb_backend_id}/lb_machines/#{lb_machine_id}",
19
- :headers => {"Accept" => "text/plain"},
20
- )
21
- end
22
- end
23
-
24
- class Mock
25
- end
26
- end
27
- end
28
- end
@@ -1,29 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # change machine attributes (port &c) in a single backend
6
- #
7
- # === Parameters
8
- # * lb_backend_id<~String> - ID of backend
9
- # * lb_machine_id<~String> - ID of machine
10
- # * options<~Hash>:
11
- # * port<~Integer> - port machine listens on
12
- # * maxconn<~Integer> - maximum number of connections server can be sent
13
- # * backup<~Boolean> - only send traffic to machine if all others are down
14
- def update_lb_backend_machine(lb_backend_id, lb_machine_id, options = {})
15
- # inconsistent, no?
16
- request(
17
- :expects => 202,
18
- :method => 'PUT',
19
- :path => "/api/lb_backends/#{lb_backend_id}/lb_machines/#{lb_machine_id}",
20
- :body => options.map {|k,v| "#{CGI.escape(k)}=#{CGI.escape(v.to_s)}"}.join('&')
21
- )
22
- end
23
- end
24
-
25
- class Mock
26
- end
27
- end
28
- end
29
- end
@@ -1,44 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Create a new block
6
- #
7
- # ==== Parameters
8
- # * product_id<~String> - ID of block product (size)
9
- # * template_id<~String> - ID of block OS/build template
10
- # * location_id<~String> - ID of deployment location
11
- # * options<~Hash>:
12
- # * password<~String> - Password for block
13
- # or
14
- # * ssh_public_key<~String> - SSH public key
15
- # * username<~String> - Defaults to deploy
16
- #
17
- # ==== Returns
18
- # * response<~Excon::Response>:
19
- # * body<~Hash>:
20
- def create_block(product_id, template_id, location_id, options = {})
21
- unless options.key?('password') || options.key?('ssh_public_key')
22
- raise ArgumentError, 'Either password or public_key must be supplied'
23
- end
24
-
25
- query = {
26
- 'product' => product_id,
27
- 'template' => template_id,
28
- 'location' => location_id
29
- }
30
-
31
- query['ipv6_only'] = options.delete('ipv6_only') if options['ipv6_only']
32
-
33
- request(
34
- :expects => 200,
35
- :method => 'POST',
36
- :path => '/api/blocks.json',
37
- :query => query,
38
- :body => options.map {|k,v| "#{CGI.escape(k)}=#{CGI.escape(v)}"}.join('&')
39
- )
40
- end
41
- end
42
- end
43
- end
44
- end
@@ -1,25 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Create a template from block
6
- #
7
- # ==== Parameters
8
- # * block_id<~Integer> - Id of block to create template from
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # TODO
14
- def create_template(block_id, options={})
15
- request(
16
- :expects => 202,
17
- :method => 'POST',
18
- :path => "api/block_templates.json",
19
- :query => {'id' => block_id}.merge!(options)
20
- )
21
- end
22
- end
23
- end
24
- end
25
- end
@@ -1,24 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Destroy a block
6
- #
7
- # ==== Parameters
8
- # * block_id<~Integer> - Id of block to destroy
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Hash>:
13
- # TODO
14
- def destroy_block(block_id)
15
- request(
16
- :expects => 200,
17
- :method => 'DELETE',
18
- :path => "api/blocks/#{block_id}.json"
19
- )
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Create a template from block
6
- #
7
- # ==== Parameters
8
- # * id<~Integer> - Id of image to destroy
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # TODO
14
- def destroy_template(id)
15
- request(
16
- :expects => 200,
17
- :method => 'DELETE',
18
- :path => "api/block_templates/#{id}.json"
19
- )
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get details of a block.
6
- #
7
- # ==== Parameters
8
- # * block_id<~Integer> - Id of block to lookup
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Hash>:
13
- # TODO
14
- def get_block(block_id)
15
- request(
16
- :expects => 200,
17
- :method => 'GET',
18
- :path => "api/blocks/#{block_id}.json"
19
- )
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,26 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get list of blocks
6
- #
7
- # ==== Returns
8
- # * response<~Excon::Response>:
9
- # * body<~Array>:
10
- # * 'ips'<~Array> - Ip addresses for the block
11
- # * 'id'<~String> - Id of the block
12
- # * 'storage'<~Integer> - Disk space quota for the block
13
- # * 'memory'<~Integer> - RAM quota for the block
14
- # * 'cpu'<~Float> - The fractional CPU quota for this block
15
- # * 'hostname'<~String> - The hostname for the block
16
- def get_blocks
17
- request(
18
- :expects => 200,
19
- :method => 'GET',
20
- :path => 'api/blocks.json'
21
- )
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,24 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get details of a location
6
- #
7
- # ==== Parameters
8
- # * location_id<~Integer> - Id of location to lookup
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # TODO
14
- def get_location(location_id)
15
- request(
16
- :expects => 200,
17
- :method => 'GET',
18
- :path => "api/locations/#{location_id}.json"
19
- )
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,22 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get list of locations
6
- #
7
- # ==== Returns
8
- # * response<~Excon::Response>:
9
- # * body<~Array>:
10
- # * 'id'<~String> - UUID of the location
11
- # * 'description'<~String> - Description of the location
12
- def get_locations
13
- request(
14
- :expects => 200,
15
- :method => 'GET',
16
- :path => 'api/locations.json'
17
- )
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,24 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get details of a product
6
- #
7
- # ==== Parameters
8
- # * product_id<~Integer> - Id of flavor to lookup
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # TODO
14
- def get_product(product_id)
15
- request(
16
- :expects => 200,
17
- :method => 'GET',
18
- :path => "api/block_products/#{product_id}.json"
19
- )
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,23 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get list of products
6
- #
7
- # ==== Returns
8
- # * response<~Excon::Response>:
9
- # * body<~Array>:
10
- # * 'id'<~String> - UUID of the product
11
- # * 'description'<~String> - Description of the product
12
- # * 'cost'<~Decimal> - Hourly cost of the product
13
- def get_products
14
- request(
15
- :expects => 200,
16
- :method => 'GET',
17
- :path => 'api/block_products.json'
18
- )
19
- end
20
- end
21
- end
22
- end
23
- end
@@ -1,24 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get details of a template
6
- #
7
- # ==== Parameters
8
- # * template_id<~Integer> - Id of template to lookup
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # TODO
14
- def get_template(template_id)
15
- request(
16
- :expects => 200,
17
- :method => 'GET',
18
- :path => "api/block_templates/#{template_id}.json"
19
- )
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get list of OS templates
6
- #
7
- # ==== Returns
8
- # * response<~Excon::Response>:
9
- # * body<~Array>:
10
- # * 'id'<~String> - UUID of the image
11
- # * 'description'<~String> - Description of the image
12
- # * 'public'<~Boolean> - Public / Private image
13
- # * 'created'<~Datetime> - Timestamp of when the image was created
14
- def get_templates
15
- request(
16
- :expects => 200,
17
- :method => 'GET',
18
- :path => 'api/block_templates.json'
19
- )
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,25 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Reboot block
6
- #
7
- # ==== Parameters
8
- # * block_id<~String> - Id of block to reboot
9
- # * type<~String> - Type of reboot, must be in ['HARD', 'SOFT']
10
- #
11
- # ==== Returns
12
- # * response<~Excon::Response>:
13
- # * body<~Hash>:
14
- # TODO
15
- def reboot_block(block_id, type = 'SOFT')
16
- request(
17
- :expects => 200,
18
- :method => 'PUT',
19
- :path => "api/blocks/#{block_id}/#{'soft_' if type == 'SOFT'}reboot.json"
20
- )
21
- end
22
- end
23
- end
24
- end
25
- end
@@ -1,44 +0,0 @@
1
- module Fog
2
- module DNS
3
- class Bluebox
4
- class Real
5
- require 'fog/bluebox/parsers/dns/create_record'
6
-
7
- # Create a new record in a DNS zone
8
- # ==== Parameters
9
- # * type<~String> - type of DNS record to create (A, CNAME, etc)
10
- # * name<~String> - host name this DNS record is for
11
- # * content<~String> - data for the DNS record (ie for an A record, the IP address)
12
- # ==== Returns
13
- # * response<~Excon::Response>:
14
- # * body<~Hash>:
15
- # * 'name'<~String> - as above
16
- # * 'id'<~Integer> - Id of zone/domain - used in future API calls for this zone
17
- # * 'ttl'<~Integer> - as above
18
- # * 'data'<~String> - as above
19
- # * 'active'<~String> - as above
20
- # * 'aux'<~String> - as above
21
- def create_record(zone_id, type, name, content, options={})
22
- body = %Q{<?xml version="1.0" encoding="UTF-8"?><record><type>#{type}</type><name>#{name}</name><content>#{content}</content>}
23
- options.each do |k,v|
24
- body += %Q{<#{k}>#{v}</#{k}>}
25
- end
26
- body += %Q{</record>}
27
- request(
28
- :body => body,
29
- :expects => 202,
30
- :method => 'POST',
31
- :parser => Fog::Parsers::DNS::Bluebox::CreateRecord.new,
32
- :path => "/api/domains/#{zone_id}/records.xml"
33
- )
34
- end
35
- end
36
-
37
- class Mock
38
- def create_record(zone_id, type, name, content)
39
- Fog::Mock.not_implemented
40
- end
41
- end
42
- end
43
- end
44
- end