rbovirt 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/client/host_api.rb +2 -2
- data/lib/ovirt/version.rb +1 -1
- data/lib/ovirt/vm.rb +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 720f999f694e658931135b7ef0884b605cb2f0f8
|
4
|
+
data.tar.gz: ae779e3a1b349180f8d1ba4ca7ad0e568fa1851e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5951efe8033905942350e28cf650727926f725f39c456bc63a669747aec300f5df6bb509251baa807ca2b9cd4fe2a665deb9d76f6fae4ddacbc838d1245253e
|
7
|
+
data.tar.gz: 32074bb91af5c69ff22c0e93922fc65d631ee434034429ce4ad86ac19172972ae8ef8f902044b6640c7ffe67b42d8aec4c83d93499ac999efdfd18b5c33d8853
|
data/lib/client/host_api.rb
CHANGED
@@ -17,14 +17,14 @@ module OVIRT
|
|
17
17
|
http_post("/hosts/%s/approve" % host_id, "<action></action>")
|
18
18
|
end
|
19
19
|
|
20
|
-
def reinstall_host(host_id, override_iptables=
|
20
|
+
def reinstall_host(host_id, override_iptables=false, opts={})
|
21
21
|
http_post("/hosts/%s/install" % host_id,
|
22
22
|
"<action>
|
23
23
|
<ssh>
|
24
24
|
<authentication_method>PublicKey</authentication_method>
|
25
25
|
</ssh>
|
26
26
|
<host>
|
27
|
-
<override_iptables>" + override_iptables + "</override_iptables>
|
27
|
+
<override_iptables>" + override_iptables.to_s + "</override_iptables>
|
28
28
|
</host>
|
29
29
|
</action>"
|
30
30
|
)
|
data/lib/ovirt/version.rb
CHANGED
data/lib/ovirt/vm.rb
CHANGED
@@ -76,9 +76,9 @@ module OVIRT
|
|
76
76
|
if opts[:memory]
|
77
77
|
memory opts[:memory]
|
78
78
|
end
|
79
|
-
if opts[:cores]
|
79
|
+
if opts[:cores] || opts[:sockets]
|
80
80
|
cpu {
|
81
|
-
topology( :cores => (opts[:cores] || '1'), :sockets => '1' )
|
81
|
+
topology( :cores => (opts[:cores] || '1'), :sockets => (opts[:sockets] || '1') )
|
82
82
|
}
|
83
83
|
end
|
84
84
|
# os element must not be sent when template is present (RHBZ 1104235)
|
@@ -316,7 +316,8 @@ module OVIRT
|
|
316
316
|
:subject => ((xml/'display/certificate/subject').first.text rescue nil),
|
317
317
|
:monitors => ((xml/'display/monitors').first.text rescue 0)
|
318
318
|
}
|
319
|
-
@cores = (
|
319
|
+
@cores = (xml/'cpu/topology').first[:cores].to_i
|
320
|
+
@sockets = (xml/'cpu/topology').first[:sockets].to_i rescue nil
|
320
321
|
@storage = ((xml/'disks/disk/size').first.text rescue nil)
|
321
322
|
@creation_time = (xml/'creation_time').text
|
322
323
|
@ips = (xml/'guest_info/ips/ip').map { |ip| ip[:address] }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbovirt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amos Benari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|