ovirt-engine-sdk 4.0.0.alpha0 → 4.0.0.alpha4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (704) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -8
  3. data/lib/ovirt/sdk/v4.rb +3 -2
  4. data/lib/ovirt/sdk/v4/connection.rb +146 -42
  5. data/lib/ovirt/sdk/v4/readers.rb +2 -0
  6. data/lib/ovirt/sdk/v4/readers/action_reader.rb +56 -0
  7. data/lib/ovirt/sdk/v4/readers/affinity_group_reader.rb +12 -5
  8. data/lib/ovirt/sdk/v4/readers/agent_configuration_reader.rb +10 -4
  9. data/lib/ovirt/sdk/v4/readers/agent_reader.rb +14 -6
  10. data/lib/ovirt/sdk/v4/readers/application_reader.rb +12 -5
  11. data/lib/ovirt/sdk/v4/readers/authorized_key_reader.rb +12 -5
  12. data/lib/ovirt/sdk/v4/readers/balance_reader.rb +14 -6
  13. data/lib/ovirt/sdk/v4/readers/bios_reader.rb +12 -5
  14. data/lib/ovirt/sdk/v4/readers/block_statistic_reader.rb +12 -5
  15. data/lib/ovirt/sdk/v4/readers/bonding_reader.rb +14 -6
  16. data/lib/ovirt/sdk/v4/readers/bookmark_reader.rb +10 -4
  17. data/lib/ovirt/sdk/v4/readers/boot_menu_reader.rb +10 -4
  18. data/lib/ovirt/sdk/v4/readers/boot_reader.rb +10 -4
  19. data/lib/ovirt/sdk/v4/readers/brick_profile_detail_reader.rb +14 -6
  20. data/lib/ovirt/sdk/v4/readers/cdrom_reader.rb +20 -9
  21. data/lib/ovirt/sdk/v4/readers/certificate_reader.rb +10 -4
  22. data/lib/ovirt/sdk/v4/readers/cloud_init_reader.rb +20 -9
  23. data/lib/ovirt/sdk/v4/readers/cluster_reader.rb +36 -17
  24. data/lib/ovirt/sdk/v4/readers/configuration_reader.rb +10 -4
  25. data/lib/ovirt/sdk/v4/readers/console_reader.rb +10 -4
  26. data/lib/ovirt/sdk/v4/readers/core_reader.rb +10 -4
  27. data/lib/ovirt/sdk/v4/readers/cpu_profile_reader.rb +14 -6
  28. data/lib/ovirt/sdk/v4/readers/cpu_reader.rb +16 -7
  29. data/lib/ovirt/sdk/v4/readers/cpu_topology_reader.rb +10 -4
  30. data/lib/ovirt/sdk/v4/readers/cpu_tune_reader.rb +12 -5
  31. data/lib/ovirt/sdk/v4/readers/custom_property_reader.rb +10 -4
  32. data/lib/ovirt/sdk/v4/readers/data_center_reader.rb +18 -8
  33. data/lib/ovirt/sdk/v4/readers/device_reader.rb +18 -8
  34. data/lib/ovirt/sdk/v4/readers/disk_profile_reader.rb +14 -6
  35. data/lib/ovirt/sdk/v4/readers/disk_reader.rb +41 -22
  36. data/lib/ovirt/sdk/v4/readers/disk_snapshot_reader.rb +43 -23
  37. data/lib/ovirt/sdk/v4/readers/display_reader.rb +12 -5
  38. data/lib/ovirt/sdk/v4/readers/dns_reader.rb +14 -6
  39. data/lib/ovirt/sdk/v4/readers/domain_reader.rb +12 -5
  40. data/lib/ovirt/sdk/v4/readers/entity_profile_detail_reader.rb +12 -5
  41. data/lib/ovirt/sdk/v4/readers/error_handling_reader.rb +10 -4
  42. data/lib/ovirt/sdk/v4/readers/event_reader.rb +24 -11
  43. data/lib/ovirt/sdk/v4/readers/external_compute_resource_reader.rb +12 -5
  44. data/lib/ovirt/sdk/v4/readers/external_discovered_host_reader.rb +12 -5
  45. data/lib/ovirt/sdk/v4/readers/external_host_group_reader.rb +12 -5
  46. data/lib/ovirt/sdk/v4/readers/external_host_provider_reader.rb +12 -5
  47. data/lib/ovirt/sdk/v4/readers/external_host_reader.rb +12 -5
  48. data/lib/ovirt/sdk/v4/readers/external_provider_reader.rb +12 -5
  49. data/lib/ovirt/sdk/v4/readers/fault_reader.rb +58 -0
  50. data/lib/ovirt/sdk/v4/readers/fencing_policy_reader.rb +14 -6
  51. data/lib/ovirt/sdk/v4/readers/file_reader.rb +12 -5
  52. data/lib/ovirt/sdk/v4/readers/filter_reader.rb +12 -5
  53. data/lib/ovirt/sdk/v4/readers/floppy_reader.rb +20 -9
  54. data/lib/ovirt/sdk/v4/readers/fop_statistic_reader.rb +12 -5
  55. data/lib/ovirt/sdk/v4/readers/gluster_brick_advanced_details_reader.rb +22 -10
  56. data/lib/ovirt/sdk/v4/readers/gluster_brick_memory_info_reader.rb +12 -5
  57. data/lib/ovirt/sdk/v4/readers/gluster_brick_reader.rb +26 -12
  58. data/lib/ovirt/sdk/v4/readers/gluster_client_reader.rb +10 -4
  59. data/lib/ovirt/sdk/v4/readers/gluster_hook_reader.rb +16 -7
  60. data/lib/ovirt/sdk/v4/readers/gluster_memory_pool_reader.rb +10 -4
  61. data/lib/ovirt/sdk/v4/readers/gluster_server_hook_reader.rb +14 -6
  62. data/lib/ovirt/sdk/v4/readers/gluster_volume_profile_details_reader.rb +14 -6
  63. data/lib/ovirt/sdk/v4/readers/gluster_volume_reader.rb +18 -8
  64. data/lib/ovirt/sdk/v4/readers/graphics_console_reader.rb +16 -7
  65. data/lib/ovirt/sdk/v4/readers/group_reader.rb +14 -6
  66. data/lib/ovirt/sdk/v4/readers/guest_operating_system_reader.rb +14 -6
  67. data/lib/ovirt/sdk/v4/readers/hardware_information_reader.rb +10 -4
  68. data/lib/ovirt/sdk/v4/readers/high_availability_reader.rb +10 -4
  69. data/lib/ovirt/sdk/v4/readers/hook_reader.rb +12 -5
  70. data/lib/ovirt/sdk/v4/readers/host_device_passthrough_reader.rb +10 -4
  71. data/lib/ovirt/sdk/v4/readers/host_device_reader.rb +22 -10
  72. data/lib/ovirt/sdk/v4/readers/host_nic_reader.rb +36 -17
  73. data/lib/ovirt/sdk/v4/readers/host_nic_virtual_functions_configuration_reader.rb +10 -4
  74. data/lib/ovirt/sdk/v4/readers/host_reader.rb +60 -29
  75. data/lib/ovirt/sdk/v4/readers/host_storage_reader.rb +16 -7
  76. data/lib/ovirt/sdk/v4/readers/hosted_engine_reader.rb +10 -4
  77. data/lib/ovirt/sdk/v4/readers/icon_reader.rb +10 -4
  78. data/lib/ovirt/sdk/v4/readers/identified_reader.rb +10 -4
  79. data/lib/ovirt/sdk/v4/readers/image_reader.rb +12 -5
  80. data/lib/ovirt/sdk/v4/readers/initialization_reader.rb +16 -7
  81. data/lib/ovirt/sdk/v4/readers/instance_type_reader.rb +62 -30
  82. data/lib/ovirt/sdk/v4/readers/io_reader.rb +10 -4
  83. data/lib/ovirt/sdk/v4/readers/ip_address_assignment_reader.rb +12 -5
  84. data/lib/ovirt/sdk/v4/readers/ip_reader.rb +10 -4
  85. data/lib/ovirt/sdk/v4/readers/iscsi_bond_reader.rb +16 -7
  86. data/lib/ovirt/sdk/v4/readers/iscsi_details_reader.rb +10 -4
  87. data/lib/ovirt/sdk/v4/readers/job_reader.rb +14 -6
  88. data/lib/ovirt/sdk/v4/readers/katello_erratum_reader.rb +16 -7
  89. data/lib/ovirt/sdk/v4/readers/kernel_reader.rb +12 -5
  90. data/lib/ovirt/sdk/v4/readers/ksm_reader.rb +10 -4
  91. data/lib/ovirt/sdk/v4/readers/label_reader.rb +14 -6
  92. data/lib/ovirt/sdk/v4/readers/logical_unit_reader.rb +10 -4
  93. data/lib/ovirt/sdk/v4/readers/mac_pool_reader.rb +12 -5
  94. data/lib/ovirt/sdk/v4/readers/mac_reader.rb +10 -4
  95. data/lib/ovirt/sdk/v4/readers/memory_over_commit_reader.rb +10 -4
  96. data/lib/ovirt/sdk/v4/readers/memory_policy_reader.rb +14 -6
  97. data/lib/ovirt/sdk/v4/readers/method_reader.rb +10 -4
  98. data/lib/ovirt/sdk/v4/readers/migration_options_reader.rb +10 -4
  99. data/lib/ovirt/sdk/v4/readers/network_attachment_reader.rb +24 -11
  100. data/lib/ovirt/sdk/v4/readers/network_configuration_reader.rb +14 -6
  101. data/lib/ovirt/sdk/v4/readers/network_reader.rb +24 -11
  102. data/lib/ovirt/sdk/v4/readers/nfs_profile_detail_reader.rb +12 -5
  103. data/lib/ovirt/sdk/v4/readers/nic_configuration_reader.rb +12 -5
  104. data/lib/ovirt/sdk/v4/readers/nic_reader.rb +33 -18
  105. data/lib/ovirt/sdk/v4/readers/numa_node_pin_reader.rb +12 -5
  106. data/lib/ovirt/sdk/v4/readers/numa_node_reader.rb +16 -7
  107. data/lib/ovirt/sdk/v4/readers/open_stack_image_provider_reader.rb +12 -5
  108. data/lib/ovirt/sdk/v4/readers/open_stack_image_reader.rb +12 -5
  109. data/lib/ovirt/sdk/v4/readers/open_stack_network_provider_reader.rb +14 -6
  110. data/lib/ovirt/sdk/v4/readers/open_stack_network_reader.rb +12 -5
  111. data/lib/ovirt/sdk/v4/readers/open_stack_provider_reader.rb +12 -5
  112. data/lib/ovirt/sdk/v4/readers/open_stack_subnet_reader.rb +12 -5
  113. data/lib/ovirt/sdk/v4/readers/open_stack_volume_provider_reader.rb +14 -6
  114. data/lib/ovirt/sdk/v4/readers/open_stack_volume_type_reader.rb +14 -6
  115. data/lib/ovirt/sdk/v4/readers/openstack_volume_authentication_key_reader.rb +12 -5
  116. data/lib/ovirt/sdk/v4/readers/operating_system_info_reader.rb +14 -6
  117. data/lib/ovirt/sdk/v4/readers/operating_system_reader.rb +14 -6
  118. data/lib/ovirt/sdk/v4/readers/option_reader.rb +10 -4
  119. data/lib/ovirt/sdk/v4/readers/package_reader.rb +10 -4
  120. data/lib/ovirt/sdk/v4/readers/payload_reader.rb +12 -5
  121. data/lib/ovirt/sdk/v4/readers/permission_reader.rb +32 -15
  122. data/lib/ovirt/sdk/v4/readers/permit_reader.rb +12 -5
  123. data/lib/ovirt/sdk/v4/readers/pm_proxy_reader.rb +10 -4
  124. data/lib/ovirt/sdk/v4/readers/port_mirroring_reader.rb +10 -4
  125. data/lib/ovirt/sdk/v4/readers/power_management_reader.rb +18 -8
  126. data/lib/ovirt/sdk/v4/readers/product_reader.rb +10 -4
  127. data/lib/ovirt/sdk/v4/readers/profile_detail_reader.rb +16 -7
  128. data/lib/ovirt/sdk/v4/readers/property_reader.rb +10 -4
  129. data/lib/ovirt/sdk/v4/readers/proxy_ticket_reader.rb +10 -4
  130. data/lib/ovirt/sdk/v4/readers/qos_reader.rb +12 -5
  131. data/lib/ovirt/sdk/v4/readers/quota_cluster_limit_reader.rb +14 -6
  132. data/lib/ovirt/sdk/v4/readers/quota_reader.rb +18 -8
  133. data/lib/ovirt/sdk/v4/readers/quota_storage_limit_reader.rb +14 -6
  134. data/lib/ovirt/sdk/v4/readers/range_reader.rb +10 -4
  135. data/lib/ovirt/sdk/v4/readers/rate_reader.rb +10 -4
  136. data/lib/ovirt/sdk/v4/readers/reported_configuration_reader.rb +10 -4
  137. data/lib/ovirt/sdk/v4/readers/reported_device_reader.rb +16 -7
  138. data/lib/ovirt/sdk/v4/readers/rng_device_reader.rb +12 -5
  139. data/lib/ovirt/sdk/v4/readers/role_reader.rb +14 -6
  140. data/lib/ovirt/sdk/v4/readers/scheduling_policy_reader.rb +12 -5
  141. data/lib/ovirt/sdk/v4/readers/scheduling_policy_unit_reader.rb +12 -5
  142. data/lib/ovirt/sdk/v4/readers/se_linux_reader.rb +10 -4
  143. data/lib/ovirt/sdk/v4/readers/serial_number_reader.rb +10 -4
  144. data/lib/ovirt/sdk/v4/readers/session_reader.rb +16 -7
  145. data/lib/ovirt/sdk/v4/readers/skip_if_connectivity_broken_reader.rb +10 -4
  146. data/lib/ovirt/sdk/v4/readers/skip_if_sd_active_reader.rb +10 -4
  147. data/lib/ovirt/sdk/v4/readers/snapshot_reader.rb +102 -50
  148. data/lib/ovirt/sdk/v4/readers/spm_reader.rb +12 -5
  149. data/lib/ovirt/sdk/v4/readers/ssh_public_key_reader.rb +12 -5
  150. data/lib/ovirt/sdk/v4/readers/ssh_reader.rb +12 -5
  151. data/lib/ovirt/sdk/v4/readers/sso_reader.rb +12 -5
  152. data/lib/ovirt/sdk/v4/readers/statistic_reader.rb +30 -14
  153. data/lib/ovirt/sdk/v4/readers/status_reader.rb +10 -4
  154. data/lib/ovirt/sdk/v4/readers/step_reader.rb +16 -7
  155. data/lib/ovirt/sdk/v4/readers/storage_connection_extension_reader.rb +12 -5
  156. data/lib/ovirt/sdk/v4/readers/storage_connection_reader.rb +12 -5
  157. data/lib/ovirt/sdk/v4/readers/storage_domain_reader.rb +26 -14
  158. data/lib/ovirt/sdk/v4/readers/tag_reader.rb +22 -10
  159. data/lib/ovirt/sdk/v4/readers/template_reader.rb +62 -30
  160. data/lib/ovirt/sdk/v4/readers/template_version_reader.rb +12 -5
  161. data/lib/ovirt/sdk/v4/readers/ticket_reader.rb +10 -4
  162. data/lib/ovirt/sdk/v4/readers/time_zone_reader.rb +10 -4
  163. data/lib/ovirt/sdk/v4/readers/transparent_huge_pages_reader.rb +10 -4
  164. data/lib/ovirt/sdk/v4/readers/unmanaged_network_reader.rb +14 -6
  165. data/lib/ovirt/sdk/v4/readers/usb_reader.rb +10 -4
  166. data/lib/ovirt/sdk/v4/readers/user_reader.rb +16 -7
  167. data/lib/ovirt/sdk/v4/readers/value_reader.rb +10 -4
  168. data/lib/ovirt/sdk/v4/readers/vcpu_pin_reader.rb +10 -4
  169. data/lib/ovirt/sdk/v4/readers/vendor_reader.rb +10 -4
  170. data/lib/ovirt/sdk/v4/readers/version_reader.rb +10 -4
  171. data/lib/ovirt/sdk/v4/readers/virtio_scsi_reader.rb +10 -4
  172. data/lib/ovirt/sdk/v4/readers/virtual_numa_node_reader.rb +20 -9
  173. data/lib/ovirt/sdk/v4/readers/vlan_reader.rb +10 -4
  174. data/lib/ovirt/sdk/v4/readers/vm_base_reader.rb +58 -28
  175. data/lib/ovirt/sdk/v4/readers/vm_placement_policy_reader.rb +12 -5
  176. data/lib/ovirt/sdk/v4/readers/vm_pool_reader.rb +20 -9
  177. data/lib/ovirt/sdk/v4/readers/vm_reader.rb +100 -49
  178. data/lib/ovirt/sdk/v4/readers/vm_summary_reader.rb +10 -4
  179. data/lib/ovirt/sdk/v4/readers/vnic_pass_through_reader.rb +10 -4
  180. data/lib/ovirt/sdk/v4/readers/vnic_profile_reader.rb +18 -8
  181. data/lib/ovirt/sdk/v4/readers/volume_group_reader.rb +12 -5
  182. data/lib/ovirt/sdk/v4/readers/watchdog_reader.rb +18 -8
  183. data/lib/ovirt/sdk/v4/readers/weight_reader.rb +14 -6
  184. data/lib/ovirt/sdk/v4/services.rb +4 -4
  185. data/lib/ovirt/sdk/v4/services/affinity_group_service.rb +64 -18
  186. data/lib/ovirt/sdk/v4/services/affinity_group_vm_service.rb +23 -0
  187. data/lib/ovirt/sdk/v4/services/affinity_group_vms_service.rb +59 -7
  188. data/lib/ovirt/sdk/v4/services/affinity_groups_service.rb +59 -7
  189. data/lib/ovirt/sdk/v4/services/assigned_cpu_profile_service.rb +35 -6
  190. data/lib/ovirt/sdk/v4/services/assigned_cpu_profiles_service.rb +59 -7
  191. data/lib/ovirt/sdk/v4/services/assigned_disk_profile_service.rb +35 -6
  192. data/lib/ovirt/sdk/v4/services/assigned_disk_profiles_service.rb +59 -7
  193. data/lib/ovirt/sdk/v4/services/assigned_network_service.rb +57 -17
  194. data/lib/ovirt/sdk/v4/services/assigned_networks_service.rb +59 -7
  195. data/lib/ovirt/sdk/v4/services/assigned_permissions_service.rb +54 -7
  196. data/lib/ovirt/sdk/v4/services/assigned_roles_service.rb +29 -7
  197. data/lib/ovirt/sdk/v4/services/assigned_tag_service.rb +35 -6
  198. data/lib/ovirt/sdk/v4/services/assigned_tags_service.rb +59 -7
  199. data/lib/ovirt/sdk/v4/services/assigned_vnic_profile_service.rb +42 -7
  200. data/lib/ovirt/sdk/v4/services/assigned_vnic_profiles_service.rb +59 -7
  201. data/lib/ovirt/sdk/v4/services/attached_storage_domain_service.rb +90 -7
  202. data/lib/ovirt/sdk/v4/services/attached_storage_domains_service.rb +59 -7
  203. data/lib/ovirt/sdk/v4/services/balance_service.rb +41 -6
  204. data/lib/ovirt/sdk/v4/services/balances_service.rb +65 -7
  205. data/lib/ovirt/sdk/v4/services/bookmark_service.rb +57 -17
  206. data/lib/ovirt/sdk/v4/services/bookmarks_service.rb +59 -7
  207. data/lib/ovirt/sdk/v4/services/cluster_service.rb +127 -21
  208. data/lib/ovirt/sdk/v4/services/clusters_service.rb +76 -7
  209. data/lib/ovirt/sdk/v4/services/copyable_service.rb +31 -0
  210. data/lib/ovirt/sdk/v4/services/cpu_profile_service.rb +64 -18
  211. data/lib/ovirt/sdk/v4/services/cpu_profiles_service.rb +59 -7
  212. data/lib/ovirt/sdk/v4/services/data_center_service.rb +112 -24
  213. data/lib/ovirt/sdk/v4/services/data_centers_service.rb +76 -7
  214. data/lib/ovirt/sdk/v4/services/disk_profile_service.rb +64 -18
  215. data/lib/ovirt/sdk/v4/services/disk_profiles_service.rb +59 -7
  216. data/lib/ovirt/sdk/v4/services/disk_service.rb +135 -8
  217. data/lib/ovirt/sdk/v4/services/disk_snapshot_service.rb +35 -6
  218. data/lib/ovirt/sdk/v4/services/disk_snapshots_service.rb +29 -7
  219. data/lib/ovirt/sdk/v4/services/disks_service.rb +70 -7
  220. data/lib/ovirt/sdk/v4/services/domain_group_service.rb +19 -6
  221. data/lib/ovirt/sdk/v4/services/domain_groups_service.rb +40 -7
  222. data/lib/ovirt/sdk/v4/services/domain_service.rb +33 -8
  223. data/lib/ovirt/sdk/v4/services/domain_user_service.rb +19 -6
  224. data/lib/ovirt/sdk/v4/services/domain_users_service.rb +40 -7
  225. data/lib/ovirt/sdk/v4/services/domains_service.rb +29 -7
  226. data/lib/ovirt/sdk/v4/services/engine_katello_errata_service.rb +76 -0
  227. data/lib/ovirt/sdk/v4/services/event_service.rb +35 -6
  228. data/lib/ovirt/sdk/v4/services/events_service.rb +94 -7
  229. data/lib/ovirt/sdk/v4/services/external_compute_resource_service.rb +19 -6
  230. data/lib/ovirt/sdk/v4/services/external_compute_resources_service.rb +29 -7
  231. data/lib/ovirt/sdk/v4/services/external_discovered_host_service.rb +19 -6
  232. data/lib/ovirt/sdk/v4/services/external_discovered_hosts_service.rb +29 -7
  233. data/lib/ovirt/sdk/v4/services/external_host_group_service.rb +19 -6
  234. data/lib/ovirt/sdk/v4/services/external_host_groups_service.rb +29 -7
  235. data/lib/ovirt/sdk/v4/services/external_host_provider_service.rb +138 -20
  236. data/lib/ovirt/sdk/v4/services/external_host_providers_service.rb +59 -7
  237. data/lib/ovirt/sdk/v4/services/external_host_service.rb +19 -6
  238. data/lib/ovirt/sdk/v4/services/external_hosts_service.rb +29 -7
  239. data/lib/ovirt/sdk/v4/services/external_provider_certificate_service.rb +19 -6
  240. data/lib/ovirt/sdk/v4/services/external_provider_certificates_service.rb +29 -7
  241. data/lib/ovirt/sdk/v4/services/external_provider_service.rb +62 -1
  242. data/lib/ovirt/sdk/v4/services/fence_agent_service.rb +57 -17
  243. data/lib/ovirt/sdk/v4/services/fence_agents_service.rb +59 -7
  244. data/lib/ovirt/sdk/v4/services/file_service.rb +19 -6
  245. data/lib/ovirt/sdk/v4/services/files_service.rb +40 -7
  246. data/lib/ovirt/sdk/v4/services/filter_service.rb +41 -6
  247. data/lib/ovirt/sdk/v4/services/filters_service.rb +65 -7
  248. data/lib/ovirt/sdk/v4/services/gluster_brick_service.rb +68 -7
  249. data/lib/ovirt/sdk/v4/services/gluster_bricks_service.rb +163 -7
  250. data/lib/ovirt/sdk/v4/services/gluster_hook_service.rb +111 -6
  251. data/lib/ovirt/sdk/v4/services/gluster_hooks_service.rb +29 -7
  252. data/lib/ovirt/sdk/v4/services/gluster_volume_service.rb +301 -8
  253. data/lib/ovirt/sdk/v4/services/gluster_volumes_service.rb +70 -7
  254. data/lib/ovirt/sdk/v4/services/graphics_console_service.rb +35 -6
  255. data/lib/ovirt/sdk/v4/services/graphics_consoles_service.rb +59 -7
  256. data/lib/ovirt/sdk/v4/services/group_service.rb +56 -9
  257. data/lib/ovirt/sdk/v4/services/groups_service.rb +70 -7
  258. data/lib/ovirt/sdk/v4/services/host_device_service.rb +19 -6
  259. data/lib/ovirt/sdk/v4/services/host_devices_service.rb +29 -7
  260. data/lib/ovirt/sdk/v4/services/host_hook_service.rb +19 -6
  261. data/lib/ovirt/sdk/v4/services/host_hooks_service.rb +29 -7
  262. data/lib/ovirt/sdk/v4/services/host_nic_service.rb +168 -22
  263. data/lib/ovirt/sdk/v4/services/host_nics_service.rb +91 -7
  264. data/lib/ovirt/sdk/v4/services/host_numa_node_service.rb +26 -7
  265. data/lib/ovirt/sdk/v4/services/host_numa_nodes_service.rb +29 -7
  266. data/lib/ovirt/sdk/v4/services/host_service.rb +526 -28
  267. data/lib/ovirt/sdk/v4/services/host_storage_service.rb +24 -7
  268. data/lib/ovirt/sdk/v4/services/hosts_service.rb +76 -7
  269. data/lib/ovirt/sdk/v4/services/icon_service.rb +19 -6
  270. data/lib/ovirt/sdk/v4/services/icons_service.rb +29 -7
  271. data/lib/ovirt/sdk/v4/services/image_service.rb +49 -6
  272. data/lib/ovirt/sdk/v4/services/images_service.rb +29 -7
  273. data/lib/ovirt/sdk/v4/services/instance_type_nic_service.rb +57 -17
  274. data/lib/ovirt/sdk/v4/services/instance_type_nics_service.rb +59 -7
  275. data/lib/ovirt/sdk/v4/services/instance_type_service.rb +78 -20
  276. data/lib/ovirt/sdk/v4/services/instance_type_watchdog_service.rb +57 -17
  277. data/lib/ovirt/sdk/v4/services/instance_type_watchdogs_service.rb +59 -7
  278. data/lib/ovirt/sdk/v4/services/instance_types_service.rb +59 -7
  279. data/lib/ovirt/sdk/v4/services/iscsi_bond_service.rb +71 -19
  280. data/lib/ovirt/sdk/v4/services/iscsi_bonds_service.rb +59 -7
  281. data/lib/ovirt/sdk/v4/services/job_service.rb +76 -7
  282. data/lib/ovirt/sdk/v4/services/jobs_service.rb +59 -7
  283. data/lib/ovirt/sdk/v4/services/katello_errata_service.rb +29 -7
  284. data/lib/ovirt/sdk/v4/services/katello_erratum_service.rb +19 -6
  285. data/lib/ovirt/sdk/v4/services/label_service.rb +35 -6
  286. data/lib/ovirt/sdk/v4/services/labels_service.rb +59 -7
  287. data/lib/ovirt/sdk/v4/services/mac_pool_service.rb +57 -17
  288. data/lib/ovirt/sdk/v4/services/mac_pools_service.rb +59 -7
  289. data/lib/ovirt/sdk/v4/services/measurable_service.rb +14 -1
  290. data/lib/ovirt/sdk/v4/services/moveable_service.rb +31 -0
  291. data/lib/ovirt/sdk/v4/services/network_attachment_service.rb +57 -17
  292. data/lib/ovirt/sdk/v4/services/network_attachments_service.rb +59 -7
  293. data/lib/ovirt/sdk/v4/services/network_service.rb +78 -20
  294. data/lib/ovirt/sdk/v4/services/networks_service.rb +70 -7
  295. data/lib/ovirt/sdk/v4/services/openstack_image_provider_service.rb +117 -17
  296. data/lib/ovirt/sdk/v4/services/openstack_image_providers_service.rb +59 -7
  297. data/lib/ovirt/sdk/v4/services/openstack_image_service.rb +51 -6
  298. data/lib/ovirt/sdk/v4/services/openstack_images_service.rb +29 -7
  299. data/lib/ovirt/sdk/v4/services/openstack_network_provider_service.rb +117 -17
  300. data/lib/ovirt/sdk/v4/services/openstack_network_providers_service.rb +59 -7
  301. data/lib/ovirt/sdk/v4/services/openstack_network_service.rb +26 -7
  302. data/lib/ovirt/sdk/v4/services/openstack_networks_service.rb +29 -7
  303. data/lib/ovirt/sdk/v4/services/openstack_subnet_service.rb +35 -6
  304. data/lib/ovirt/sdk/v4/services/openstack_subnets_service.rb +59 -7
  305. data/lib/ovirt/sdk/v4/services/openstack_volume_authentication_key_service.rb +57 -17
  306. data/lib/ovirt/sdk/v4/services/openstack_volume_authentication_keys_service.rb +59 -7
  307. data/lib/ovirt/sdk/v4/services/openstack_volume_provider_service.rb +124 -18
  308. data/lib/ovirt/sdk/v4/services/openstack_volume_providers_service.rb +59 -7
  309. data/lib/ovirt/sdk/v4/services/openstack_volume_type_service.rb +19 -6
  310. data/lib/ovirt/sdk/v4/services/openstack_volume_types_service.rb +29 -7
  311. data/lib/ovirt/sdk/v4/services/operating_system_service.rb +19 -6
  312. data/lib/ovirt/sdk/v4/services/operating_systems_service.rb +29 -7
  313. data/lib/ovirt/sdk/v4/services/permission_service.rb +35 -6
  314. data/lib/ovirt/sdk/v4/services/permit_service.rb +35 -6
  315. data/lib/ovirt/sdk/v4/services/permits_service.rb +59 -7
  316. data/lib/ovirt/sdk/v4/services/qos_service.rb +57 -17
  317. data/lib/ovirt/sdk/v4/services/qoss_service.rb +59 -7
  318. data/lib/ovirt/sdk/v4/services/quota_cluster_limit_service.rb +35 -6
  319. data/lib/ovirt/sdk/v4/services/quota_cluster_limits_service.rb +59 -7
  320. data/lib/ovirt/sdk/v4/services/quota_service.rb +78 -20
  321. data/lib/ovirt/sdk/v4/services/quota_storage_limit_service.rb +35 -6
  322. data/lib/ovirt/sdk/v4/services/quota_storage_limits_service.rb +59 -7
  323. data/lib/ovirt/sdk/v4/services/quotas_service.rb +59 -7
  324. data/lib/ovirt/sdk/v4/services/role_service.rb +64 -18
  325. data/lib/ovirt/sdk/v4/services/roles_service.rb +59 -7
  326. data/lib/ovirt/sdk/v4/services/scheduling_policies_service.rb +65 -7
  327. data/lib/ovirt/sdk/v4/services/scheduling_policy_service.rb +84 -20
  328. data/lib/ovirt/sdk/v4/services/scheduling_policy_unit_service.rb +41 -6
  329. data/lib/ovirt/sdk/v4/services/scheduling_policy_units_service.rb +35 -7
  330. data/lib/ovirt/sdk/v4/services/service.rb +71 -0
  331. data/lib/ovirt/sdk/v4/services/snapshot_cdrom_service.rb +19 -6
  332. data/lib/ovirt/sdk/v4/services/snapshot_cdroms_service.rb +29 -7
  333. data/lib/ovirt/sdk/v4/services/snapshot_disk_service.rb +19 -6
  334. data/lib/ovirt/sdk/v4/services/snapshot_disks_service.rb +29 -7
  335. data/lib/ovirt/sdk/v4/services/snapshot_nic_service.rb +19 -6
  336. data/lib/ovirt/sdk/v4/services/snapshot_nics_service.rb +29 -7
  337. data/lib/ovirt/sdk/v4/services/snapshot_service.rb +84 -9
  338. data/lib/ovirt/sdk/v4/services/snapshots_service.rb +59 -7
  339. data/lib/ovirt/sdk/v4/services/ssh_public_key_service.rb +57 -17
  340. data/lib/ovirt/sdk/v4/services/ssh_public_keys_service.rb +59 -7
  341. data/lib/ovirt/sdk/v4/services/statistic_service.rb +24 -6
  342. data/lib/ovirt/sdk/v4/services/statistics_service.rb +29 -7
  343. data/lib/ovirt/sdk/v4/services/step_service.rb +54 -7
  344. data/lib/ovirt/sdk/v4/services/steps_service.rb +59 -7
  345. data/lib/ovirt/sdk/v4/services/storage_domain_content_disk_service.rb +25 -6
  346. data/lib/ovirt/sdk/v4/services/storage_domain_content_disks_service.rb +40 -7
  347. data/lib/ovirt/sdk/v4/services/storage_domain_server_connection_service.rb +35 -6
  348. data/lib/ovirt/sdk/v4/services/storage_domain_server_connections_service.rb +59 -7
  349. data/lib/ovirt/sdk/v4/services/storage_domain_service.rb +176 -24
  350. data/lib/ovirt/sdk/v4/services/storage_domain_template_service.rb +110 -7
  351. data/lib/ovirt/sdk/v4/services/storage_domain_templates_service.rb +29 -7
  352. data/lib/ovirt/sdk/v4/services/storage_domain_vm_service.rb +104 -7
  353. data/lib/ovirt/sdk/v4/services/storage_domain_vms_service.rb +29 -7
  354. data/lib/ovirt/sdk/v4/services/storage_domains_service.rb +76 -7
  355. data/lib/ovirt/sdk/v4/services/storage_server_connection_extension_service.rb +57 -17
  356. data/lib/ovirt/sdk/v4/services/storage_server_connection_extensions_service.rb +59 -7
  357. data/lib/ovirt/sdk/v4/services/storage_server_connection_service.rb +57 -17
  358. data/lib/ovirt/sdk/v4/services/storage_server_connections_service.rb +59 -7
  359. data/lib/ovirt/sdk/v4/services/storage_service.rb +19 -6
  360. data/lib/ovirt/sdk/v4/services/system_permissions_service.rb +54 -7
  361. data/lib/ovirt/sdk/v4/services/system_service.rb +263 -34
  362. data/lib/ovirt/sdk/v4/services/tag_service.rb +57 -17
  363. data/lib/ovirt/sdk/v4/services/tags_service.rb +59 -7
  364. data/lib/ovirt/sdk/v4/services/template_cdrom_service.rb +19 -6
  365. data/lib/ovirt/sdk/v4/services/template_cdroms_service.rb +29 -7
  366. data/lib/ovirt/sdk/v4/services/template_disk_service.rb +87 -6
  367. data/lib/ovirt/sdk/v4/services/template_disks_service.rb +29 -7
  368. data/lib/ovirt/sdk/v4/services/template_nic_service.rb +57 -17
  369. data/lib/ovirt/sdk/v4/services/template_nics_service.rb +59 -7
  370. data/lib/ovirt/sdk/v4/services/template_service.rb +138 -24
  371. data/lib/ovirt/sdk/v4/services/template_watchdog_service.rb +57 -17
  372. data/lib/ovirt/sdk/v4/services/template_watchdogs_service.rb +59 -7
  373. data/lib/ovirt/sdk/v4/services/templates_service.rb +76 -7
  374. data/lib/ovirt/sdk/v4/services/unmanaged_network_service.rb +35 -6
  375. data/lib/ovirt/sdk/v4/services/unmanaged_networks_service.rb +29 -7
  376. data/lib/ovirt/sdk/v4/services/user_service.rb +63 -10
  377. data/lib/ovirt/sdk/v4/services/users_service.rb +70 -7
  378. data/lib/ovirt/sdk/v4/services/virtual_function_allowed_network_service.rb +35 -6
  379. data/lib/ovirt/sdk/v4/services/virtual_function_allowed_networks_service.rb +59 -7
  380. data/lib/ovirt/sdk/v4/services/vm_application_service.rb +25 -6
  381. data/lib/ovirt/sdk/v4/services/vm_applications_service.rb +35 -7
  382. data/lib/ovirt/sdk/v4/services/vm_cdrom_service.rb +57 -17
  383. data/lib/ovirt/sdk/v4/services/vm_cdroms_service.rb +59 -7
  384. data/lib/ovirt/sdk/v4/services/vm_disk_service.rb +169 -17
  385. data/lib/ovirt/sdk/v4/services/vm_disks_service.rb +59 -7
  386. data/lib/ovirt/sdk/v4/services/vm_graphics_console_service.rb +59 -6
  387. data/lib/ovirt/sdk/v4/services/vm_host_device_service.rb +35 -6
  388. data/lib/ovirt/sdk/v4/services/vm_host_devices_service.rb +59 -7
  389. data/lib/ovirt/sdk/v4/services/vm_nic_service.rb +119 -19
  390. data/lib/ovirt/sdk/v4/services/vm_nics_service.rb +59 -7
  391. data/lib/ovirt/sdk/v4/services/vm_numa_node_service.rb +57 -17
  392. data/lib/ovirt/sdk/v4/services/vm_numa_nodes_service.rb +59 -7
  393. data/lib/ovirt/sdk/v4/services/vm_pool_service.rb +94 -18
  394. data/lib/ovirt/sdk/v4/services/vm_pools_service.rb +76 -7
  395. data/lib/ovirt/sdk/v4/services/vm_reported_device_service.rb +19 -6
  396. data/lib/ovirt/sdk/v4/services/vm_reported_devices_service.rb +29 -7
  397. data/lib/ovirt/sdk/v4/services/vm_service.rb +692 -32
  398. data/lib/ovirt/sdk/v4/services/vm_session_service.rb +19 -6
  399. data/lib/ovirt/sdk/v4/services/vm_sessions_service.rb +29 -7
  400. data/lib/ovirt/sdk/v4/services/vm_watchdog_service.rb +57 -17
  401. data/lib/ovirt/sdk/v4/services/vm_watchdogs_service.rb +59 -7
  402. data/lib/ovirt/sdk/v4/services/vms_service.rb +71 -7
  403. data/lib/ovirt/sdk/v4/services/vnic_profile_service.rb +64 -18
  404. data/lib/ovirt/sdk/v4/services/vnic_profiles_service.rb +59 -7
  405. data/lib/ovirt/sdk/v4/services/weight_service.rb +41 -6
  406. data/lib/ovirt/sdk/v4/services/weights_service.rb +65 -7
  407. data/lib/ovirt/sdk/v4/types.rb +84 -81
  408. data/lib/ovirt/sdk/v4/types/{type.rb → action.rb} +6 -8
  409. data/lib/ovirt/sdk/v4/types/agent.rb +7 -9
  410. data/lib/ovirt/sdk/v4/types/agent_configuration.rb +1 -1
  411. data/lib/ovirt/sdk/v4/types/bios.rb +1 -1
  412. data/lib/ovirt/sdk/v4/types/block_statistic.rb +8 -10
  413. data/lib/ovirt/sdk/v4/types/bonding.rb +15 -19
  414. data/lib/ovirt/sdk/v4/types/boot.rb +1 -1
  415. data/lib/ovirt/sdk/v4/types/boot_menu.rb +1 -1
  416. data/lib/ovirt/sdk/v4/types/cloud_init.rb +22 -28
  417. data/lib/ovirt/sdk/v4/types/cluster.rb +7 -9
  418. data/lib/ovirt/sdk/v4/types/configuration.rb +1 -1
  419. data/lib/ovirt/sdk/v4/types/console.rb +1 -1
  420. data/lib/ovirt/sdk/v4/types/core.rb +1 -1
  421. data/lib/ovirt/sdk/v4/types/cpu.rb +8 -10
  422. data/lib/ovirt/sdk/v4/types/cpu_topology.rb +1 -1
  423. data/lib/ovirt/sdk/v4/types/cpu_tune.rb +8 -10
  424. data/lib/ovirt/sdk/v4/types/custom_property.rb +1 -1
  425. data/lib/ovirt/sdk/v4/types/data_center.rb +7 -9
  426. data/lib/ovirt/sdk/v4/types/device.rb +7 -9
  427. data/lib/ovirt/sdk/v4/types/disk.rb +29 -33
  428. data/lib/ovirt/sdk/v4/types/display.rb +1 -1
  429. data/lib/ovirt/sdk/v4/types/dns.rb +15 -19
  430. data/lib/ovirt/sdk/v4/types/entity_profile_detail.rb +8 -10
  431. data/lib/ovirt/sdk/v4/types/error_handling.rb +1 -1
  432. data/lib/ovirt/sdk/v4/types/external_provider.rb +7 -9
  433. data/lib/ovirt/sdk/v4/types/fault.rb +33 -0
  434. data/lib/ovirt/sdk/v4/types/fencing_policy.rb +1 -1
  435. data/lib/ovirt/sdk/v4/types/fop_statistic.rb +8 -10
  436. data/lib/ovirt/sdk/v4/types/gluster_brick_advanced_details.rb +14 -18
  437. data/lib/ovirt/sdk/v4/types/gluster_brick_memory_info.rb +8 -10
  438. data/lib/ovirt/sdk/v4/types/gluster_client.rb +1 -1
  439. data/lib/ovirt/sdk/v4/types/gluster_hook.rb +7 -9
  440. data/lib/ovirt/sdk/v4/types/gluster_volume.rb +14 -18
  441. data/lib/ovirt/sdk/v4/types/gluster_volume_profile_details.rb +14 -18
  442. data/lib/ovirt/sdk/v4/types/guest_operating_system.rb +1 -1
  443. data/lib/ovirt/sdk/v4/types/hardware_information.rb +1 -1
  444. data/lib/ovirt/sdk/v4/types/high_availability.rb +1 -1
  445. data/lib/ovirt/sdk/v4/types/host.rb +21 -27
  446. data/lib/ovirt/sdk/v4/types/host_device_passthrough.rb +1 -1
  447. data/lib/ovirt/sdk/v4/types/host_nic.rb +21 -27
  448. data/lib/ovirt/sdk/v4/types/host_nic_virtual_functions_configuration.rb +1 -1
  449. data/lib/ovirt/sdk/v4/types/host_storage.rb +7 -9
  450. data/lib/ovirt/sdk/v4/types/hosted_engine.rb +1 -1
  451. data/lib/ovirt/sdk/v4/types/identified.rb +1 -1
  452. data/lib/ovirt/sdk/v4/types/initialization.rb +8 -10
  453. data/lib/ovirt/sdk/v4/types/io.rb +1 -1
  454. data/lib/ovirt/sdk/v4/types/ip.rb +1 -1
  455. data/lib/ovirt/sdk/v4/types/ip_address_assignment.rb +1 -1
  456. data/lib/ovirt/sdk/v4/types/iscsi_bond.rb +14 -18
  457. data/lib/ovirt/sdk/v4/types/iscsi_details.rb +1 -1
  458. data/lib/ovirt/sdk/v4/types/katello_erratum.rb +7 -9
  459. data/lib/ovirt/sdk/v4/types/kernel.rb +1 -1
  460. data/lib/ovirt/sdk/v4/types/ksm.rb +1 -1
  461. data/lib/ovirt/sdk/v4/types/list.rb +101 -0
  462. data/lib/ovirt/sdk/v4/types/logical_unit.rb +1 -1
  463. data/lib/ovirt/sdk/v4/types/mac.rb +1 -1
  464. data/lib/ovirt/sdk/v4/types/mac_pool.rb +7 -9
  465. data/lib/ovirt/sdk/v4/types/memory_over_commit.rb +1 -1
  466. data/lib/ovirt/sdk/v4/types/memory_policy.rb +1 -1
  467. data/lib/ovirt/sdk/v4/types/method.rb +1 -1
  468. data/lib/ovirt/sdk/v4/types/migration_options.rb +1 -1
  469. data/lib/ovirt/sdk/v4/types/network.rb +7 -9
  470. data/lib/ovirt/sdk/v4/types/network_attachment.rb +21 -27
  471. data/lib/ovirt/sdk/v4/types/network_configuration.rb +8 -10
  472. data/lib/ovirt/sdk/v4/types/nic.rb +23 -27
  473. data/lib/ovirt/sdk/v4/types/nic_configuration.rb +1 -1
  474. data/lib/ovirt/sdk/v4/types/numa_node.rb +7 -9
  475. data/lib/ovirt/sdk/v4/types/numa_node_pin.rb +1 -1
  476. data/lib/ovirt/sdk/v4/types/open_stack_volume_type.rb +7 -9
  477. data/lib/ovirt/sdk/v4/types/operating_system.rb +1 -1
  478. data/lib/ovirt/sdk/v4/types/option.rb +1 -1
  479. data/lib/ovirt/sdk/v4/types/package.rb +1 -1
  480. data/lib/ovirt/sdk/v4/types/payload.rb +8 -10
  481. data/lib/ovirt/sdk/v4/types/pm_proxy.rb +1 -1
  482. data/lib/ovirt/sdk/v4/types/port_mirroring.rb +1 -1
  483. data/lib/ovirt/sdk/v4/types/power_management.rb +22 -28
  484. data/lib/ovirt/sdk/v4/types/profile_detail.rb +22 -28
  485. data/lib/ovirt/sdk/v4/types/property.rb +1 -1
  486. data/lib/ovirt/sdk/v4/types/proxy_ticket.rb +1 -1
  487. data/lib/ovirt/sdk/v4/types/quota.rb +21 -27
  488. data/lib/ovirt/sdk/v4/types/range.rb +1 -1
  489. data/lib/ovirt/sdk/v4/types/rate.rb +1 -1
  490. data/lib/ovirt/sdk/v4/types/reported_configuration.rb +1 -1
  491. data/lib/ovirt/sdk/v4/types/reported_device.rb +7 -9
  492. data/lib/ovirt/sdk/v4/types/rng_device.rb +1 -1
  493. data/lib/ovirt/sdk/v4/types/role.rb +7 -9
  494. data/lib/ovirt/sdk/v4/types/scheduling_policy.rb +7 -9
  495. data/lib/ovirt/sdk/v4/types/scheduling_policy_unit.rb +7 -9
  496. data/lib/ovirt/sdk/v4/types/se_linux.rb +1 -1
  497. data/lib/ovirt/sdk/v4/types/serial_number.rb +1 -1
  498. data/lib/ovirt/sdk/v4/types/skip_if_connectivity_broken.rb +1 -1
  499. data/lib/ovirt/sdk/v4/types/skip_if_sd_active.rb +1 -1
  500. data/lib/ovirt/sdk/v4/types/spm.rb +1 -1
  501. data/lib/ovirt/sdk/v4/types/sso.rb +8 -10
  502. data/lib/ovirt/sdk/v4/types/statistic.rb +7 -9
  503. data/lib/ovirt/sdk/v4/types/status.rb +1 -1
  504. data/lib/ovirt/sdk/v4/types/storage_domain.rb +22 -24
  505. data/lib/ovirt/sdk/v4/types/struct.rb +111 -0
  506. data/lib/ovirt/sdk/v4/types/template_version.rb +1 -1
  507. data/lib/ovirt/sdk/v4/types/ticket.rb +1 -1
  508. data/lib/ovirt/sdk/v4/types/time_zone.rb +1 -1
  509. data/lib/ovirt/sdk/v4/types/transparent_huge_pages.rb +1 -1
  510. data/lib/ovirt/sdk/v4/types/usb.rb +1 -1
  511. data/lib/ovirt/sdk/v4/types/user.rb +14 -18
  512. data/lib/ovirt/sdk/v4/types/value.rb +1 -1
  513. data/lib/ovirt/sdk/v4/types/vcpu_pin.rb +1 -1
  514. data/lib/ovirt/sdk/v4/types/virtio_scsi.rb +1 -1
  515. data/lib/ovirt/sdk/v4/types/virtual_numa_node.rb +7 -9
  516. data/lib/ovirt/sdk/v4/types/vlan.rb +1 -1
  517. data/lib/ovirt/sdk/v4/types/vm.rb +84 -108
  518. data/lib/ovirt/sdk/v4/types/vm_base.rb +7 -9
  519. data/lib/ovirt/sdk/v4/types/vm_placement_policy.rb +8 -10
  520. data/lib/ovirt/sdk/v4/types/vm_summary.rb +1 -1
  521. data/lib/ovirt/sdk/v4/types/vnic_pass_through.rb +1 -1
  522. data/lib/ovirt/sdk/v4/types/vnic_profile.rb +7 -9
  523. data/lib/ovirt/sdk/v4/types/volume_group.rb +8 -10
  524. data/lib/ovirt/sdk/v4/version.rb +1 -1
  525. data/lib/ovirt/sdk/v4/writers/affinity_group_writer.rb +6 -0
  526. data/lib/ovirt/sdk/v4/writers/agent_configuration_writer.rb +6 -0
  527. data/lib/ovirt/sdk/v4/writers/agent_writer.rb +6 -0
  528. data/lib/ovirt/sdk/v4/writers/application_writer.rb +6 -0
  529. data/lib/ovirt/sdk/v4/writers/authorized_key_writer.rb +6 -0
  530. data/lib/ovirt/sdk/v4/writers/balance_writer.rb +6 -0
  531. data/lib/ovirt/sdk/v4/writers/bios_writer.rb +6 -0
  532. data/lib/ovirt/sdk/v4/writers/block_statistic_writer.rb +6 -0
  533. data/lib/ovirt/sdk/v4/writers/bonding_writer.rb +6 -0
  534. data/lib/ovirt/sdk/v4/writers/bookmark_writer.rb +6 -0
  535. data/lib/ovirt/sdk/v4/writers/boot_menu_writer.rb +6 -0
  536. data/lib/ovirt/sdk/v4/writers/boot_writer.rb +6 -0
  537. data/lib/ovirt/sdk/v4/writers/brick_profile_detail_writer.rb +6 -0
  538. data/lib/ovirt/sdk/v4/writers/cdrom_writer.rb +6 -0
  539. data/lib/ovirt/sdk/v4/writers/certificate_writer.rb +6 -0
  540. data/lib/ovirt/sdk/v4/writers/cloud_init_writer.rb +6 -0
  541. data/lib/ovirt/sdk/v4/writers/cluster_writer.rb +6 -0
  542. data/lib/ovirt/sdk/v4/writers/configuration_writer.rb +6 -0
  543. data/lib/ovirt/sdk/v4/writers/console_writer.rb +6 -0
  544. data/lib/ovirt/sdk/v4/writers/core_writer.rb +6 -0
  545. data/lib/ovirt/sdk/v4/writers/cpu_profile_writer.rb +6 -0
  546. data/lib/ovirt/sdk/v4/writers/cpu_topology_writer.rb +6 -0
  547. data/lib/ovirt/sdk/v4/writers/cpu_tune_writer.rb +6 -0
  548. data/lib/ovirt/sdk/v4/writers/cpu_writer.rb +6 -0
  549. data/lib/ovirt/sdk/v4/writers/custom_property_writer.rb +6 -0
  550. data/lib/ovirt/sdk/v4/writers/data_center_writer.rb +6 -0
  551. data/lib/ovirt/sdk/v4/writers/device_writer.rb +6 -0
  552. data/lib/ovirt/sdk/v4/writers/disk_profile_writer.rb +6 -0
  553. data/lib/ovirt/sdk/v4/writers/disk_snapshot_writer.rb +7 -1
  554. data/lib/ovirt/sdk/v4/writers/disk_writer.rb +7 -1
  555. data/lib/ovirt/sdk/v4/writers/display_writer.rb +6 -0
  556. data/lib/ovirt/sdk/v4/writers/dns_writer.rb +6 -0
  557. data/lib/ovirt/sdk/v4/writers/domain_writer.rb +6 -0
  558. data/lib/ovirt/sdk/v4/writers/entity_profile_detail_writer.rb +6 -0
  559. data/lib/ovirt/sdk/v4/writers/error_handling_writer.rb +6 -0
  560. data/lib/ovirt/sdk/v4/writers/event_writer.rb +6 -0
  561. data/lib/ovirt/sdk/v4/writers/external_compute_resource_writer.rb +6 -0
  562. data/lib/ovirt/sdk/v4/writers/external_discovered_host_writer.rb +6 -0
  563. data/lib/ovirt/sdk/v4/writers/external_host_group_writer.rb +6 -0
  564. data/lib/ovirt/sdk/v4/writers/external_host_provider_writer.rb +6 -0
  565. data/lib/ovirt/sdk/v4/writers/external_host_writer.rb +6 -0
  566. data/lib/ovirt/sdk/v4/writers/external_provider_writer.rb +6 -0
  567. data/lib/ovirt/sdk/v4/writers/fencing_policy_writer.rb +6 -0
  568. data/lib/ovirt/sdk/v4/writers/file_writer.rb +6 -0
  569. data/lib/ovirt/sdk/v4/writers/filter_writer.rb +6 -0
  570. data/lib/ovirt/sdk/v4/writers/floppy_writer.rb +6 -0
  571. data/lib/ovirt/sdk/v4/writers/fop_statistic_writer.rb +6 -0
  572. data/lib/ovirt/sdk/v4/writers/gluster_brick_advanced_details_writer.rb +6 -0
  573. data/lib/ovirt/sdk/v4/writers/gluster_brick_memory_info_writer.rb +6 -0
  574. data/lib/ovirt/sdk/v4/writers/gluster_brick_writer.rb +6 -0
  575. data/lib/ovirt/sdk/v4/writers/gluster_client_writer.rb +6 -0
  576. data/lib/ovirt/sdk/v4/writers/gluster_hook_writer.rb +6 -0
  577. data/lib/ovirt/sdk/v4/writers/gluster_memory_pool_writer.rb +6 -0
  578. data/lib/ovirt/sdk/v4/writers/gluster_server_hook_writer.rb +6 -0
  579. data/lib/ovirt/sdk/v4/writers/gluster_volume_profile_details_writer.rb +6 -0
  580. data/lib/ovirt/sdk/v4/writers/gluster_volume_writer.rb +6 -0
  581. data/lib/ovirt/sdk/v4/writers/graphics_console_writer.rb +6 -0
  582. data/lib/ovirt/sdk/v4/writers/group_writer.rb +6 -0
  583. data/lib/ovirt/sdk/v4/writers/guest_operating_system_writer.rb +6 -0
  584. data/lib/ovirt/sdk/v4/writers/hardware_information_writer.rb +6 -0
  585. data/lib/ovirt/sdk/v4/writers/high_availability_writer.rb +6 -0
  586. data/lib/ovirt/sdk/v4/writers/hook_writer.rb +6 -0
  587. data/lib/ovirt/sdk/v4/writers/host_device_passthrough_writer.rb +6 -0
  588. data/lib/ovirt/sdk/v4/writers/host_device_writer.rb +6 -0
  589. data/lib/ovirt/sdk/v4/writers/host_nic_virtual_functions_configuration_writer.rb +6 -0
  590. data/lib/ovirt/sdk/v4/writers/host_nic_writer.rb +6 -0
  591. data/lib/ovirt/sdk/v4/writers/host_storage_writer.rb +6 -0
  592. data/lib/ovirt/sdk/v4/writers/host_writer.rb +6 -0
  593. data/lib/ovirt/sdk/v4/writers/hosted_engine_writer.rb +6 -0
  594. data/lib/ovirt/sdk/v4/writers/icon_writer.rb +6 -0
  595. data/lib/ovirt/sdk/v4/writers/identified_writer.rb +6 -0
  596. data/lib/ovirt/sdk/v4/writers/image_writer.rb +6 -0
  597. data/lib/ovirt/sdk/v4/writers/initialization_writer.rb +6 -0
  598. data/lib/ovirt/sdk/v4/writers/instance_type_writer.rb +6 -0
  599. data/lib/ovirt/sdk/v4/writers/io_writer.rb +6 -0
  600. data/lib/ovirt/sdk/v4/writers/ip_address_assignment_writer.rb +6 -0
  601. data/lib/ovirt/sdk/v4/writers/ip_writer.rb +6 -0
  602. data/lib/ovirt/sdk/v4/writers/iscsi_bond_writer.rb +6 -0
  603. data/lib/ovirt/sdk/v4/writers/iscsi_details_writer.rb +6 -0
  604. data/lib/ovirt/sdk/v4/writers/job_writer.rb +6 -0
  605. data/lib/ovirt/sdk/v4/writers/katello_erratum_writer.rb +6 -0
  606. data/lib/ovirt/sdk/v4/writers/kernel_writer.rb +6 -0
  607. data/lib/ovirt/sdk/v4/writers/ksm_writer.rb +6 -0
  608. data/lib/ovirt/sdk/v4/writers/label_writer.rb +6 -0
  609. data/lib/ovirt/sdk/v4/writers/logical_unit_writer.rb +6 -0
  610. data/lib/ovirt/sdk/v4/writers/mac_pool_writer.rb +6 -0
  611. data/lib/ovirt/sdk/v4/writers/mac_writer.rb +6 -0
  612. data/lib/ovirt/sdk/v4/writers/memory_over_commit_writer.rb +6 -0
  613. data/lib/ovirt/sdk/v4/writers/memory_policy_writer.rb +6 -0
  614. data/lib/ovirt/sdk/v4/writers/method_writer.rb +6 -0
  615. data/lib/ovirt/sdk/v4/writers/migration_options_writer.rb +6 -0
  616. data/lib/ovirt/sdk/v4/writers/network_attachment_writer.rb +6 -0
  617. data/lib/ovirt/sdk/v4/writers/network_configuration_writer.rb +6 -0
  618. data/lib/ovirt/sdk/v4/writers/network_writer.rb +6 -0
  619. data/lib/ovirt/sdk/v4/writers/nfs_profile_detail_writer.rb +6 -0
  620. data/lib/ovirt/sdk/v4/writers/nic_configuration_writer.rb +6 -0
  621. data/lib/ovirt/sdk/v4/writers/nic_writer.rb +7 -1
  622. data/lib/ovirt/sdk/v4/writers/numa_node_pin_writer.rb +6 -0
  623. data/lib/ovirt/sdk/v4/writers/numa_node_writer.rb +6 -0
  624. data/lib/ovirt/sdk/v4/writers/open_stack_image_provider_writer.rb +6 -0
  625. data/lib/ovirt/sdk/v4/writers/open_stack_image_writer.rb +6 -0
  626. data/lib/ovirt/sdk/v4/writers/open_stack_network_provider_writer.rb +6 -0
  627. data/lib/ovirt/sdk/v4/writers/open_stack_network_writer.rb +6 -0
  628. data/lib/ovirt/sdk/v4/writers/open_stack_provider_writer.rb +6 -0
  629. data/lib/ovirt/sdk/v4/writers/open_stack_subnet_writer.rb +6 -0
  630. data/lib/ovirt/sdk/v4/writers/open_stack_volume_provider_writer.rb +6 -0
  631. data/lib/ovirt/sdk/v4/writers/open_stack_volume_type_writer.rb +6 -0
  632. data/lib/ovirt/sdk/v4/writers/openstack_volume_authentication_key_writer.rb +6 -0
  633. data/lib/ovirt/sdk/v4/writers/operating_system_info_writer.rb +6 -0
  634. data/lib/ovirt/sdk/v4/writers/operating_system_writer.rb +6 -0
  635. data/lib/ovirt/sdk/v4/writers/option_writer.rb +6 -0
  636. data/lib/ovirt/sdk/v4/writers/package_writer.rb +6 -0
  637. data/lib/ovirt/sdk/v4/writers/payload_writer.rb +6 -0
  638. data/lib/ovirt/sdk/v4/writers/permission_writer.rb +6 -0
  639. data/lib/ovirt/sdk/v4/writers/permit_writer.rb +6 -0
  640. data/lib/ovirt/sdk/v4/writers/pm_proxy_writer.rb +6 -0
  641. data/lib/ovirt/sdk/v4/writers/port_mirroring_writer.rb +6 -0
  642. data/lib/ovirt/sdk/v4/writers/power_management_writer.rb +6 -0
  643. data/lib/ovirt/sdk/v4/writers/product_writer.rb +6 -0
  644. data/lib/ovirt/sdk/v4/writers/profile_detail_writer.rb +6 -0
  645. data/lib/ovirt/sdk/v4/writers/property_writer.rb +6 -0
  646. data/lib/ovirt/sdk/v4/writers/proxy_ticket_writer.rb +6 -0
  647. data/lib/ovirt/sdk/v4/writers/qos_writer.rb +6 -0
  648. data/lib/ovirt/sdk/v4/writers/quota_cluster_limit_writer.rb +6 -0
  649. data/lib/ovirt/sdk/v4/writers/quota_storage_limit_writer.rb +6 -0
  650. data/lib/ovirt/sdk/v4/writers/quota_writer.rb +6 -0
  651. data/lib/ovirt/sdk/v4/writers/range_writer.rb +6 -0
  652. data/lib/ovirt/sdk/v4/writers/rate_writer.rb +6 -0
  653. data/lib/ovirt/sdk/v4/writers/reported_configuration_writer.rb +6 -0
  654. data/lib/ovirt/sdk/v4/writers/reported_device_writer.rb +6 -0
  655. data/lib/ovirt/sdk/v4/writers/rng_device_writer.rb +6 -0
  656. data/lib/ovirt/sdk/v4/writers/role_writer.rb +6 -0
  657. data/lib/ovirt/sdk/v4/writers/scheduling_policy_unit_writer.rb +6 -0
  658. data/lib/ovirt/sdk/v4/writers/scheduling_policy_writer.rb +6 -0
  659. data/lib/ovirt/sdk/v4/writers/se_linux_writer.rb +6 -0
  660. data/lib/ovirt/sdk/v4/writers/serial_number_writer.rb +6 -0
  661. data/lib/ovirt/sdk/v4/writers/session_writer.rb +6 -0
  662. data/lib/ovirt/sdk/v4/writers/skip_if_connectivity_broken_writer.rb +6 -0
  663. data/lib/ovirt/sdk/v4/writers/skip_if_sd_active_writer.rb +6 -0
  664. data/lib/ovirt/sdk/v4/writers/snapshot_writer.rb +6 -0
  665. data/lib/ovirt/sdk/v4/writers/spm_writer.rb +6 -0
  666. data/lib/ovirt/sdk/v4/writers/ssh_public_key_writer.rb +6 -0
  667. data/lib/ovirt/sdk/v4/writers/ssh_writer.rb +6 -0
  668. data/lib/ovirt/sdk/v4/writers/sso_writer.rb +6 -0
  669. data/lib/ovirt/sdk/v4/writers/statistic_writer.rb +6 -0
  670. data/lib/ovirt/sdk/v4/writers/status_writer.rb +6 -0
  671. data/lib/ovirt/sdk/v4/writers/step_writer.rb +6 -0
  672. data/lib/ovirt/sdk/v4/writers/storage_connection_extension_writer.rb +6 -0
  673. data/lib/ovirt/sdk/v4/writers/storage_connection_writer.rb +6 -0
  674. data/lib/ovirt/sdk/v4/writers/storage_domain_writer.rb +7 -1
  675. data/lib/ovirt/sdk/v4/writers/tag_writer.rb +6 -0
  676. data/lib/ovirt/sdk/v4/writers/template_version_writer.rb +6 -0
  677. data/lib/ovirt/sdk/v4/writers/template_writer.rb +6 -0
  678. data/lib/ovirt/sdk/v4/writers/ticket_writer.rb +6 -0
  679. data/lib/ovirt/sdk/v4/writers/time_zone_writer.rb +6 -0
  680. data/lib/ovirt/sdk/v4/writers/transparent_huge_pages_writer.rb +6 -0
  681. data/lib/ovirt/sdk/v4/writers/unmanaged_network_writer.rb +6 -0
  682. data/lib/ovirt/sdk/v4/writers/usb_writer.rb +6 -0
  683. data/lib/ovirt/sdk/v4/writers/user_writer.rb +6 -0
  684. data/lib/ovirt/sdk/v4/writers/value_writer.rb +6 -0
  685. data/lib/ovirt/sdk/v4/writers/vcpu_pin_writer.rb +6 -0
  686. data/lib/ovirt/sdk/v4/writers/vendor_writer.rb +6 -0
  687. data/lib/ovirt/sdk/v4/writers/version_writer.rb +6 -0
  688. data/lib/ovirt/sdk/v4/writers/virtio_scsi_writer.rb +6 -0
  689. data/lib/ovirt/sdk/v4/writers/virtual_numa_node_writer.rb +6 -0
  690. data/lib/ovirt/sdk/v4/writers/vlan_writer.rb +6 -0
  691. data/lib/ovirt/sdk/v4/writers/vm_base_writer.rb +6 -0
  692. data/lib/ovirt/sdk/v4/writers/vm_placement_policy_writer.rb +6 -0
  693. data/lib/ovirt/sdk/v4/writers/vm_pool_writer.rb +6 -0
  694. data/lib/ovirt/sdk/v4/writers/vm_summary_writer.rb +6 -0
  695. data/lib/ovirt/sdk/v4/writers/vm_writer.rb +6 -0
  696. data/lib/ovirt/sdk/v4/writers/vnic_pass_through_writer.rb +6 -0
  697. data/lib/ovirt/sdk/v4/writers/vnic_profile_writer.rb +6 -0
  698. data/lib/ovirt/sdk/v4/writers/volume_group_writer.rb +6 -0
  699. data/lib/ovirt/sdk/v4/writers/watchdog_writer.rb +6 -0
  700. data/lib/ovirt/sdk/v4/writers/weight_writer.rb +6 -0
  701. data/lib/ovirt/sdk/v4/xml_formatter.rb +41 -0
  702. data/lib/ovirt/sdk/v4/xml_writer.rb +7 -0
  703. metadata +10 -4
  704. data/lib/ovirt/sdk/v4/services/system_katello_errata_service.rb +0 -54
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 591122a879ffd4ea3327f5643cb1ae978e3e3c99
4
- data.tar.gz: 1668fa07c7899275224dc8e8f2350c46764176ed
3
+ metadata.gz: 53f6c08d5ffc685e834e967ab2f15cbb103c6cc7
4
+ data.tar.gz: 48d03be1e1adb660c3e379d725ef6680bf30930f
5
5
  SHA512:
6
- metadata.gz: 9d1f6154f5045bfc631524ec12704845d83946e1a25ef309b02645e0e46fb9d24fb5466f68c9ca4cce76bf320d5a270d87ef67720d0d28050799b51728825a6a
7
- data.tar.gz: f0f9a813ef9e75dd3e1be40667280bdfbe60f8e589a6cbd5abdabc139c83a02baf051ef231ac6f66278240fc0df3fe3ae6824de4a06626ebd052ec6bd3641361
6
+ metadata.gz: a468b34dc1fd284c7dddfc07bc1b0667be613f486aa840148bb577eb8cbc320465d9d9a421febe9c1b943d95b0c8ce3309b0a49e907d3beb0c93c2d331b83bf5
7
+ data.tar.gz: f734ad2e09545e15791c656e71e61f4463e3fe223657047eace57b76d3949a221d5cdc2bc97d26a98907326112530d33922d515c61b54824aa6678d28da0dd8a
data/README.md CHANGED
@@ -30,7 +30,7 @@ connection = Ovirt::SDK::V4::Connection({
30
30
  })
31
31
 
32
32
  # Get the reference to the system service:
33
- system_service = connection.system
33
+ system_service = connection.system_service
34
34
 
35
35
  # Always remember to close the connection when finished:
36
36
  connection.close
@@ -40,15 +40,15 @@ The `ca.pem` file is required when connecting to a server protected
40
40
  with TLS. In an usual oVirt installation it will be in
41
41
  `/etc/pki/ovirt-engine/ca.pem`.
42
42
 
43
- Once you have the reference to the system service you can use it to
44
- get references to other services, and call their methods. For example,
45
- to retrieve the list of virtual machines of the system you can use the
46
- `vms` method, which returns a reference to the service that manages
47
- the virtual machines:
43
+ Once you have the reference to the system service you can use it to get
44
+ references to other services, and call their methods. For example, to
45
+ retrieve the list of virtual machines of the system you can use the
46
+ `vms_service` method, which returns a reference to the service that
47
+ manages the virtual machines:
48
48
 
49
49
  ```ruby
50
50
  # Get the reference to the "vms" service:
51
- vms_service = system_service.vms
51
+ vms_service = system_service.vms_service
52
52
  ```
53
53
 
54
54
  This service is an instance of Ovirt::SDK::V4::VmsService, and it has
@@ -65,4 +65,4 @@ vms.each do |vm|
65
65
  end
66
66
  ```
67
67
 
68
- In the future you will find more usuage examples in the `examples` directory.
68
+ You will find more usuage examples in the `examples` directory.
@@ -20,17 +20,18 @@ require 'date'
20
20
  require 'stringio'
21
21
 
22
22
  ##
23
- # Load the xtension:
23
+ # Load the extension:
24
24
  require 'ovirtsdk'
25
25
 
26
26
  ##
27
27
  # Own requirements.
28
28
  #
29
29
  require 'ovirt/sdk/v4/version.rb'
30
+ require 'ovirt/sdk/v4/xml_formatter.rb'
30
31
  require 'ovirt/sdk/v4/xml_reader.rb'
31
32
  require 'ovirt/sdk/v4/xml_writer.rb'
33
+ require 'ovirt/sdk/v4/connection.rb'
32
34
  require 'ovirt/sdk/v4/types.rb'
33
35
  require 'ovirt/sdk/v4/readers.rb'
34
36
  require 'ovirt/sdk/v4/writers.rb'
35
37
  require 'ovirt/sdk/v4/services.rb'
36
- require 'ovirt/sdk/v4/connection.rb'
@@ -20,6 +20,57 @@ module Ovirt
20
20
  module SDK
21
21
  module V4
22
22
 
23
+ ##
24
+ # This class represents an HTTP request.
25
+ #
26
+ # This class is intended for internal use by other components of the SDK. Refrain from using it directly as there
27
+ # is no backwards compatibility guarantee.
28
+ #
29
+ class Request
30
+ attr_accessor :method
31
+ attr_accessor :path
32
+ attr_accessor :matrix
33
+ attr_accessor :query
34
+ attr_accessor :headers
35
+ attr_accessor :body
36
+
37
+ ##
38
+ # Creates a new HTTP request.
39
+ #
40
+ def initialize(opts = {})
41
+ self.method = opts[:method] || :GET
42
+ self.path = opts[:path] || ''
43
+ self.headers = opts[:headers] || {}
44
+ self.matrix = opts[:matrix] || {}
45
+ self.query = opts[:query] || {}
46
+ self.body = opts[:body]
47
+ end
48
+
49
+ end
50
+
51
+ ##
52
+ # This class represents an HTTP response.
53
+ #
54
+ # This class is intended for internal use by other components of the SDK. Refrain from using it directly as there
55
+ # is no backwards compatibility guarantee.
56
+ #
57
+ class Response
58
+ attr_accessor :body
59
+ attr_accessor :code
60
+ attr_accessor :headers
61
+ attr_accessor :message
62
+
63
+ ##
64
+ # Creates a new HTTP response.
65
+ #
66
+ def initialize(opts = {})
67
+ self.body = opts[:body]
68
+ self.code = opts[:code]
69
+ self.headers = opts[:headers]
70
+ self.message = opts[:message]
71
+ end
72
+ end
73
+
23
74
  ##
24
75
  # This class is responsible for managing an HTTP connection to the engine server. It is intended as the entry
25
76
  # point for the SDK, and it provides access to the `system` service and, from there, to the rest of the services
@@ -32,7 +83,8 @@ module Ovirt
32
83
  #
33
84
  # This method supports the following parameters, provided as an optional hash:
34
85
  #
35
- # `:url` - The URL of the server, usually something like `https://server.example.com/ovirt-engine/api`.
86
+ # `:url` - A string containing the base URL of the server, usually something like
87
+ # `https://server.example.com/ovirt-engine/api`.
36
88
  #
37
89
  # `:username` - The name of the user, something like `admin@internal`.
38
90
  #
@@ -117,79 +169,89 @@ module Ovirt
117
169
 
118
170
  end
119
171
 
172
+ ##
173
+ # Returns a string containing the base URL used by this connection.
174
+ #
175
+ def url
176
+ return @url
177
+ end
178
+
120
179
  ##
121
180
  # Returns the reference to the root of the services tree.
122
181
  #
123
182
  # The returned value is an instance of the Ovirt::SDK::V4::SystemService class.
124
183
  #
125
- def system
126
- @system ||= SystemService.new(self, "")
127
- return @system
184
+ def system_service
185
+ @system_service ||= SystemService.new(self, "")
186
+ return @system_service
128
187
  end
129
188
 
130
189
  ##
131
- # Performs an HTTP request.
190
+ # Returns a reference to the service corresponding to the given path. For example, if the `path` parameter
191
+ # is `vms/123/disks` then it will return a reference to the service that manages the disks for the virtual
192
+ # machine with identifier `123`.
132
193
  #
133
- # This method is intended for internal use by other components of the SDK, refrain from using it directly, as
134
- # backwards compatibility isn't guaranteed.
194
+ # If there is no service corresponding to the given path an exception of type Ovirt::SDK::V4::Error will be
195
+ # raised.
135
196
  #
136
- # This method supports the following parameters, provided as an optional hash:
137
- #
138
- # `:method` - The HTTP method to execute. The value should be `:GET`, `:POST`, `:PUT`, `:DELETE` or
139
- # `:HEAD`.
197
+ def service(path)
198
+ return system_service.service(path)
199
+ end
200
+
201
+ ##
202
+ # Sends an HTTP request and waits for the response.
140
203
  #
141
- # `:path` - The path that will be added to the URL used when the connection was created. For example, of the
142
- # connection was created with `https://engine.example.com/ovirt-engine/api` and the value of `:path` is
143
- # `vms/123` then the request will be sent to `https://engine.example.com/ovirt-engine/api/vms/123`.
204
+ # This method is intended for internal use by other components of the SDK. Refrain from using it directly, as
205
+ # backwards compatibility isn't guaranteed.
144
206
  #
145
- # `:headers` - A hash containing the HTTP headers to add to the request. The keys of the hash should be
146
- # strings containing the names of the headers, and the values should be strings containing the
147
- # values. The default is an empty hash.
207
+ # This method supports the following parameters.
148
208
  #
149
- # `:last` - Boolean flag indicating if this is the last request of a session. This will disable the use of
150
- # the `Prefer: persistent-auth` header, thus indicating to the server that the session should be closed.
151
- # The default is `false`.
209
+ # `request` - The Request object containing the details of the HTTP request to send.
152
210
  #
153
- # `:persistent_auth` - Boolean flag indicating if persistent authentication based on cookies should be used.
154
- # The default is `true`.
211
+ # `last` - A boolean flag indicating if this is the last request.
155
212
  #
156
- # The returned value is an string containing the HTTP response body.
213
+ # The returned value is a Request object containing the details of the HTTP response received.
157
214
  #
158
- def request(opts = {})
159
- # Get the values of the parameters and assign default values:
160
- method = opts[:method]
161
- path = opts[:path]
162
- headers = opts[:headers] || {}
163
- last = opts[:last] || false
164
- persistent_auth = opts[:persistent_auth] || true
165
-
166
- # Set the URL:
167
- @curl.url = @url.to_s + path
215
+ def send(request, last = false)
216
+ # Build the URL:
217
+ @curl.url = build_url({
218
+ :path => request.path,
219
+ :query => request.query,
220
+ :matrix => request.matrix,
221
+ })
168
222
 
169
223
  # Add headers, avoiding those that have no value:
170
224
  @curl.headers.clear
171
- @curl.headers.merge!(headers)
225
+ @curl.headers.merge!(request.headers)
226
+ @curl.headers['User-Agent'] = "RubySDK/#{VERSION}"
227
+ @curl.headers['Version'] = '4'
172
228
  @curl.headers['Content-Type'] = 'application/xml'
173
229
  @curl.headers['Accept'] = 'application/xml'
174
230
 
175
- # Every request except the last one should indicate that we prefer
176
- # to use persistent authentication:
177
- if persistent_auth and not last
231
+ # All requests except the last one should indicate that we want to use persistent authentication:
232
+ if !last
178
233
  @curl.headers['Prefer'] = 'persistent-auth'
179
234
  end
180
235
 
181
236
  # Send the request and wait for the response:
182
- case method
237
+ case request.method
238
+ when :DELETE
239
+ @curl.http_delete
183
240
  when :GET
184
241
  @curl.http_get
185
242
  when :PUT
186
- @curl.http_put(body)
243
+ @curl.http_put(request.body)
187
244
  when :HEAD
188
245
  @curl.http_head
246
+ when :POST
247
+ @curl.http_post(request.body)
189
248
  end
190
249
 
191
- # Return the response body:
192
- return @curl.body_str
250
+ # Return the response:
251
+ response = Response.new
252
+ response.body = @curl.body_str
253
+ response.code = @curl.response_code
254
+ return response
193
255
  end
194
256
 
195
257
  ##
@@ -197,12 +259,54 @@ module Ovirt
197
259
  #
198
260
  def close
199
261
  # Send the last request to indicate the server that the session should be closed:
200
- request({:method => :HEAD, :path => '', :last => true})
262
+ request = Request.new({
263
+ :method => :HEAD,
264
+ })
265
+ send(request, true)
201
266
 
202
267
  # Release resources used by the cURL handle:
203
268
  @curl.close
204
269
  end
205
270
 
271
+ ##
272
+ # Builds a request URL from a path, and the sets of matrix and query parameters.
273
+ #
274
+ # This method is intended for internal use by other components of the SDK. Refrain from using it directly, as
275
+ # backwards compatibility isn't guaranteed.
276
+ #
277
+ # This method supports the following parameters, provided as an optional hash:
278
+ #
279
+ # `:path` - The path that will be added to the base URL. The default is an empty string.
280
+ #
281
+ # `:query` - A hash containing the query parameters to add to the URL. The keys of the hash should be strings
282
+ # containing the names of the parameters, and the values should be strings containing the values. The default
283
+ # is an empty hash.
284
+ #
285
+ # `:matrix` - A hash containing the matrix parameters to add to the URL. The keys of the hash should be strings
286
+ # containing the names of the parameters, and the values should be strings containing the values. The default
287
+ # is an empty hash.
288
+ #
289
+ # The returned value is an string containing the URL.
290
+ #
291
+ def build_url(opts = {})
292
+ # Get the values of the parameters and assign default values:
293
+ path = opts[:path] || ''
294
+ query = opts[:query] || {}
295
+ matrix = opts[:matrix] || {}
296
+
297
+ # Add the path and the parameters:
298
+ url = @url.to_s + path
299
+ if not matrix.empty?
300
+ matrix.each do |key, value|
301
+ url = url + ';' + URI.encode_www_form({key => value})
302
+ end
303
+ end
304
+ if not query.empty?
305
+ url = url + '?' + URI.encode_www_form(query)
306
+ end
307
+ return url
308
+ end
309
+
206
310
  end
207
311
 
208
312
  end
@@ -560,6 +560,8 @@ end
560
560
  # Load all the readers.
561
561
  #
562
562
  load 'ovirt/sdk/v4/readers/reader.rb'
563
+ load 'ovirt/sdk/v4/readers/action_reader.rb'
564
+ load 'ovirt/sdk/v4/readers/fault_reader.rb'
563
565
  load 'ovirt/sdk/v4/readers/affinity_group_reader.rb'
564
566
  load 'ovirt/sdk/v4/readers/agent_reader.rb'
565
567
  load 'ovirt/sdk/v4/readers/agent_configuration_reader.rb'
@@ -0,0 +1,56 @@
1
+ #--
2
+ # Copyright (c) 2016 Red Hat, Inc.
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #++
15
+
16
+ module Ovirt
17
+ module SDK
18
+ module V4
19
+
20
+ class ActionReader < Reader # :nodoc:
21
+
22
+ def self.read_one(reader)
23
+ # Do nothing if there aren't more tags:
24
+ return nil unless reader.forward
25
+
26
+ # Create the object:
27
+ action = Action.new
28
+
29
+ # Discard the start tag:
30
+ empty = reader.empty_element?
31
+ reader.read
32
+ return action if empty
33
+
34
+ # Process the inner elements:
35
+ while reader.forward do
36
+ case reader.node_name
37
+ when 'status'
38
+ action.status = StatusReader.read_one(reader)
39
+ when 'fault'
40
+ action.fault = FaultReader.read_one(reader)
41
+ else
42
+ reader.next_element
43
+ end
44
+ end
45
+
46
+ # Discard the end tag:
47
+ reader.read
48
+
49
+ return action
50
+ end
51
+
52
+ end
53
+
54
+ end
55
+ end
56
+ end
@@ -20,14 +20,16 @@ module Ovirt
20
20
 
21
21
  class AffinityGroupReader < Reader # :nodoc:
22
22
 
23
- def self.read_one(reader)
23
+ def self.read_one(reader, connection = nil)
24
24
  # Do nothing if there aren't more tags:
25
25
  return nil unless reader.forward
26
26
 
27
27
  # Create the object:
28
28
  object = AffinityGroup.new
29
+ object.connection = connection
29
30
 
30
31
  # Process the attributes:
32
+ object.href = reader.get_attribute('href')
31
33
  value = reader.get_attribute('comments')
32
34
  object.comments = value if not value.nil?
33
35
  value = reader.get_attribute('description')
@@ -66,7 +68,8 @@ module Ovirt
66
68
  when 'positive'
67
69
  object.positive = reader.read_boolean
68
70
  when 'cluster'
69
- object.cluster = ClusterReader.read_one(reader)
71
+ object.cluster = ClusterReader.read_one(reader, connection)
72
+ object.cluster.is_link = true
70
73
  else
71
74
  reader.next_element
72
75
  end
@@ -79,11 +82,15 @@ module Ovirt
79
82
  end
80
83
 
81
84
 
82
- def self.read_many(reader)
85
+ def self.read_many(reader, connection = nil)
83
86
  # Do nothing if there aren't more tags:
84
- list = []
87
+ list = List.new
88
+ list.connection = connection
85
89
  return list unless reader.forward
86
90
 
91
+ # Process the attributes:
92
+ list.href = reader.get_attribute('href')
93
+
87
94
  # Discard the start tag:
88
95
  empty = reader.empty_element?
89
96
  reader.read
@@ -91,7 +98,7 @@ module Ovirt
91
98
 
92
99
  # Process the inner elements:
93
100
  while reader.forward do
94
- list << read_one(reader)
101
+ list << read_one(reader, connection)
95
102
  end
96
103
 
97
104
  # Discard the end tag:
@@ -20,14 +20,16 @@ module Ovirt
20
20
 
21
21
  class AgentConfigurationReader < Reader # :nodoc:
22
22
 
23
- def self.read_one(reader)
23
+ def self.read_one(reader, connection = nil)
24
24
  # Do nothing if there aren't more tags:
25
25
  return nil unless reader.forward
26
26
 
27
27
  # Create the object:
28
28
  object = AgentConfiguration.new
29
+ object.connection = connection
29
30
 
30
31
  # Process the attributes:
32
+ object.href = reader.get_attribute('href')
31
33
  value = reader.get_attribute('address')
32
34
  object.address = value if not value.nil?
33
35
  value = reader.get_attribute('broker_type')
@@ -78,11 +80,15 @@ module Ovirt
78
80
  end
79
81
 
80
82
 
81
- def self.read_many(reader)
83
+ def self.read_many(reader, connection = nil)
82
84
  # Do nothing if there aren't more tags:
83
- list = []
85
+ list = List.new
86
+ list.connection = connection
84
87
  return list unless reader.forward
85
88
 
89
+ # Process the attributes:
90
+ list.href = reader.get_attribute('href')
91
+
86
92
  # Discard the start tag:
87
93
  empty = reader.empty_element?
88
94
  reader.read
@@ -90,7 +96,7 @@ module Ovirt
90
96
 
91
97
  # Process the inner elements:
92
98
  while reader.forward do
93
- list << read_one(reader)
99
+ list << read_one(reader, connection)
94
100
  end
95
101
 
96
102
  # Discard the end tag: