fog-ovirt 1.1.6 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +12 -5
  3. data/lib/fog/bin/ovirt.rb +3 -3
  4. data/lib/fog/ovirt.rb +2 -4
  5. data/lib/fog/ovirt/compute.rb +12 -12
  6. data/lib/fog/ovirt/compute/v3.rb +2 -2
  7. data/lib/fog/ovirt/compute/v4.rb +4 -2
  8. data/lib/fog/ovirt/models/compute/affinity_group.rb +2 -2
  9. data/lib/fog/ovirt/models/compute/affinity_groups.rb +3 -3
  10. data/lib/fog/ovirt/models/compute/cluster.rb +2 -2
  11. data/lib/fog/ovirt/models/compute/clusters.rb +3 -3
  12. data/lib/fog/ovirt/models/compute/instance_type.rb +2 -2
  13. data/lib/fog/ovirt/models/compute/instance_types.rb +3 -3
  14. data/lib/fog/ovirt/models/compute/interface.rb +2 -2
  15. data/lib/fog/ovirt/models/compute/interfaces.rb +5 -5
  16. data/lib/fog/ovirt/models/compute/operating_system.rb +2 -2
  17. data/lib/fog/ovirt/models/compute/operating_systems.rb +3 -3
  18. data/lib/fog/ovirt/models/compute/quota.rb +2 -2
  19. data/lib/fog/ovirt/models/compute/quotas.rb +3 -3
  20. data/lib/fog/ovirt/models/compute/server.rb +4 -4
  21. data/lib/fog/ovirt/models/compute/servers.rb +3 -3
  22. data/lib/fog/ovirt/models/compute/template.rb +4 -4
  23. data/lib/fog/ovirt/models/compute/templates.rb +3 -3
  24. data/lib/fog/ovirt/models/compute/volume.rb +4 -4
  25. data/lib/fog/ovirt/models/compute/volumes.rb +5 -5
  26. data/lib/fog/ovirt/requests/compute/v3/activate_volume.rb +2 -2
  27. data/lib/fog/ovirt/requests/compute/v3/add_interface.rb +2 -2
  28. data/lib/fog/ovirt/requests/compute/v3/add_to_affinity_group.rb +2 -2
  29. data/lib/fog/ovirt/requests/compute/v3/add_volume.rb +2 -2
  30. data/lib/fog/ovirt/requests/compute/v3/attach_volume.rb +2 -2
  31. data/lib/fog/ovirt/requests/compute/v3/create_affinity_group.rb +2 -2
  32. data/lib/fog/ovirt/requests/compute/v3/create_vm.rb +2 -2
  33. data/lib/fog/ovirt/requests/compute/v3/datacenters.rb +2 -2
  34. data/lib/fog/ovirt/requests/compute/v3/deactivate_volume.rb +2 -2
  35. data/lib/fog/ovirt/requests/compute/v3/destroy_affinity_group.rb +2 -2
  36. data/lib/fog/ovirt/requests/compute/v3/destroy_interface.rb +2 -2
  37. data/lib/fog/ovirt/requests/compute/v3/destroy_vm.rb +2 -2
  38. data/lib/fog/ovirt/requests/compute/v3/destroy_volume.rb +2 -2
  39. data/lib/fog/ovirt/requests/compute/v3/detach_volume.rb +2 -2
  40. data/lib/fog/ovirt/requests/compute/v3/get_affinity_group.rb +2 -2
  41. data/lib/fog/ovirt/requests/compute/v3/get_api_version.rb +2 -2
  42. data/lib/fog/ovirt/requests/compute/v3/get_cluster.rb +2 -2
  43. data/lib/fog/ovirt/requests/compute/v3/get_instance_type.rb +2 -2
  44. data/lib/fog/ovirt/requests/compute/v3/get_quota.rb +2 -2
  45. data/lib/fog/ovirt/requests/compute/v3/get_template.rb +2 -2
  46. data/lib/fog/ovirt/requests/compute/v3/get_virtual_machine.rb +2 -2
  47. data/lib/fog/ovirt/requests/compute/v3/list_affinity_group_vms.rb +2 -2
  48. data/lib/fog/ovirt/requests/compute/v3/list_affinity_groups.rb +2 -2
  49. data/lib/fog/ovirt/requests/compute/v3/list_clusters.rb +2 -2
  50. data/lib/fog/ovirt/requests/compute/v3/list_instance_types.rb +2 -2
  51. data/lib/fog/ovirt/requests/compute/v3/list_networks.rb +2 -2
  52. data/lib/fog/ovirt/requests/compute/v3/list_operating_systems.rb +2 -2
  53. data/lib/fog/ovirt/requests/compute/v3/list_quotas.rb +3 -3
  54. data/lib/fog/ovirt/requests/compute/v3/list_template_interfaces.rb +2 -2
  55. data/lib/fog/ovirt/requests/compute/v3/list_template_volumes.rb +2 -2
  56. data/lib/fog/ovirt/requests/compute/v3/list_templates.rb +2 -2
  57. data/lib/fog/ovirt/requests/compute/v3/list_virtual_machines.rb +2 -2
  58. data/lib/fog/ovirt/requests/compute/v3/list_vm_interfaces.rb +2 -2
  59. data/lib/fog/ovirt/requests/compute/v3/list_vm_volumes.rb +2 -2
  60. data/lib/fog/ovirt/requests/compute/v3/list_volumes.rb +2 -2
  61. data/lib/fog/ovirt/requests/compute/v3/remove_from_affinity_group.rb +2 -2
  62. data/lib/fog/ovirt/requests/compute/v3/storage_domains.rb +2 -2
  63. data/lib/fog/ovirt/requests/compute/v3/update_interface.rb +4 -4
  64. data/lib/fog/ovirt/requests/compute/v3/update_vm.rb +2 -2
  65. data/lib/fog/ovirt/requests/compute/v3/update_volume.rb +4 -4
  66. data/lib/fog/ovirt/requests/compute/v3/vm_action.rb +2 -2
  67. data/lib/fog/ovirt/requests/compute/v3/vm_start_with_cloudinit.rb +2 -2
  68. data/lib/fog/ovirt/requests/compute/v3/vm_ticket.rb +2 -2
  69. data/lib/fog/ovirt/requests/compute/v4/add_interface.rb +2 -2
  70. data/lib/fog/ovirt/requests/compute/v4/add_volume.rb +6 -7
  71. data/lib/fog/ovirt/requests/compute/v4/create_vm.rb +3 -3
  72. data/lib/fog/ovirt/requests/compute/v4/datacenters.rb +2 -2
  73. data/lib/fog/ovirt/requests/compute/v4/destroy_interface.rb +2 -2
  74. data/lib/fog/ovirt/requests/compute/v4/destroy_vm.rb +2 -2
  75. data/lib/fog/ovirt/requests/compute/v4/destroy_volume.rb +2 -2
  76. data/lib/fog/ovirt/requests/compute/v4/get_api_version.rb +2 -2
  77. data/lib/fog/ovirt/requests/compute/v4/get_cluster.rb +2 -2
  78. data/lib/fog/ovirt/requests/compute/v4/get_instance_type.rb +2 -2
  79. data/lib/fog/ovirt/requests/compute/v4/get_quota.rb +2 -2
  80. data/lib/fog/ovirt/requests/compute/v4/get_template.rb +2 -2
  81. data/lib/fog/ovirt/requests/compute/v4/get_virtual_machine.rb +2 -2
  82. data/lib/fog/ovirt/requests/compute/v4/list_clusters.rb +2 -2
  83. data/lib/fog/ovirt/requests/compute/v4/list_instance_types.rb +2 -2
  84. data/lib/fog/ovirt/requests/compute/v4/list_networks.rb +2 -2
  85. data/lib/fog/ovirt/requests/compute/v4/list_operating_systems.rb +2 -2
  86. data/lib/fog/ovirt/requests/compute/v4/list_quotas.rb +2 -2
  87. data/lib/fog/ovirt/requests/compute/v4/list_template_interfaces.rb +2 -2
  88. data/lib/fog/ovirt/requests/compute/v4/list_template_volumes.rb +2 -2
  89. data/lib/fog/ovirt/requests/compute/v4/list_templates.rb +2 -2
  90. data/lib/fog/ovirt/requests/compute/v4/list_virtual_machines.rb +2 -2
  91. data/lib/fog/ovirt/requests/compute/v4/list_vm_interfaces.rb +2 -2
  92. data/lib/fog/ovirt/requests/compute/v4/list_vm_volumes.rb +2 -2
  93. data/lib/fog/ovirt/requests/compute/v4/list_volumes.rb +2 -2
  94. data/lib/fog/ovirt/requests/compute/v4/storage_domains.rb +2 -2
  95. data/lib/fog/ovirt/requests/compute/v4/update_interface.rb +4 -4
  96. data/lib/fog/ovirt/requests/compute/v4/update_vm.rb +2 -2
  97. data/lib/fog/ovirt/requests/compute/v4/update_volume.rb +4 -4
  98. data/lib/fog/ovirt/requests/compute/v4/vm_action.rb +2 -2
  99. data/lib/fog/ovirt/requests/compute/v4/vm_start_with_cloudinit.rb +2 -2
  100. data/lib/fog/ovirt/requests/compute/v4/vm_ticket.rb +2 -2
  101. data/lib/fog/ovirt/version.rb +1 -1
  102. data/tests/ovirt/compute_tests.rb +2 -2
  103. data/tests/ovirt/models/compute/cluster_tests.rb +3 -3
  104. data/tests/ovirt/models/compute/clusters_tests.rb +3 -3
  105. data/tests/ovirt/models/compute/interface_tests.rb +3 -3
  106. data/tests/ovirt/models/compute/interfaces_tests.rb +3 -3
  107. data/tests/ovirt/models/compute/operating_system_tests.rb +3 -3
  108. data/tests/ovirt/models/compute/operating_systems_tests.rb +3 -3
  109. data/tests/ovirt/models/compute/server_tests.rb +3 -3
  110. data/tests/ovirt/models/compute/servers_tests.rb +3 -3
  111. data/tests/ovirt/models/compute/template_tests.rb +3 -3
  112. data/tests/ovirt/models/compute/templates_tests.rb +3 -3
  113. data/tests/ovirt/requests/compute/v3/client_tests.rb +2 -2
  114. data/tests/ovirt/requests/compute/v3/create_vm_tests.rb +2 -2
  115. data/tests/ovirt/requests/compute/v3/destroy_vm_tests.rb +2 -2
  116. data/tests/ovirt/requests/compute/v3/list_datacenters_tests.rb +2 -2
  117. data/tests/ovirt/requests/compute/v3/list_quotas_tests.rb +2 -2
  118. data/tests/ovirt/requests/compute/v3/list_storage_domains_tests.rb +2 -2
  119. data/tests/ovirt/requests/compute/v3/update_vm_tests.rb +2 -2
  120. data/tests/ovirt/requests/compute/v3/update_volume_tests.rb +2 -2
  121. data/tests/ovirt/requests/compute/v4/client_tests.rb +2 -2
  122. data/tests/ovirt/requests/compute/v4/create_vm_tests.rb +2 -2
  123. data/tests/ovirt/requests/compute/v4/destroy_vm_tests.rb +2 -2
  124. data/tests/ovirt/requests/compute/v4/list_datacenters_tests.rb +1 -1
  125. data/tests/ovirt/requests/compute/v4/list_quotas_tests.rb +1 -1
  126. data/tests/ovirt/requests/compute/v4/list_storage_domains_tests.rb +1 -1
  127. data/tests/ovirt/requests/compute/v4/update_volume_tests.rb +1 -1
  128. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa72e4caa6803849c4f51de7bef235366d9e22007ff13dfbdb4f72920c122d0a
4
- data.tar.gz: 467de9cd7c7d14b8295d1e5eeda5e1c69d6e9274b250a81862801a5369e820f2
3
+ metadata.gz: e6c8f50700ff436d3f31a8c67a536c630cd6b8166dffd761f0ec3eaa751bad22
4
+ data.tar.gz: d3ab17d6c140811ec0843778869c416ea0323cf222efbd5c648128b63ccbe52e
5
5
  SHA512:
6
- metadata.gz: a217cb09e27d68d211bb8dee856e9967c8f500b6e5a8a74d470272cda0199d80f5a536adb0d8c81ad6831312676aa2b901d0662ddf05b41db07bd45908fc33e5
7
- data.tar.gz: 928a4234822357789ab89d685dc5d4addc0dbdfcc096292868d3a1c51a5b43f85762091e9bd13e29cd7782f6756061b0ba8758058370f79f772fd507a5264383
6
+ metadata.gz: f6a869a3392da2cb17182a5b1d4dbbcaf286757bf55dbf7b0a00bec3ee79351c4d0cd137e1ad1c03001202b1a7e0ae56854b27f65ba78ee81b0e9555291d2998
7
+ data.tar.gz: df66a186ce9979c987bbc62097b20dd0d1022d5f547549c42806b32441c7a5c3ca58d59e014a24b9e9b6094a3c882356d116cccd31a615504da130788aefdeb5
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2017-12-14 14:56:02 +0100 using RuboCop version 0.52.0.
3
+ # on 2019-05-22 10:36:37 +0300 using RuboCop version 0.70.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -11,10 +11,10 @@
11
11
  Metrics/ClassLength:
12
12
  Max: 150
13
13
 
14
- # Offense count: 2
15
- # Configuration parameters: CountComments.
14
+ # Offense count: 10
15
+ # Configuration parameters: CountComments, ExcludedMethods.
16
16
  Metrics/MethodLength:
17
- Max: 30
17
+ Max: 26
18
18
 
19
19
  # Offense count: 1
20
20
  Style/ClassVars:
@@ -26,7 +26,7 @@ Style/CommentedKeyword:
26
26
  Exclude:
27
27
  - 'lib/fog/ovirt/models/compute/server.rb'
28
28
 
29
- # Offense count: 113
29
+ # Offense count: 188
30
30
  Style/Documentation:
31
31
  Enabled: false
32
32
 
@@ -36,6 +36,13 @@ Style/DoubleNegation:
36
36
  - 'lib/fog/ovirt/models/compute/server.rb'
37
37
  - 'tests/helpers/succeeds_helper.rb'
38
38
 
39
+ # Offense count: 133
40
+ # Cop supports --auto-correct.
41
+ # Configuration parameters: EnforcedStyle.
42
+ # SupportedStyles: always, never
43
+ Style/FrozenStringLiteralComment:
44
+ Enabled: false
45
+
39
46
  # Offense count: 4
40
47
  Style/MultilineTernaryOperator:
41
48
  Exclude:
@@ -1,9 +1,9 @@
1
- class Ovirt < Fog::Bin
1
+ class Compute < Fog::Bin
2
2
  class << self
3
3
  def class_for(key)
4
4
  case key
5
5
  when :compute
6
- Fog::Compute::Ovirt
6
+ Fog::Ovirt::Compute
7
7
  else
8
8
  raise ArgumentError, "Unrecognized service: #{key}"
9
9
  end
@@ -13,7 +13,7 @@ class Ovirt < Fog::Bin
13
13
  @@connections ||= Hash.new do |hash, key|
14
14
  hash[key] = case key
15
15
  when :compute
16
- Fog::Compute.new(:provider => "Ovirt")
16
+ Fog::Ovirt::Compute.new
17
17
  else
18
18
  raise ArgumentError, "Unrecognized service: #{key.inspect}"
19
19
  end
@@ -3,11 +3,9 @@ require "fog/xml"
3
3
  require "fog/json"
4
4
 
5
5
  module Fog
6
- module Compute
7
- autoload :Ovirt, File.expand_path("ovirt/compute", __dir__)
8
- end
9
-
10
6
  module Ovirt
7
+ autoload :Compute, "fog/ovirt/compute"
8
+
11
9
  extend Fog::Provider
12
10
 
13
11
  module Errors
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Ovirt < Fog::Service
2
+ module Ovirt
3
+ class Compute < Fog::Service
4
4
  recognizes :api_version, :ovirt_username, :ovirt_password, :ovirt_url,
5
5
  :ovirt_datacenter, :ovirt_ca_cert_store, :public_key
6
6
 
@@ -58,9 +58,9 @@ module Fog
58
58
 
59
59
  # rubocop:disable Style/ConditionalAssignment
60
60
  if options[:api_version] == "v4"
61
- @client = Fog::Compute::Ovirt::V4.new(options)
61
+ @client = Fog::Ovirt::Compute::V4.new(options)
62
62
  else
63
- @client = Fog::Compute::Ovirt::V3.new(options)
63
+ @client = Fog::Ovirt::Compute::V3.new(options)
64
64
  end
65
65
  # rubocop:enable Style/ConditionalAssignment
66
66
  end
@@ -78,11 +78,11 @@ module Fog
78
78
  class Mock
79
79
  def initialize(options = {})
80
80
  if options[:api_version] == "v4"
81
- Fog::Compute::Ovirt::V4::Mock.send(:include, Fog::Compute::Ovirt::Collections)
82
- @client = Fog::Compute::Ovirt::V4::Mock.new(options)
81
+ Fog::Ovirt::Compute::V4::Mock.send(:include, Fog::Ovirt::Compute::Collections)
82
+ @client = Fog::Ovirt::Compute::V4::Mock.new(options)
83
83
  else
84
- Fog::Compute::Ovirt::V3::Mock.send(:include, Fog::Compute::Ovirt::Collections)
85
- @client = Fog::Compute::Ovirt::V3::Mock.new(options)
84
+ Fog::Ovirt::Compute::V3::Mock.send(:include, Fog::Ovirt::Compute::Collections)
85
+ @client = Fog::Ovirt::Compute::V3::Mock.new(options)
86
86
  end
87
87
  end
88
88
 
@@ -100,11 +100,11 @@ module Fog
100
100
  class Real
101
101
  def initialize(options = {})
102
102
  if options[:api_version] == "v4"
103
- Fog::Compute::Ovirt::V4::Real.send(:include, Fog::Compute::Ovirt::Collections)
104
- @client = Fog::Compute::Ovirt::V4::Real.new(options)
103
+ Fog::Ovirt::Compute::V4::Real.send(:include, Fog::Ovirt::Compute::Collections)
104
+ @client = Fog::Ovirt::Compute::V4::Real.new(options)
105
105
  else
106
- Fog::Compute::Ovirt::V3::Real.send(:include, Fog::Compute::Ovirt::Collections)
107
- @client = Fog::Compute::Ovirt::V3::Real.new(options)
106
+ Fog::Ovirt::Compute::V3::Real.send(:include, Fog::Ovirt::Compute::Collections)
107
+ @client = Fog::Ovirt::Compute::V3::Real.new(options)
108
108
  end
109
109
  end
110
110
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Ovirt
2
+ module Ovirt
3
+ class Compute
4
4
  class V3 < Fog::Service
5
5
  requires :ovirt_username, :ovirt_password
6
6
  recognizes :ovirt_url, :ovirt_server, :ovirt_port, :ovirt_api_path, :ovirt_datacenter,
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Ovirt
2
+ module Ovirt
3
+ class Compute
4
4
  class V4 < Fog::Service
5
5
  requires :ovirt_username, :ovirt_password
6
6
  recognizes :ovirt_url, :ovirt_server, :ovirt_port, :ovirt_api_path, :ovirt_datacenter,
@@ -95,6 +95,7 @@ module Fog
95
95
  :address => value.address,
96
96
  :port => value.port,
97
97
  :secure_port => value.secure_port,
98
+ :keyboard_layout => value.keyboard_layout,
98
99
  :subject => subject,
99
100
  :monitors => value.monitors
100
101
  }
@@ -111,6 +112,7 @@ module Fog
111
112
  # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity
112
113
 
113
114
  def convert_string_to_bool(opts)
115
+ return opts unless opts.present?
114
116
  opts.each do |key, value|
115
117
  if value == "true"
116
118
  opts[key] = true
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Ovirt
2
+ module Ovirt
3
+ class Compute
4
4
  class AffinityGroup < Fog::Model
5
5
  identity :id
6
6
 
@@ -2,10 +2,10 @@ require "fog/core/collection"
2
2
  require "fog/ovirt/models/compute/affinity_group"
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Ovirt
5
+ module Ovirt
6
+ class Compute
7
7
  class AffinityGroups < Fog::Collection
8
- model Fog::Compute::Ovirt::AffinityGroup
8
+ model Fog::Ovirt::Compute::AffinityGroup
9
9
 
10
10
  def all(filters = {})
11
11
  load service.list_affinity_groups(filters)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Ovirt
2
+ module Ovirt
3
+ class Compute
4
4
  class Cluster < Fog::Model
5
5
  identity :id
6
6
 
@@ -2,10 +2,10 @@ require "fog/core/collection"
2
2
  require "fog/ovirt/models/compute/cluster"
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Ovirt
5
+ module Ovirt
6
+ class Compute
7
7
  class Clusters < Fog::Collection
8
- model Fog::Compute::Ovirt::Cluster
8
+ model Fog::Ovirt::Compute::Cluster
9
9
 
10
10
  def all(filters = {})
11
11
  load service.list_clusters(filters)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Ovirt
2
+ module Ovirt
3
+ class Compute
4
4
  class InstanceType < Fog::Model
5
5
  identity :id
6
6
 
@@ -2,10 +2,10 @@ require "fog/core/collection"
2
2
  require "fog/ovirt/models/compute/instance_type"
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Ovirt
5
+ module Ovirt
6
+ class Compute
7
7
  class InstanceTypes < Fog::Collection
8
- model Fog::Compute::Ovirt::InstanceType
8
+ model Fog::Ovirt::Compute::InstanceType
9
9
 
10
10
  def all(filters = {})
11
11
  load service.list_instance_types(filters)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Ovirt
2
+ module Ovirt
3
+ class Compute
4
4
  class Interface < Fog::Model
5
5
  attr_accessor :raw
6
6
  identity :id
@@ -2,19 +2,19 @@ require "fog/core/collection"
2
2
  require "fog/ovirt/models/compute/interface"
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Ovirt
5
+ module Ovirt
6
+ class Compute
7
7
  class Interfaces < Fog::Collection
8
- model Fog::Compute::Ovirt::Interface
8
+ model Fog::Ovirt::Compute::Interface
9
9
 
10
10
  attr_accessor :vm
11
11
 
12
12
  # rubocop:disable Metrics/AbcSize
13
13
  def all(_filters = {})
14
14
  requires :vm
15
- if vm.is_a? Fog::Compute::Ovirt::Server
15
+ if vm.is_a? Fog::Ovirt::Compute::Server
16
16
  load service.list_vm_interfaces(vm.id)
17
- elsif vm.is_a? Fog::Compute::Ovirt::Template
17
+ elsif vm.is_a? Fog::Ovirt::Compute::Template
18
18
  load service.list_template_interfaces(vm.id)
19
19
  else
20
20
  raise ::Fog::Ovirt::Errors::OvirtError, "interfaces should have vm or template"
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Ovirt
2
+ module Ovirt
3
+ class Compute
4
4
  class OperatingSystem < Fog::Model
5
5
  attr_accessor :raw
6
6
  identity :id
@@ -2,10 +2,10 @@ require "fog/core/collection"
2
2
  require "fog/ovirt/models/compute/operating_system"
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Ovirt
5
+ module Ovirt
6
+ class Compute
7
7
  class OperatingSystems < Fog::Collection
8
- model Fog::Compute::Ovirt::OperatingSystem
8
+ model Fog::Ovirt::Compute::OperatingSystem
9
9
 
10
10
  def all
11
11
  load service.list_operating_systems
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Ovirt
2
+ module Ovirt
3
+ class Compute
4
4
  class Quota < Fog::Model
5
5
  identity :id
6
6
 
@@ -2,10 +2,10 @@ require "fog/core/collection"
2
2
  require "fog/ovirt/models/compute/quota"
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Ovirt
5
+ module Ovirt
6
+ class Compute
7
7
  class Quotas < Fog::Collection
8
- model Fog::Compute::Ovirt::Quota
8
+ model Fog::Ovirt::Compute::Quota
9
9
 
10
10
  def all(filters = {})
11
11
  load service.list_quotas(filters)
@@ -1,8 +1,8 @@
1
1
  require "fog/compute/models/server"
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Ovirt
4
+ module Ovirt
5
+ class Compute
6
6
  class Server < Fog::Compute::Server
7
7
  # This will be the instance uuid which is globally unique across
8
8
  # a oVirt deployment.
@@ -53,7 +53,7 @@ module Fog
53
53
  end
54
54
 
55
55
  def interfaces
56
- @interfaces ||= id.nil? ? [] : Fog::Compute::Ovirt::Interfaces.new(
56
+ @interfaces ||= id.nil? ? [] : Fog::Ovirt::Compute::Interfaces.new(
57
57
  :service => service,
58
58
  :vm => self
59
59
  )
@@ -75,7 +75,7 @@ module Fog
75
75
  end
76
76
 
77
77
  def volumes
78
- @volumes ||= id.nil? ? [] : Fog::Compute::Ovirt::Volumes.new(
78
+ @volumes ||= id.nil? ? [] : Fog::Ovirt::Compute::Volumes.new(
79
79
  :service => service,
80
80
  :vm => self
81
81
  )
@@ -2,10 +2,10 @@ require "fog/core/collection"
2
2
  require "fog/ovirt/models/compute/server"
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Ovirt
5
+ module Ovirt
6
+ class Compute
7
7
  class Servers < Fog::Collection
8
- model Fog::Compute::Ovirt::Server
8
+ model Fog::Ovirt::Compute::Server
9
9
 
10
10
  def all(filters = {})
11
11
  load service.list_virtual_machines(filters)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Ovirt
2
+ module Ovirt
3
+ class Compute
4
4
  class Template < Fog::Model
5
5
  identity :id
6
6
 
@@ -23,14 +23,14 @@ module Fog
23
23
  attribute :version
24
24
 
25
25
  def interfaces
26
- attributes[:interfaces] ||= id.nil? ? [] : Fog::Compute::Ovirt::Interfaces.new(
26
+ attributes[:interfaces] ||= id.nil? ? [] : Fog::Ovirt::Compute::Interfaces.new(
27
27
  :service => service,
28
28
  :vm => self
29
29
  )
30
30
  end
31
31
 
32
32
  def volumes
33
- attributes[:volumes] ||= id.nil? ? [] : Fog::Compute::Ovirt::Volumes.new(
33
+ attributes[:volumes] ||= id.nil? ? [] : Fog::Ovirt::Compute::Volumes.new(
34
34
  :service => service,
35
35
  :vm => self
36
36
  )
@@ -2,10 +2,10 @@ require "fog/core/collection"
2
2
  require "fog/ovirt/models/compute/template"
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Ovirt
5
+ module Ovirt
6
+ class Compute
7
7
  class Templates < Fog::Collection
8
- model Fog::Compute::Ovirt::Template
8
+ model Fog::Ovirt::Compute::Template
9
9
 
10
10
  def all(filters = {})
11
11
  load service.list_templates(filters)
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Ovirt
2
+ module Ovirt
3
+ class Compute
4
4
  class Volume < Fog::Model
5
5
  attr_accessor :raw
6
6
  identity :id
@@ -19,11 +19,11 @@ module Fog
19
19
  attribute :wipe_after_delete
20
20
 
21
21
  def size_gb
22
- attributes[:size_gb] ||= attributes[:size].to_i / Fog::Compute::Ovirt::DISK_SIZE_TO_GB if attributes[:size]
22
+ attributes[:size_gb] ||= attributes[:size].to_i / Fog::Ovirt::Compute::DISK_SIZE_TO_GB if attributes[:size]
23
23
  end
24
24
 
25
25
  def size_gb=(size)
26
- attributes[:size] = size.to_i * Fog::Compute::Ovirt::DISK_SIZE_TO_GB if size
26
+ attributes[:size] = size.to_i * Fog::Ovirt::Compute::DISK_SIZE_TO_GB if size
27
27
  end
28
28
 
29
29
  def to_s
@@ -2,18 +2,18 @@ require "fog/core/collection"
2
2
  require "fog/ovirt/models/compute/volume"
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Ovirt
5
+ module Ovirt
6
+ class Compute
7
7
  class Volumes < Fog::Collection
8
- model Fog::Compute::Ovirt::Volume
8
+ model Fog::Ovirt::Compute::Volume
9
9
 
10
10
  attr_accessor :vm
11
11
 
12
12
  # rubocop:disable Metrics/AbcSize
13
13
  def all(_filters = {})
14
- if vm.is_a? Fog::Compute::Ovirt::Server
14
+ if vm.is_a? Fog::Ovirt::Compute::Server
15
15
  load service.list_vm_volumes(vm.id)
16
- elsif vm.is_a? Fog::Compute::Ovirt::Template
16
+ elsif vm.is_a? Fog::Ovirt::Compute::Template
17
17
  load service.list_template_volumes(vm.id)
18
18
  else
19
19
  load service.list_volumes