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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32d9cc1038f81624682aadbb1a8c9a1bffa88c04
4
- data.tar.gz: 686ae91430873a0e9a77c46869380822f68e76af
3
+ metadata.gz: 720f999f694e658931135b7ef0884b605cb2f0f8
4
+ data.tar.gz: ae779e3a1b349180f8d1ba4ca7ad0e568fa1851e
5
5
  SHA512:
6
- metadata.gz: e16fcb73f36c84ff3e68064bda89b94e61ec178ba57a24860b520d48c177b6f565df1eaa9a006f5a5255f919d9d8b097ceb1d8bc440850d6e7fa9ce813a55485
7
- data.tar.gz: ae03431c8a359f3ca813fabc1e723c407e1570855aed741c7f26196e3454a300d11acaae9d4c55a27b7262f6f0da3625d7789f74df7c09628b2526a4c30abaf9
6
+ metadata.gz: f5951efe8033905942350e28cf650727926f725f39c456bc63a669747aec300f5df6bb509251baa807ca2b9cd4fe2a665deb9d76f6fae4ddacbc838d1245253e
7
+ data.tar.gz: 32074bb91af5c69ff22c0e93922fc65d631ee434034429ce4ad86ac19172972ae8ef8f902044b6640c7ffe67b42d8aec4c83d93499ac999efdfd18b5c33d8853
@@ -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=False, opts={})
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
  )
@@ -1,3 +1,3 @@
1
1
  module OVIRT
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -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 = ((xml/'cpu/topology').first[:cores].to_i * (xml/'cpu/topology').first[:sockets].to_i rescue nil)
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.5
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-01-02 00:00:00.000000000 Z
11
+ date: 2018-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri