fog-ovirt 1.2.5 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +7 -0
- data/.rubocop_todo.yml +17 -5
- data/Gemfile +0 -1
- data/README.md +2 -6
- data/Rakefile +2 -8
- data/fog-ovirt.gemspec +3 -3
- data/lib/fog/ovirt/compute/v4.rb +4 -0
- data/lib/fog/ovirt/compute.rb +5 -29
- data/lib/fog/ovirt/models/compute/interface.rb +1 -0
- data/lib/fog/ovirt/requests/compute/v4/add_interface.rb +4 -8
- data/lib/fog/ovirt/requests/compute/v4/list_vnic_profiles.rb +25 -0
- data/lib/fog/ovirt/requests/compute/v4/mock_files/operating_systems.xml +4 -4
- data/lib/fog/ovirt/requests/compute/v4/mock_files/vnic_profiles.xml +42 -0
- data/lib/fog/ovirt/requests/compute/v4/storage_domains.rb +1 -1
- data/lib/fog/ovirt/requests/compute/v4/update_vm.rb +1 -1
- data/lib/fog/ovirt/version.rb +1 -1
- metadata +20 -98
- data/lib/fog/ovirt/compute/v3.rb +0 -136
- data/lib/fog/ovirt/requests/compute/v3/activate_volume.rb +0 -23
- data/lib/fog/ovirt/requests/compute/v3/add_interface.rb +0 -22
- data/lib/fog/ovirt/requests/compute/v3/add_to_affinity_group.rb +0 -23
- data/lib/fog/ovirt/requests/compute/v3/add_volume.rb +0 -23
- data/lib/fog/ovirt/requests/compute/v3/attach_volume.rb +0 -24
- data/lib/fog/ovirt/requests/compute/v3/create_affinity_group.rb +0 -20
- data/lib/fog/ovirt/requests/compute/v3/create_vm.rb +0 -20
- data/lib/fog/ovirt/requests/compute/v3/datacenters.rb +0 -22
- data/lib/fog/ovirt/requests/compute/v3/deactivate_volume.rb +0 -24
- data/lib/fog/ovirt/requests/compute/v3/destroy_affinity_group.rb +0 -21
- data/lib/fog/ovirt/requests/compute/v3/destroy_interface.rb +0 -24
- data/lib/fog/ovirt/requests/compute/v3/destroy_vm.rb +0 -21
- data/lib/fog/ovirt/requests/compute/v3/destroy_volume.rb +0 -24
- data/lib/fog/ovirt/requests/compute/v3/detach_volume.rb +0 -24
- data/lib/fog/ovirt/requests/compute/v3/get_affinity_group.rb +0 -20
- data/lib/fog/ovirt/requests/compute/v3/get_api_version.rb +0 -18
- data/lib/fog/ovirt/requests/compute/v3/get_cluster.rb +0 -19
- data/lib/fog/ovirt/requests/compute/v3/get_instance_type.rb +0 -19
- data/lib/fog/ovirt/requests/compute/v3/get_quota.rb +0 -19
- data/lib/fog/ovirt/requests/compute/v3/get_template.rb +0 -19
- data/lib/fog/ovirt/requests/compute/v3/get_virtual_machine.rb +0 -19
- data/lib/fog/ovirt/requests/compute/v3/get_volume.rb +0 -19
- data/lib/fog/ovirt/requests/compute/v3/list_affinity_group_vms.rb +0 -24
- data/lib/fog/ovirt/requests/compute/v3/list_affinity_groups.rb +0 -22
- data/lib/fog/ovirt/requests/compute/v3/list_clusters.rb +0 -21
- data/lib/fog/ovirt/requests/compute/v3/list_instance_types.rb +0 -21
- data/lib/fog/ovirt/requests/compute/v3/list_networks.rb +0 -18
- data/lib/fog/ovirt/requests/compute/v3/list_operating_systems.rb +0 -21
- data/lib/fog/ovirt/requests/compute/v3/list_quotas.rb +0 -21
- data/lib/fog/ovirt/requests/compute/v3/list_template_interfaces.rb +0 -21
- data/lib/fog/ovirt/requests/compute/v3/list_template_volumes.rb +0 -21
- data/lib/fog/ovirt/requests/compute/v3/list_templates.rb +0 -21
- data/lib/fog/ovirt/requests/compute/v3/list_virtual_machines.rb +0 -21
- data/lib/fog/ovirt/requests/compute/v3/list_vm_interfaces.rb +0 -21
- data/lib/fog/ovirt/requests/compute/v3/list_vm_volumes.rb +0 -21
- data/lib/fog/ovirt/requests/compute/v3/list_volumes.rb +0 -21
- data/lib/fog/ovirt/requests/compute/v3/mock_files/affinitygroup.xml +0 -8
- data/lib/fog/ovirt/requests/compute/v3/mock_files/affinitygroup_vms.xml +0 -9
- data/lib/fog/ovirt/requests/compute/v3/mock_files/affinitygroups.xml +0 -17
- data/lib/fog/ovirt/requests/compute/v3/mock_files/cluster.xml +0 -20
- data/lib/fog/ovirt/requests/compute/v3/mock_files/clusters.xml +0 -39
- data/lib/fog/ovirt/requests/compute/v3/mock_files/data_centers.xml +0 -17
- data/lib/fog/ovirt/requests/compute/v3/mock_files/disks.xml +0 -58
- data/lib/fog/ovirt/requests/compute/v3/mock_files/instance_type.xml +0 -42
- data/lib/fog/ovirt/requests/compute/v3/mock_files/instance_types.xml +0 -197
- data/lib/fog/ovirt/requests/compute/v3/mock_files/nics.xml +0 -10
- data/lib/fog/ovirt/requests/compute/v3/mock_files/operating_systems.xml +0 -10
- data/lib/fog/ovirt/requests/compute/v3/mock_files/quotas.xml +0 -7
- data/lib/fog/ovirt/requests/compute/v3/mock_files/storage_domains.xml +0 -36
- data/lib/fog/ovirt/requests/compute/v3/mock_files/template.xml +0 -39
- data/lib/fog/ovirt/requests/compute/v3/mock_files/templates.xml +0 -110
- data/lib/fog/ovirt/requests/compute/v3/mock_files/vm.xml +0 -52
- data/lib/fog/ovirt/requests/compute/v3/mock_files/vms.xml +0 -152
- data/lib/fog/ovirt/requests/compute/v3/mock_files/volume.xml +0 -21
- data/lib/fog/ovirt/requests/compute/v3/mock_files/volumes.xml +0 -40
- data/lib/fog/ovirt/requests/compute/v3/remove_from_affinity_group.rb +0 -23
- data/lib/fog/ovirt/requests/compute/v3/storage_domains.rb +0 -22
- data/lib/fog/ovirt/requests/compute/v3/update_interface.rb +0 -36
- data/lib/fog/ovirt/requests/compute/v3/update_vm.rb +0 -20
- data/lib/fog/ovirt/requests/compute/v3/update_volume.rb +0 -37
- data/lib/fog/ovirt/requests/compute/v3/vm_action.rb +0 -24
- data/lib/fog/ovirt/requests/compute/v3/vm_start_with_cloudinit.rb +0 -21
- data/lib/fog/ovirt/requests/compute/v3/vm_ticket.rb +0 -19
- data/tests/ovirt/requests/compute/v3/client_tests.rb +0 -31
- data/tests/ovirt/requests/compute/v3/create_vm_tests.rb +0 -17
- data/tests/ovirt/requests/compute/v3/destroy_vm_tests.rb +0 -14
- data/tests/ovirt/requests/compute/v3/list_datacenters_tests.rb +0 -11
- data/tests/ovirt/requests/compute/v3/list_quotas_tests.rb +0 -10
- data/tests/ovirt/requests/compute/v3/list_storage_domains_tests.rb +0 -11
- data/tests/ovirt/requests/compute/v3/update_vm_tests.rb +0 -14
- data/tests/ovirt/requests/compute/v3/update_volume_tests.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4823155b520813d343004cc89023ce9fd5aafc124e6cdce4a75ea04986977645
|
4
|
+
data.tar.gz: dbcfa93d8371eef22b8f638fb765bd9bd5996370d4538b51722bc7226201d462
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8aa5dd0e6bd07d9b8545689d00e8720cebcd1aa0867171b67539dbfb067e3c1a18711bc86fe5dcae2a8b66f9e38bd2dd2be8306577684f34c0d7516783bcf5a1
|
7
|
+
data.tar.gz: f9db399c50da5e33b31aa92156f0d934804ba972512559000b3a6c59797e9e9955038d1ee9529ebe61b8cd50de768bc2be4292f037717e6144dcf7df246acbdd
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2020-10-15 17:29:26 +0300 using RuboCop version 0.81.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,11 +11,18 @@
|
|
11
11
|
Metrics/ClassLength:
|
12
12
|
Max: 150
|
13
13
|
|
14
|
-
# Offense count:
|
14
|
+
# Offense count: 8
|
15
15
|
# Configuration parameters: CountComments, ExcludedMethods.
|
16
16
|
Metrics/MethodLength:
|
17
17
|
Max: 26
|
18
18
|
|
19
|
+
# Offense count: 1
|
20
|
+
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
21
|
+
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
22
|
+
Naming/FileName:
|
23
|
+
Exclude:
|
24
|
+
- 'Gemfile.local.rb'
|
25
|
+
|
19
26
|
# Offense count: 1
|
20
27
|
Style/ClassVars:
|
21
28
|
Exclude:
|
@@ -26,7 +33,7 @@ Style/CommentedKeyword:
|
|
26
33
|
Exclude:
|
27
34
|
- 'lib/fog/ovirt/models/compute/server.rb'
|
28
35
|
|
29
|
-
# Offense count:
|
36
|
+
# Offense count: 98
|
30
37
|
Style/Documentation:
|
31
38
|
Enabled: false
|
32
39
|
|
@@ -36,13 +43,18 @@ Style/DoubleNegation:
|
|
36
43
|
- 'lib/fog/ovirt/models/compute/server.rb'
|
37
44
|
- 'tests/helpers/succeeds_helper.rb'
|
38
45
|
|
39
|
-
# Offense count:
|
46
|
+
# Offense count: 84
|
40
47
|
# Cop supports --auto-correct.
|
41
48
|
# Configuration parameters: EnforcedStyle.
|
42
|
-
# SupportedStyles: always, never
|
49
|
+
# SupportedStyles: always, always_true, never
|
43
50
|
Style/FrozenStringLiteralComment:
|
44
51
|
Enabled: false
|
45
52
|
|
53
|
+
# Offense count: 3
|
54
|
+
Style/MissingRespondToMissing:
|
55
|
+
Exclude:
|
56
|
+
- 'lib/fog/ovirt/compute.rb'
|
57
|
+
|
46
58
|
# Offense count: 4
|
47
59
|
Style/MultilineTernaryOperator:
|
48
60
|
Exclude:
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -40,9 +40,7 @@ compute = Fog::Compute.new(
|
|
40
40
|
|
41
41
|
## API Support
|
42
42
|
|
43
|
-
This gem fully supports API
|
44
|
-
|
45
|
-
Version 1.0.2 adds support API V4 as well.
|
43
|
+
This gem fully supports API V4 of oVirt.
|
46
44
|
The first version does not give full support.
|
47
45
|
The supported requests for API V4 are:
|
48
46
|
|
@@ -72,9 +70,7 @@ This example shows the usage as a fog provider:
|
|
72
70
|
:ovirt_url => url,
|
73
71
|
:ovirt_datacenter => datacenter,
|
74
72
|
:public_key => public_key,
|
75
|
-
:api_version => 'v4'
|
76
73
|
)
|
77
|
-
The :api_version can be sent 'v3' or 'v4' to determine which API version to use.
|
78
74
|
|
79
75
|
|
80
76
|
Feedback is welcome. Please feel free to open issues for the V4 support and contribute.
|
@@ -85,4 +81,4 @@ Please refer to [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
85
81
|
|
86
82
|
## License
|
87
83
|
|
88
|
-
Please refer to [LICENSE.md](LICENSE.md).
|
84
|
+
Please refer to [LICENSE.md](LICENSE.md).
|
data/Rakefile
CHANGED
@@ -9,14 +9,8 @@ require "bundler/gem_tasks"
|
|
9
9
|
|
10
10
|
mock = ENV["FOG_MOCK"] || "true"
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
RuboCop::RakeTask.new do |t|
|
15
|
-
t.patterns = Dir["{lib,spec,tests}/**/*.rb"]
|
16
|
-
end
|
17
|
-
rescue StandardError
|
18
|
-
puts "Rubocop not loaded"
|
19
|
-
end
|
12
|
+
require "rubocop/rake_task"
|
13
|
+
RuboCop::RakeTask.new
|
20
14
|
|
21
15
|
task :test do
|
22
16
|
sh("export FOG_MOCK=#{mock} && bundle exec shindont tests/ovirt")
|
data/fog-ovirt.gemspec
CHANGED
@@ -17,14 +17,14 @@ Gem::Specification.new do |spec|
|
|
17
17
|
|
18
18
|
spec.files = `git ls-files -z`.split("\x0")
|
19
19
|
spec.test_files = spec.files.grep(%r{^tests\/})
|
20
|
-
|
21
20
|
spec.require_paths = ["lib"]
|
21
|
+
spec.required_ruby_version = ">= 2.0.0"
|
22
22
|
|
23
|
+
spec.add_dependency("activesupport")
|
23
24
|
spec.add_dependency("fog-core")
|
24
25
|
spec.add_dependency("fog-json")
|
25
26
|
spec.add_dependency("fog-xml")
|
26
|
-
spec.add_dependency("ovirt-engine-sdk", ">= 4.1
|
27
|
-
spec.add_dependency("rbovirt", "~> 0.1.5")
|
27
|
+
spec.add_dependency("ovirt-engine-sdk", ">= 4.3.1")
|
28
28
|
|
29
29
|
spec.add_development_dependency "bundler"
|
30
30
|
spec.add_development_dependency "pry"
|
data/lib/fog/ovirt/compute/v4.rb
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
require "active_support"
|
2
|
+
require "active_support/core_ext"
|
3
|
+
|
1
4
|
module Fog
|
2
5
|
module Ovirt
|
3
6
|
class Compute
|
@@ -40,6 +43,7 @@ module Fog
|
|
40
43
|
request :list_quotas
|
41
44
|
request :get_quota
|
42
45
|
request :list_operating_systems
|
46
|
+
request :list_vnic_profiles
|
43
47
|
|
44
48
|
module Shared
|
45
49
|
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
data/lib/fog/ovirt/compute.rb
CHANGED
@@ -50,22 +50,13 @@ module Fog
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
require "fog/ovirt/compute/v3"
|
54
53
|
require "fog/ovirt/compute/v4"
|
55
54
|
|
56
55
|
def self.new(options = {})
|
57
56
|
super(options)
|
58
|
-
|
59
|
-
# rubocop:disable Style/ConditionalAssignment
|
60
|
-
if options[:api_version] == "v4"
|
61
|
-
@client = Fog::Ovirt::Compute::V4.new(options)
|
62
|
-
else
|
63
|
-
@client = Fog::Ovirt::Compute::V3.new(options)
|
64
|
-
end
|
65
|
-
# rubocop:enable Style/ConditionalAssignment
|
57
|
+
@client = Fog::Ovirt::Compute::V4.new(options)
|
66
58
|
end
|
67
59
|
|
68
|
-
# rubocop:disable Style/MethodMissingSuper, Style/MissingRespondToMissing
|
69
60
|
def method_missing(symbol, *args)
|
70
61
|
@client.__send__(symbol, *args)
|
71
62
|
end
|
@@ -73,20 +64,13 @@ module Fog
|
|
73
64
|
def respond_to?(symbol, include_all = false)
|
74
65
|
@client.respond_to?(symbol, include_all)
|
75
66
|
end
|
76
|
-
# rubocop:enable Style/MethodMissingSuper, Style/MissingRespondToMissing
|
77
67
|
|
78
68
|
class Mock
|
79
69
|
def initialize(options = {})
|
80
|
-
|
81
|
-
|
82
|
-
@client = Fog::Ovirt::Compute::V4::Mock.new(options)
|
83
|
-
else
|
84
|
-
Fog::Ovirt::Compute::V3::Mock.include Fog::Ovirt::Compute::Collections
|
85
|
-
@client = Fog::Ovirt::Compute::V3::Mock.new(options)
|
86
|
-
end
|
70
|
+
Fog::Ovirt::Compute::V4::Mock.include Fog::Ovirt::Compute::Collections
|
71
|
+
@client = Fog::Ovirt::Compute::V4::Mock.new(options)
|
87
72
|
end
|
88
73
|
|
89
|
-
# rubocop:disable Style/MethodMissingSuper, Style/MissingRespondToMissing
|
90
74
|
def method_missing(symbol, *args)
|
91
75
|
@client.__send__(symbol, *args)
|
92
76
|
end
|
@@ -94,21 +78,14 @@ module Fog
|
|
94
78
|
def respond_to?(symbol, include_all = false)
|
95
79
|
@client.respond_to?(symbol, include_all)
|
96
80
|
end
|
97
|
-
# rubocop:enable Style/MethodMissingSuper, Style/MissingRespondToMissing
|
98
81
|
end
|
99
82
|
|
100
83
|
class Real
|
101
84
|
def initialize(options = {})
|
102
|
-
|
103
|
-
|
104
|
-
@client = Fog::Ovirt::Compute::V4::Real.new(options)
|
105
|
-
else
|
106
|
-
Fog::Ovirt::Compute::V3::Real.include Fog::Ovirt::Compute::Collections
|
107
|
-
@client = Fog::Ovirt::Compute::V3::Real.new(options)
|
108
|
-
end
|
85
|
+
Fog::Ovirt::Compute::V4::Real.include Fog::Ovirt::Compute::Collections
|
86
|
+
@client = Fog::Ovirt::Compute::V4::Real.new(options)
|
109
87
|
end
|
110
88
|
|
111
|
-
# rubocop:disable Style/MethodMissingSuper, Style/MissingRespondToMissing
|
112
89
|
def method_missing(symbol, *args)
|
113
90
|
@client.send(symbol, *args)
|
114
91
|
end
|
@@ -116,7 +93,6 @@ module Fog
|
|
116
93
|
def respond_to?(symbol, include_all = false)
|
117
94
|
@client.respond_to?(symbol, include_all)
|
118
95
|
end
|
119
|
-
# rubocop:enable Style/MethodMissingSuper, Style/MissingRespondToMissing
|
120
96
|
end
|
121
97
|
end
|
122
98
|
end
|
@@ -9,19 +9,15 @@ module Fog
|
|
9
9
|
nics_service = vm.nics_service
|
10
10
|
options = options.dup
|
11
11
|
options = convert_string_to_bool(options)
|
12
|
-
if options[:network].present?
|
12
|
+
if options[:network].present? && options[:vnic_profile].nil?
|
13
13
|
network = client.system_service.networks_service.network_service(options[:network]).get
|
14
|
-
|
15
14
|
profiles = client.follow_link(network.vnic_profiles)
|
16
|
-
|
17
15
|
profile = profiles.detect { |x| x.name == network.name }
|
18
|
-
|
19
16
|
profile ||= profiles.min_by(&:name)
|
20
|
-
|
21
|
-
options.delete(:network)
|
22
|
-
options[:vnic_profile] = { :id => profile.id }
|
17
|
+
options[:vnic_profile] = profile.id
|
23
18
|
end
|
24
|
-
|
19
|
+
options[:vnic_profile] = { :id => options[:vnic_profile] }
|
20
|
+
options.delete(:network)
|
25
21
|
interface = OvirtSDK4::Nic.new(options)
|
26
22
|
nics_service.add(interface)
|
27
23
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Fog
|
2
|
+
module Ovirt
|
3
|
+
class Compute
|
4
|
+
class V4
|
5
|
+
class Real
|
6
|
+
def list_vnic_profiles(_opts = {})
|
7
|
+
dc_vnics = []
|
8
|
+
profiles = client.system_service.vnic_profiles_service.list
|
9
|
+
profiles.each do |profile|
|
10
|
+
vnic_network = client.follow_link(profile.network)
|
11
|
+
dc_vnics.append(profile) if vnic_network.data_center.id == datacenter
|
12
|
+
end
|
13
|
+
dc_vnics
|
14
|
+
end
|
15
|
+
end
|
16
|
+
class Mock
|
17
|
+
def list_vnic_profiles(_filters = {})
|
18
|
+
xml = read_xml "vnic_profiles.xml"
|
19
|
+
ovirt_attrs OvirtSDK4::Reader.read(Nokogiri::XML(xml).root.to_s)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<operating_systems>
|
2
|
-
<operating_system href="/ovirt-engine/api/
|
2
|
+
<operating_system href="/ovirt-engine/api/v4/operatingsystems/b51fe06a-9483-49e0-9577-9779826e7e82" id="b51fe06a-9483-49e0-9577-9779826e7e82">
|
3
3
|
<name>other</name>
|
4
4
|
<description>Other OS</description>
|
5
|
-
<large_icon href="/ovirt-engine/api/
|
5
|
+
<large_icon href="/ovirt-engine/api/v4/icons/124c94be-be96-4df8-b109-ebf5d3cbf72b"
|
6
6
|
id="124c94be-be96-4df8-b109-ebf5d3cbf72b" />
|
7
|
-
<small_icon href="/ovirt-engine/api/
|
7
|
+
<small_icon href="/ovirt-engine/api/v4/icons/55c8d56e-2ff0-46ef-aa27-9161db22fe21"
|
8
8
|
id="55c8d56e-2ff0-46ef-aa27-9161db22fe21"/>
|
9
9
|
</operating_system>
|
10
|
-
</operating_systems>
|
10
|
+
</operating_systems>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<vnic_profiles>
|
2
|
+
<vnic_profile href="/ovirt-engine/api/vnicprofiles/0000000a-000a-000a-000a-000000000398" id="0000000a-000a-000a-000a-000000000398">
|
3
|
+
<name>ovirtmgmt</name>
|
4
|
+
<link href="/ovirt-engine/api/vnicprofiles/0000000a-000a-000a-000a-000000000398/permissions" rel="permissions"/>
|
5
|
+
<pass_through>
|
6
|
+
<mode>disabled</mode>
|
7
|
+
</pass_through>
|
8
|
+
<port_mirroring>false</port_mirroring>
|
9
|
+
<network href="/ovirt-engine/api/networks/00000000-0000-0000-0000-000000000009" id="00000000-0000-0000-0000-000000000009"/>
|
10
|
+
<network_filter href="/ovirt-engine/api/networkfilters/b295bf02-24b8-11ea-926f-001a4a160344" id="b295bf02-24b8-11ea-926f-001a4a160344"/>
|
11
|
+
</vnic_profile>
|
12
|
+
<vnic_profile href="/ovirt-engine/api/vnicprofiles/4e7431d7-bb74-4358-b065-7dc4a0a3f9a9" id="4e7431d7-bb74-4358-b065-7dc4a0a3f9a9">
|
13
|
+
<name>ovirtmgmt</name>
|
14
|
+
<link href="/ovirt-engine/api/vnicprofiles/4e7431d7-bb74-4358-b065-7dc4a0a3f9a9/permissions" rel="permissions"/>
|
15
|
+
<pass_through>
|
16
|
+
<mode>disabled</mode>
|
17
|
+
</pass_through>
|
18
|
+
<port_mirroring>false</port_mirroring>
|
19
|
+
<network href="/ovirt-engine/api/networks/f89cd192-657a-49aa-99ae-f325882eb70c" id="f89cd192-657a-49aa-99ae-f325882eb70c"/>
|
20
|
+
<network_filter href="/ovirt-engine/api/networkfilters/b295bf02-24b8-11ea-926f-001a4a160344" id="b295bf02-24b8-11ea-926f-001a4a160344"/>
|
21
|
+
</vnic_profile>
|
22
|
+
<vnic_profile href="/ovirt-engine/api/vnicprofiles/51249f24-17d3-48e8-807e-689d85a22b14" id="51249f24-17d3-48e8-807e-689d85a22b14">
|
23
|
+
<name>test</name>
|
24
|
+
<link href="/ovirt-engine/api/vnicprofiles/51249f24-17d3-48e8-807e-689d85a22b14/permissions" rel="permissions"/>
|
25
|
+
<pass_through>
|
26
|
+
<mode>disabled</mode>
|
27
|
+
</pass_through>
|
28
|
+
<port_mirroring>true</port_mirroring>
|
29
|
+
<network href="/ovirt-engine/api/networks/f89cd192-657a-49aa-99ae-f325882eb70c" id="f89cd192-657a-49aa-99ae-f325882eb70c"/>
|
30
|
+
<network_filter href="/ovirt-engine/api/networkfilters/b295bf02-24b8-11ea-926f-001a4a160344" id="b295bf02-24b8-11ea-926f-001a4a160344"/>
|
31
|
+
</vnic_profile>
|
32
|
+
<vnic_profile href="/ovirt-engine/api/vnicprofiles/8267104a-7597-474b-a617-9c787c1a8e9d" id="8267104a-7597-474b-a617-9c787c1a8e9d">
|
33
|
+
<name>fff</name>
|
34
|
+
<link href="/ovirt-engine/api/vnicprofiles/8267104a-7597-474b-a617-9c787c1a8e9d/permissions" rel="permissions"/>
|
35
|
+
<pass_through>
|
36
|
+
<mode>disabled</mode>
|
37
|
+
</pass_through>
|
38
|
+
<port_mirroring>false</port_mirroring>
|
39
|
+
<network href="/ovirt-engine/api/networks/00000000-0000-0000-0000-000000000009" id="00000000-0000-0000-0000-000000000009"/>
|
40
|
+
<network_filter href="/ovirt-engine/api/networkfilters/b295bf02-24b8-11ea-926f-001a4a160344" id="b295bf02-24b8-11ea-926f-001a4a160344"/>
|
41
|
+
</vnic_profile>
|
42
|
+
</vnic_profiles>
|
@@ -9,7 +9,7 @@ module Fog
|
|
9
9
|
filter[:search] = create_search_by_datacenter(:search => filter[:search], :datacenter => datacenter_hash[:name])
|
10
10
|
client.system_service.storage_domains_service.list(filter).collect do |sd|
|
11
11
|
# Filter by role is not supported by the search language. The work around is to list all, then filter.
|
12
|
-
role_filter.nil? || sd.type
|
12
|
+
role_filter.nil? || Array(role_filter).include?(sd.type) ? sd : nil
|
13
13
|
end.compact
|
14
14
|
end
|
15
15
|
end
|
@@ -9,7 +9,7 @@ module Fog
|
|
9
9
|
vm_service = client.system_service.vms_service.vm_service(attrs[:id])
|
10
10
|
|
11
11
|
if attrs[:cores].present?
|
12
|
-
cpu_topology = OvirtSDK4::CpuTopology.new(:cores => attrs[:cores], :sockets =>
|
12
|
+
cpu_topology = OvirtSDK4::CpuTopology.new(:cores => attrs[:cores], :sockets => attrs[:sockets] || 1)
|
13
13
|
attrs[:cpu] = OvirtSDK4::Cpu.new(:topology => cpu_topology)
|
14
14
|
end
|
15
15
|
wrap_attribute(attrs, :cluster, OvirtSDK4::Cluster)
|
data/lib/fog/ovirt/version.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-ovirt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ori Rabin
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: fog-
|
28
|
+
name: fog-core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: fog-
|
42
|
+
name: fog-json
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,33 +53,33 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: fog-xml
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: ovirt-engine-sdk
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 4.3.1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 4.3.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -171,7 +171,6 @@ files:
|
|
171
171
|
- lib/fog/bin/ovirt.rb
|
172
172
|
- lib/fog/ovirt.rb
|
173
173
|
- lib/fog/ovirt/compute.rb
|
174
|
-
- lib/fog/ovirt/compute/v3.rb
|
175
174
|
- lib/fog/ovirt/compute/v4.rb
|
176
175
|
- lib/fog/ovirt/models/compute/affinity_group.rb
|
177
176
|
- lib/fog/ovirt/models/compute/affinity_groups.rb
|
@@ -191,69 +190,6 @@ files:
|
|
191
190
|
- lib/fog/ovirt/models/compute/templates.rb
|
192
191
|
- lib/fog/ovirt/models/compute/volume.rb
|
193
192
|
- lib/fog/ovirt/models/compute/volumes.rb
|
194
|
-
- lib/fog/ovirt/requests/compute/v3/activate_volume.rb
|
195
|
-
- lib/fog/ovirt/requests/compute/v3/add_interface.rb
|
196
|
-
- lib/fog/ovirt/requests/compute/v3/add_to_affinity_group.rb
|
197
|
-
- lib/fog/ovirt/requests/compute/v3/add_volume.rb
|
198
|
-
- lib/fog/ovirt/requests/compute/v3/attach_volume.rb
|
199
|
-
- lib/fog/ovirt/requests/compute/v3/create_affinity_group.rb
|
200
|
-
- lib/fog/ovirt/requests/compute/v3/create_vm.rb
|
201
|
-
- lib/fog/ovirt/requests/compute/v3/datacenters.rb
|
202
|
-
- lib/fog/ovirt/requests/compute/v3/deactivate_volume.rb
|
203
|
-
- lib/fog/ovirt/requests/compute/v3/destroy_affinity_group.rb
|
204
|
-
- lib/fog/ovirt/requests/compute/v3/destroy_interface.rb
|
205
|
-
- lib/fog/ovirt/requests/compute/v3/destroy_vm.rb
|
206
|
-
- lib/fog/ovirt/requests/compute/v3/destroy_volume.rb
|
207
|
-
- lib/fog/ovirt/requests/compute/v3/detach_volume.rb
|
208
|
-
- lib/fog/ovirt/requests/compute/v3/get_affinity_group.rb
|
209
|
-
- lib/fog/ovirt/requests/compute/v3/get_api_version.rb
|
210
|
-
- lib/fog/ovirt/requests/compute/v3/get_cluster.rb
|
211
|
-
- lib/fog/ovirt/requests/compute/v3/get_instance_type.rb
|
212
|
-
- lib/fog/ovirt/requests/compute/v3/get_quota.rb
|
213
|
-
- lib/fog/ovirt/requests/compute/v3/get_template.rb
|
214
|
-
- lib/fog/ovirt/requests/compute/v3/get_virtual_machine.rb
|
215
|
-
- lib/fog/ovirt/requests/compute/v3/get_volume.rb
|
216
|
-
- lib/fog/ovirt/requests/compute/v3/list_affinity_group_vms.rb
|
217
|
-
- lib/fog/ovirt/requests/compute/v3/list_affinity_groups.rb
|
218
|
-
- lib/fog/ovirt/requests/compute/v3/list_clusters.rb
|
219
|
-
- lib/fog/ovirt/requests/compute/v3/list_instance_types.rb
|
220
|
-
- lib/fog/ovirt/requests/compute/v3/list_networks.rb
|
221
|
-
- lib/fog/ovirt/requests/compute/v3/list_operating_systems.rb
|
222
|
-
- lib/fog/ovirt/requests/compute/v3/list_quotas.rb
|
223
|
-
- lib/fog/ovirt/requests/compute/v3/list_template_interfaces.rb
|
224
|
-
- lib/fog/ovirt/requests/compute/v3/list_template_volumes.rb
|
225
|
-
- lib/fog/ovirt/requests/compute/v3/list_templates.rb
|
226
|
-
- lib/fog/ovirt/requests/compute/v3/list_virtual_machines.rb
|
227
|
-
- lib/fog/ovirt/requests/compute/v3/list_vm_interfaces.rb
|
228
|
-
- lib/fog/ovirt/requests/compute/v3/list_vm_volumes.rb
|
229
|
-
- lib/fog/ovirt/requests/compute/v3/list_volumes.rb
|
230
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/affinitygroup.xml
|
231
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/affinitygroup_vms.xml
|
232
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/affinitygroups.xml
|
233
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/cluster.xml
|
234
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/clusters.xml
|
235
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/data_centers.xml
|
236
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/disks.xml
|
237
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/instance_type.xml
|
238
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/instance_types.xml
|
239
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/nics.xml
|
240
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/operating_systems.xml
|
241
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/quotas.xml
|
242
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/storage_domains.xml
|
243
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/template.xml
|
244
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/templates.xml
|
245
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/vm.xml
|
246
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/vms.xml
|
247
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/volume.xml
|
248
|
-
- lib/fog/ovirt/requests/compute/v3/mock_files/volumes.xml
|
249
|
-
- lib/fog/ovirt/requests/compute/v3/remove_from_affinity_group.rb
|
250
|
-
- lib/fog/ovirt/requests/compute/v3/storage_domains.rb
|
251
|
-
- lib/fog/ovirt/requests/compute/v3/update_interface.rb
|
252
|
-
- lib/fog/ovirt/requests/compute/v3/update_vm.rb
|
253
|
-
- lib/fog/ovirt/requests/compute/v3/update_volume.rb
|
254
|
-
- lib/fog/ovirt/requests/compute/v3/vm_action.rb
|
255
|
-
- lib/fog/ovirt/requests/compute/v3/vm_start_with_cloudinit.rb
|
256
|
-
- lib/fog/ovirt/requests/compute/v3/vm_ticket.rb
|
257
193
|
- lib/fog/ovirt/requests/compute/v4/add_interface.rb
|
258
194
|
- lib/fog/ovirt/requests/compute/v4/add_volume.rb
|
259
195
|
- lib/fog/ovirt/requests/compute/v4/create_vm.rb
|
@@ -279,6 +215,7 @@ files:
|
|
279
215
|
- lib/fog/ovirt/requests/compute/v4/list_virtual_machines.rb
|
280
216
|
- lib/fog/ovirt/requests/compute/v4/list_vm_interfaces.rb
|
281
217
|
- lib/fog/ovirt/requests/compute/v4/list_vm_volumes.rb
|
218
|
+
- lib/fog/ovirt/requests/compute/v4/list_vnic_profiles.rb
|
282
219
|
- lib/fog/ovirt/requests/compute/v4/list_volumes.rb
|
283
220
|
- lib/fog/ovirt/requests/compute/v4/mock_files/affinitygroup.xml
|
284
221
|
- lib/fog/ovirt/requests/compute/v4/mock_files/affinitygroup_vms.xml
|
@@ -299,6 +236,7 @@ files:
|
|
299
236
|
- lib/fog/ovirt/requests/compute/v4/mock_files/vm.xml
|
300
237
|
- lib/fog/ovirt/requests/compute/v4/mock_files/vms.xml
|
301
238
|
- lib/fog/ovirt/requests/compute/v4/mock_files/vnic_profile.xml
|
239
|
+
- lib/fog/ovirt/requests/compute/v4/mock_files/vnic_profiles.xml
|
302
240
|
- lib/fog/ovirt/requests/compute/v4/mock_files/volumes.xml
|
303
241
|
- lib/fog/ovirt/requests/compute/v4/storage_domains.rb
|
304
242
|
- lib/fog/ovirt/requests/compute/v4/update_interface.rb
|
@@ -326,14 +264,6 @@ files:
|
|
326
264
|
- tests/ovirt/models/compute/servers_tests.rb
|
327
265
|
- tests/ovirt/models/compute/template_tests.rb
|
328
266
|
- tests/ovirt/models/compute/templates_tests.rb
|
329
|
-
- tests/ovirt/requests/compute/v3/client_tests.rb
|
330
|
-
- tests/ovirt/requests/compute/v3/create_vm_tests.rb
|
331
|
-
- tests/ovirt/requests/compute/v3/destroy_vm_tests.rb
|
332
|
-
- tests/ovirt/requests/compute/v3/list_datacenters_tests.rb
|
333
|
-
- tests/ovirt/requests/compute/v3/list_quotas_tests.rb
|
334
|
-
- tests/ovirt/requests/compute/v3/list_storage_domains_tests.rb
|
335
|
-
- tests/ovirt/requests/compute/v3/update_vm_tests.rb
|
336
|
-
- tests/ovirt/requests/compute/v3/update_volume_tests.rb
|
337
267
|
- tests/ovirt/requests/compute/v4/client_tests.rb
|
338
268
|
- tests/ovirt/requests/compute/v4/create_vm_tests.rb
|
339
269
|
- tests/ovirt/requests/compute/v4/destroy_vm_tests.rb
|
@@ -345,7 +275,7 @@ homepage: https://github.com/fog/fog-ovirt
|
|
345
275
|
licenses:
|
346
276
|
- MIT
|
347
277
|
metadata: {}
|
348
|
-
post_install_message:
|
278
|
+
post_install_message:
|
349
279
|
rdoc_options: []
|
350
280
|
require_paths:
|
351
281
|
- lib
|
@@ -353,15 +283,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
353
283
|
requirements:
|
354
284
|
- - ">="
|
355
285
|
- !ruby/object:Gem::Version
|
356
|
-
version:
|
286
|
+
version: 2.0.0
|
357
287
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
358
288
|
requirements:
|
359
289
|
- - ">="
|
360
290
|
- !ruby/object:Gem::Version
|
361
291
|
version: '0'
|
362
292
|
requirements: []
|
363
|
-
rubygems_version: 3.
|
364
|
-
signing_key:
|
293
|
+
rubygems_version: 3.1.6
|
294
|
+
signing_key:
|
365
295
|
specification_version: 4
|
366
296
|
summary: Module for the 'fog' gem to support Ovirt.
|
367
297
|
test_files:
|
@@ -381,14 +311,6 @@ test_files:
|
|
381
311
|
- tests/ovirt/models/compute/servers_tests.rb
|
382
312
|
- tests/ovirt/models/compute/template_tests.rb
|
383
313
|
- tests/ovirt/models/compute/templates_tests.rb
|
384
|
-
- tests/ovirt/requests/compute/v3/client_tests.rb
|
385
|
-
- tests/ovirt/requests/compute/v3/create_vm_tests.rb
|
386
|
-
- tests/ovirt/requests/compute/v3/destroy_vm_tests.rb
|
387
|
-
- tests/ovirt/requests/compute/v3/list_datacenters_tests.rb
|
388
|
-
- tests/ovirt/requests/compute/v3/list_quotas_tests.rb
|
389
|
-
- tests/ovirt/requests/compute/v3/list_storage_domains_tests.rb
|
390
|
-
- tests/ovirt/requests/compute/v3/update_vm_tests.rb
|
391
|
-
- tests/ovirt/requests/compute/v3/update_volume_tests.rb
|
392
314
|
- tests/ovirt/requests/compute/v4/client_tests.rb
|
393
315
|
- tests/ovirt/requests/compute/v4/create_vm_tests.rb
|
394
316
|
- tests/ovirt/requests/compute/v4/destroy_vm_tests.rb
|