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,22 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def destroy_volume(id, options)
6
- raise ArgumentError, "instance id is a required parameter" unless id
7
- raise ArgumentError, "volume id is a required parameter for destroy-volume" unless options.key? :id
8
-
9
- client.destroy_volume(id, options[:id])
10
- end
11
- end
12
-
13
- class Mock
14
- def destroy_volume(id, options)
15
- raise ArgumentError, "instance id is a required parameter" unless id
16
- raise ArgumentError, "volume id is a required parameter for destroy-volume" unless options.key? :id
17
- true
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,22 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def detach_volume(id, options)
6
- raise ArgumentError, "instance id is a required parameter" unless id
7
- raise ArgumentError, "volume id is a required parameter for detach-volume" unless options.key? :id
8
-
9
- client.detach_volume(id, options[:id])
10
- end
11
- end
12
-
13
- class Mock
14
- def detach_volume(id, options)
15
- raise ArgumentError, "instance id is a required parameter" unless id
16
- raise ArgumentError, "volume id is a required parameter for detach-volume" unless options.key? :id
17
- true
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,18 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def get_affinity_group(id)
6
- ovirt_attrs client.affinity_group(id)
7
- end
8
- end
9
-
10
- class Mock
11
- def get_affinity_group(id)
12
- xml = read_xml('affinitygroup.xml')
13
- ovirt_attrs OVIRT::AffinityGroup::new(self, Nokogiri::XML(xml).root)
14
- end
15
- end
16
- end
17
- end
18
- end
@@ -1,16 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def api_version
6
- client.api_version
7
- end
8
- end
9
- class Mock
10
- def api_version
11
- "3.1"
12
- end
13
- end
14
- end
15
- end
16
- end
@@ -1,17 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def get_cluster(id)
6
- ovirt_attrs client.cluster(id)
7
- end
8
- end
9
- class Mock
10
- def get_cluster(id)
11
- xml = read_xml('cluster.xml')
12
- ovirt_attrs OVIRT::Cluster::new(self, Nokogiri::XML(xml).root)
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,17 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def get_instance_type(id)
6
- ovirt_attrs client.instance_type(id)
7
- end
8
- end
9
- class Mock
10
- def get_instance_type(id)
11
- xml = read_xml 'instance_type.xml'
12
- ovirt_attrs OVIRT::InstanceType::new(self, Nokogiri::XML(xml).root)
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,17 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def get_quota(id)
6
- ovirt_attrs client.quota(id)
7
- end
8
- end
9
- class Mock
10
- def get_quota(id)
11
- xml = read_xml('quota.xml')
12
- ovirt_attrs OVIRT::Quota::new(self, Nokogiri::XML(xml).root)
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,17 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def get_template(id)
6
- ovirt_attrs client.template(id)
7
- end
8
- end
9
- class Mock
10
- def get_template(id)
11
- xml = read_xml 'template.xml'
12
- ovirt_attrs OVIRT::Template::new(self, Nokogiri::XML(xml).root)
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,17 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def get_virtual_machine(id)
6
- ovirt_attrs client.vm(id)
7
- end
8
- end
9
- class Mock
10
- def get_virtual_machine(id)
11
- xml = read_xml 'vm.xml'
12
- ovirt_attrs OVIRT::VM::new(self, Nokogiri::XML(xml).root)
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,22 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def list_affinity_group_vms(id)
6
- client.affinity_group_vms(id).map {|vm| servers.get(vm.id)}
7
- end
8
- end
9
-
10
- class Mock
11
- def list_affinity_group_vms(id)
12
- vms = []
13
- Nokogiri::XML(read_xml('affinitygroup_vms.xml')).xpath('/vms/vm/@id').each do |id|
14
- xml = Nokogiri::XML(read_xml('vms.xml')).xpath("/vms/vm[@id='%s']" % id.value).first
15
- vms << ovirt_attrs(OVIRT::VM::new(self, xml))
16
- end
17
- vms
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,20 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def list_affinity_groups(filters = {})
6
- client.affinity_groups(filters).map {|ovirt_obj| ovirt_attrs ovirt_obj}
7
- end
8
- end
9
-
10
- class Mock
11
- def list_affinity_groups(filters = {})
12
- xml = read_xml('affinitygroups.xml')
13
- Nokogiri::XML(xml).xpath('/affinity_groups/affinity_group').map do |ag|
14
- ovirt_attrs OVIRT::AffinityGroup::new(self, ag)
15
- end
16
- end
17
- end
18
- end
19
- end
20
- end
@@ -1,19 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def list_clusters(filters = {})
6
- client.clusters(filters).map {|ovirt_obj| ovirt_attrs ovirt_obj}
7
- end
8
- end
9
- class Mock
10
- def list_clusters(filters = {})
11
- xml = read_xml 'clusters.xml'
12
- Nokogiri::XML(xml).xpath('/clusters/cluster').map do |cl|
13
- ovirt_attrs OVIRT::Cluster::new(self, cl)
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,19 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def list_instance_types(filters = {})
6
- client.instance_types(filters).map {|ovirt_obj| ovirt_attrs ovirt_obj}
7
- end
8
- end
9
- class Mock
10
- def list_instance_types(filters = {})
11
- xml = read_xml 'instance_types.xml'
12
- Nokogiri::XML(xml).xpath('/instance_types/instance_type').map do |t|
13
- ovirt_attrs OVIRT::InstanceType::new(self, t)
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,16 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def list_networks(cluster_id)
6
- client.networks(:cluster_id => cluster_id)
7
- end
8
- end
9
- class Mock
10
- def list_networks(cluster_id)
11
- []
12
- end
13
- end
14
- end
15
- end
16
- end
@@ -1,19 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def list_quotas(filters = {})
6
- client.quotas(filters).map {|ovirt_obj| ovirt_attrs ovirt_obj}
7
- end
8
- end
9
- class Mock
10
- def list_quotas(filters = {})
11
- xml = read_xml 'quotas.xml'
12
- Nokogiri::XML(xml).xpath('/quotas/quota').map do |q|
13
- ovirt_attrs OVIRT::Quotas::new(self, q)
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,19 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def list_template_interfaces(vm_id)
6
- client.template_interfaces(vm_id).map {|ovirt_obj| ovirt_attrs ovirt_obj}
7
- end
8
- end
9
- class Mock
10
- def list_template_interfaces(vm_id)
11
- xml = read_xml 'nics.xml'
12
- Nokogiri::XML(xml).xpath('/nics/nic').map do |nic|
13
- ovirt_attrs OVIRT::Interface::new(self, nic)
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,19 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def list_template_volumes(template_id)
6
- client.template_volumes(template_id).map {|ovirt_obj| ovirt_attrs ovirt_obj}
7
- end
8
- end
9
- class Mock
10
- def list_template_volumes(template_id)
11
- xml = read_xml 'volumes.xml'
12
- Nokogiri::XML(xml).xpath('/disks/disk').map do |vol|
13
- ovirt_attrs OVIRT::Volume::new(self, vol)
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,19 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def list_templates(filters = {})
6
- client.templates(filters).map {|ovirt_obj| ovirt_attrs ovirt_obj}
7
- end
8
- end
9
- class Mock
10
- def list_templates(filters = {})
11
- xml = read_xml 'templates.xml'
12
- Nokogiri::XML(xml).xpath('/templates/template').map do |t|
13
- ovirt_attrs OVIRT::Template::new(self, t)
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,19 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def list_virtual_machines(filters = {})
6
- client.vms(filters).map {|ovirt_obj| ovirt_attrs ovirt_obj}
7
- end
8
- end
9
- class Mock
10
- def list_virtual_machines(filters = {})
11
- xml = read_xml 'vms.xml'
12
- Nokogiri::XML(xml).xpath('/vms/vm').map do |vm|
13
- ovirt_attrs OVIRT::VM::new(self, vm)
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,19 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def list_vm_interfaces(vm_id)
6
- client.vm_interfaces(vm_id).map {|ovirt_obj| ovirt_attrs ovirt_obj}
7
- end
8
- end
9
- class Mock
10
- def list_vm_interfaces(vm_id)
11
- xml = read_xml 'nics.xml'
12
- Nokogiri::XML(xml).xpath('/nics/nic').map do |nic|
13
- ovirt_attrs OVIRT::Interface::new(self, nic)
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,19 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def list_vm_volumes(vm_id)
6
- client.vm_volumes(vm_id).map {|ovirt_obj| ovirt_attrs ovirt_obj}
7
- end
8
- end
9
- class Mock
10
- def list_vm_volumes(vm_id)
11
- xml = read_xml 'volumes.xml'
12
- Nokogiri::XML(xml).xpath('/disks/disk').map do |vol|
13
- ovirt_attrs OVIRT::Volume::new(self, vol)
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,19 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Ovirt
4
- class Real
5
- def list_volumes
6
- client.disks.map {|ovirt_obj| ovirt_attrs ovirt_obj}
7
- end
8
- end
9
- class Mock
10
- def list_volumes
11
- xml = read_xml 'disks.xml'
12
- Nokogiri::XML(xml).xpath('/disks/disk').map do |vol|
13
- ovirt_attrs OVIRT::Volume::new(self, vol)
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
- <affinity_group href="/api/clusters/a240aac1-d03a-4c69-923e-a295200539fa/affinitygroups/9aaec56b-e24d-4fce-82a1-21a7b642ab0f" id="9aaec56b-e24d-4fce-82a1-21a7b642ab0f">
3
- <name>test1_ag</name>
4
- <link href="/api/clusters/a240aac1-d03a-4c69-923e-a295200539fa/affinitygroups/9aaec56b-e24d-4fce-82a1-21a7b642ab0f/vms" rel="vms"/>
5
- <cluster href="/api/clusters/a240aac1-d03a-4c69-923e-a295200539fa" id="a240aac1-d03a-4c69-923e-a295200539fa"/>
6
- <positive>true</positive>
7
- <enforcing>false</enforcing>
8
- </affinity_group>
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
- <vms>
3
- <vm href="/api/vms/5ee86332-7b19-465b-8801-2a12ed0d6c1b" id="5ee86332-7b19-465b-8801-2a12ed0d6c1b">
4
- <name>test-vm1</name>
5
- </vm>
6
- <vm href="/api/vms/349764bb-eba3-4466-abef-f18f4c40c9f1" id="349764bb-eba3-4466-abef-f18f4c40c9f1">
7
- <name>fosdem</name>
8
- </vm>
9
- </vms>
@@ -1,17 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
- <affinity_groups>
3
- <affinity_group href="/api/clusters/a240aac1-d03a-4c69-923e-a295200539fa/affinitygroups/ff73a83f-10b2-44ae-8c98-a29b13ae0c19" id="ff73a83f-10b2-44ae-8c98-a29b13ae0c19">
4
- <name>test2_ag</name>
5
- <link href="/api/clusters/a240aac1-d03a-4c69-923e-a295200539fa/affinitygroups/ff73a83f-10b2-44ae-8c98-a29b13ae0c19/vms" rel="vms"/>
6
- <cluster href="/api/clusters/a240aac1-d03a-4c69-923e-a295200539fa" id="a240aac1-d03a-4c69-923e-a295200539fa"/>
7
- <positive>true</positive>
8
- <enforcing>true</enforcing>
9
- </affinity_group>
10
- <affinity_group href="/api/clusters/a240aac1-d03a-4c69-923e-a295200539fa/affinitygroups/9aaec56b-e24d-4fce-82a1-21a7b642ab0f" id="9aaec56b-e24d-4fce-82a1-21a7b642ab0f">
11
- <name>test1_ag</name>
12
- <link href="/api/clusters/a240aac1-d03a-4c69-923e-a295200539fa/affinitygroups/9aaec56b-e24d-4fce-82a1-21a7b642ab0f/vms" rel="vms"/>
13
- <cluster href="/api/clusters/a240aac1-d03a-4c69-923e-a295200539fa" id="a240aac1-d03a-4c69-923e-a295200539fa"/>
14
- <positive>true</positive>
15
- <enforcing>false</enforcing>
16
- </affinity_group>
17
- </affinity_groups>
@@ -1,20 +0,0 @@
1
- <clusters>
2
- <cluster href="/api/clusters/9ce445e8-4c03-11e1-b3c8-5254009970cc" id="9ce445e8-4c03-11e1-b3c8-5254009970cc">
3
- <name>cluster1</name>
4
- <link href="/api/clusters/9ce445e8-4c03-11e1-b3c8-5254009970cc/networks" rel="networks"/>
5
- <link href="/api/clusters/9ce445e8-4c03-11e1-b3c8-5254009970cc/permissions" rel="permissions"/>
6
- <cpu id="Intel Conroe Family"/>
7
- <data_center href="/api/datacenters/c0645886-4b4b-11e1-a0ae-5254009970cc" id="c0645886-4b4b-11e1-a0ae-5254009970cc"/>
8
- <memory_policy>
9
- <overcommit percent="200"/>
10
- <transparent_hugepages>
11
- <enabled>true</enabled>
12
- </transparent_hugepages>
13
- </memory_policy>
14
- <scheduling_policy/>
15
- <version major="3" minor="0"/>
16
- <error_handling>
17
- <on_error>migrate_highly_available</on_error>
18
- </error_handling>
19
- </cluster>
20
- </clusters>
@@ -1,39 +0,0 @@
1
- <clusters>
2
- <cluster href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95" id="99408929-82cf-4dc7-a532-9d998063fa95">
3
- <name>Cluster1</name>
4
- <description>The default server cluster</description>
5
- <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/networks" rel="networks"/>
6
- <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/permissions" rel="permissions"/>
7
- <cpu id="Intel Conroe Family"/>
8
- <data_center href="/api/datacenters/c0645886-4b4b-11e1-a0ae-5254009970cc" id="c0645886-4b4b-11e1-a0ae-5254009970cc"/>
9
- <memory_policy>
10
- <overcommit percent="100"/>
11
- <transparent_hugepages>
12
- <enabled>true</enabled>
13
- </transparent_hugepages>
14
- </memory_policy>
15
- <scheduling_policy/>
16
- <version major="3" minor="0"/>
17
- <error_handling>
18
- <on_error>migrate</on_error>
19
- </error_handling>
20
- </cluster>
21
- <cluster href="/api/clusters/9ce445e8-4c03-11e1-b3c8-5254009970cc" id="9ce445e8-4c03-11e1-b3c8-5254009970cc">
22
- <name>Cluster2</name>
23
- <link href="/api/clusters/9ce445e8-4c03-11e1-b3c8-5254009970cc/networks" rel="networks"/>
24
- <link href="/api/clusters/9ce445e8-4c03-11e1-b3c8-5254009970cc/permissions" rel="permissions"/>
25
- <cpu id="Intel Conroe Family"/>
26
- <data_center href="/api/datacenters/c0645886-4b4b-11e1-a0ae-5254009970cc" id="c0645886-4b4b-11e1-a0ae-5254009970cc"/>
27
- <memory_policy>
28
- <overcommit percent="200"/>
29
- <transparent_hugepages>
30
- <enabled>true</enabled>
31
- </transparent_hugepages>
32
- </memory_policy>
33
- <scheduling_policy/>
34
- <version major="3" minor="0"/>
35
- <error_handling>
36
- <on_error>migrate_highly_available</on_error>
37
- </error_handling>
38
- </cluster>
39
- </clusters>
@@ -1,17 +0,0 @@
1
- <data_centers>
2
- <data_center href="/api/datacenters/c0645886-4b4b-11e1-a0ae-5254009970cc" id="c0645886-4b4b-11e1-a0ae-5254009970cc">
3
- <name>Datacenter1</name>
4
- <description>The first Data Center</description>
5
- <link href="/api/datacenters/c0645886-4b4b-11e1-a0ae-5254009970cc/storagedomains" rel="storagedomains"/>
6
- <link href="/api/datacenters/c0645886-4b4b-11e1-a0ae-5254009970cc/permissions" rel="permissions"/>
7
- <storage_type>nfs</storage_type>
8
- <storage_format>v1</storage_format>
9
- <version major="3" minor="0"/>
10
- <supported_versions>
11
- <version major="3" minor="0"/>
12
- </supported_versions>
13
- <status>
14
- <state>up</state>
15
- </status>
16
- </data_center>
17
- </data_centers>
@@ -1,58 +0,0 @@
1
- <disks>
2
- <disk href="/api/disks/4d1abf9a-da81-4de2-bf20-f5f060018e05" id="4d1abf9a-da81-4de2-bf20-f5f060018e05">
3
- <actions>
4
- <link href="/api/disks/4d1abf9a-da81-4de2-bf20-f5f060018e05/export" rel="export"/>
5
- <link href="/api/disks/4d1abf9a-da81-4de2-bf20-f5f060018e05/move" rel="move"/>
6
- <link href="/api/disks/4d1abf9a-da81-4de2-bf20-f5f060018e05/copy" rel="copy"/>
7
- </actions>
8
- <name>Disk 2</name>
9
- <link href="/api/disks/4d1abf9a-da81-4de2-bf20-f5f060018e05/permissions" rel="permissions"/>
10
- <link href="/api/disks/4d1abf9a-da81-4de2-bf20-f5f060018e05/statistics" rel="statistics"/>
11
- <alias>Disk 2</alias>
12
- <image_id>d6034a90-39fa-46ee-888f-208a76f3baa4</image_id>
13
- <storage_domains>
14
- <storage_domain id="a23a4329-33b9-4246-a393-4f91071825b6"/>
15
- </storage_domains>
16
- <size>4294967296</size>
17
- <provisioned_size>4294967296</provisioned_size>
18
- <actual_size>1073741824</actual_size>
19
- <status>
20
- <state>ok</state>
21
- </status>
22
- <interface>virtio</interface>
23
- <format>cow</format>
24
- <sparse>true</sparse>
25
- <bootable>false</bootable>
26
- <shareable>false</shareable>
27
- <wipe_after_delete>false</wipe_after_delete>
28
- <propagate_errors>false</propagate_errors>
29
- </disk>
30
- <disk href="/api/disks/cfebdac5-cefb-488a-8b55-f5f273a1e863" id="cfebdac5-cefb-488a-8b55-f5f273a1e863">
31
- <actions>
32
- <link href="/api/disks/cfebdac5-cefb-488a-8b55-f5f273a1e863/export" rel="export"/>
33
- <link href="/api/disks/cfebdac5-cefb-488a-8b55-f5f273a1e863/move" rel="move"/>
34
- <link href="/api/disks/cfebdac5-cefb-488a-8b55-f5f273a1e863/copy" rel="copy"/>
35
- </actions>
36
- <name>Disk 3</name>
37
- <link href="/api/disks/cfebdac5-cefb-488a-8b55-f5f273a1e863/permissions" rel="permissions"/>
38
- <link href="/api/disks/cfebdac5-cefb-488a-8b55-f5f273a1e863/statistics" rel="statistics"/>
39
- <alias>Disk 3</alias>
40
- <image_id>3d7edbe9-54e1-484c-a77c-3d170f1906bb</image_id>
41
- <storage_domains>
42
- <storage_domain id="c8431bb5-f57b-4ce8-8ba0-17c1859bc767"/>
43
- </storage_domains>
44
- <size>21474836480</size>
45
- <provisioned_size>21474836480</provisioned_size>
46
- <actual_size>1073741824</actual_size>
47
- <status>
48
- <state>ok</state>
49
- </status>
50
- <interface>virtio</interface>
51
- <format>cow</format>
52
- <sparse>true</sparse>
53
- <bootable>false</bootable>
54
- <shareable>false</shareable>
55
- <wipe_after_delete>false</wipe_after_delete>
56
- <propagate_errors>false</propagate_errors>
57
- </disk>
58
- </disks>
@@ -1,42 +0,0 @@
1
- <instance_types>
2
- <instance_type href="/api/instancetypes/00000009-0009-0009-0009-0000000002fa" id="00000009-0009-0009-0009-0000000002fa">
3
- <name>Large</name>
4
- <description>Large instance type</description>
5
- <link href="/api/instancetypes/00000009-0009-0009-0009-0000000002fa/nics" rel="nics"/>
6
- <link href="/api/instancetypes/00000009-0009-0009-0009-0000000002fa/watchdogs" rel="watchdogs"/>
7
- <link href="/api/instancetypes/00000009-0009-0009-0009-0000000002fa/graphicsconsoles" rel="graphicsconsoles"/>
8
- <memory>8589934592</memory>
9
- <cpu>
10
- <topology sockets="2" cores="1" threads="1"/>
11
- </cpu>
12
- <os>
13
- <boot dev="hd"/>
14
- </os>
15
- <creation_time>2014-05-05T02:30:00.000+05:30</creation_time>
16
- <high_availability>
17
- <enabled>false</enabled>
18
- <priority>0</priority>
19
- </high_availability>
20
- <display>
21
- <type>spice</type>
22
- <monitors>1</monitors>
23
- <single_qxl_pci>false</single_qxl_pci>
24
- <smartcard_enabled>false</smartcard_enabled>
25
- </display>
26
- <usb>
27
- <enabled>false</enabled>
28
- </usb>
29
- <migration_downtime>-1</migration_downtime>
30
- <migration>
31
- <auto_converge>inherit</auto_converge>
32
- <compressed>inherit</compressed>
33
- </migration>
34
- <io>
35
- <threads>0</threads>
36
- </io>
37
- <memory_policy>
38
- <guaranteed>8589934592</guaranteed>
39
- <ballooning>false</ballooning>
40
- </memory_policy>
41
- </instance_type>
42
- </instance_types>