ovirt 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ovirt/service.rb +25 -0
- data/lib/ovirt/template.rb +3 -1
- data/lib/ovirt/version.rb +1 -1
- 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: 86ecbac238822fd52c521e42e628381409926982
|
4
|
+
data.tar.gz: 238bfc7eb634ae34bbaf088eb1ab5893892c6621
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37b2eb863e7c92149f0aa5e26539894e6cef27ec1982b9acac6841d69ec558cf3e56daa9073db93f4e8533333f3292b13487a6b8eb275d06db2e9a51f0872bb0
|
7
|
+
data.tar.gz: 0bca2cd70d2f404c234711e07323c7dd2fde7d61de03ba9c15cd306b8efe39551973c3e17a628051e175744c9ccbb39765144c1521d031d24c2be3a4efb91d77
|
data/lib/ovirt/service.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'nokogiri'
|
2
2
|
require 'openssl'
|
3
3
|
require 'rest-client'
|
4
|
+
require 'tempfile'
|
4
5
|
require 'uri'
|
5
6
|
|
6
7
|
module Ovirt
|
@@ -41,6 +42,17 @@ module Ovirt
|
|
41
42
|
klass.create_from_xml(self, xml)
|
42
43
|
end
|
43
44
|
|
45
|
+
#
|
46
|
+
# Creates a new logical connection to the server.
|
47
|
+
#
|
48
|
+
# @param options [Hash] The options used to create the instance.
|
49
|
+
#
|
50
|
+
# @option options [String] :ca_certs A string containing the trusted CA certificates, in PEM format. Multiple
|
51
|
+
# certificates can be provided concatenating them as a single string. If this option isn't provided then
|
52
|
+
# the system wide trusted CA certificates will be used.
|
53
|
+
#
|
54
|
+
# Note that there are other options that aren't documented yet.
|
55
|
+
#
|
44
56
|
def initialize(options = {})
|
45
57
|
@options = DEFAULT_OPTIONS.merge(options)
|
46
58
|
parse_domain_name
|
@@ -48,6 +60,16 @@ module Ovirt
|
|
48
60
|
@password = @options.delete(:password)
|
49
61
|
@session_id = @options[:session_id]
|
50
62
|
@api_path = @options[:path]
|
63
|
+
@ca_certs = @options[:ca_certs]
|
64
|
+
|
65
|
+
# Create a temporary file to store the CA certificates. This file will be deleted when the 'disconnect' method
|
66
|
+
# is called, or, if that is never called, when the Ruby process finishes.
|
67
|
+
@ca_file = nil
|
68
|
+
if @ca_certs
|
69
|
+
@ca_file = Tempfile.new('ca_file')
|
70
|
+
@ca_file.write(@ca_certs)
|
71
|
+
@ca_file.close
|
72
|
+
end
|
51
73
|
end
|
52
74
|
|
53
75
|
def inspect # just like the default inspect, but WITHOUT @password
|
@@ -133,6 +155,8 @@ module Ovirt
|
|
133
155
|
end
|
134
156
|
|
135
157
|
def disconnect
|
158
|
+
# Remove the temporary file that was created to store the trusted CA certificates:
|
159
|
+
@ca_file.unlink if @ca_file
|
136
160
|
end
|
137
161
|
|
138
162
|
def get_resource_by_ems_ref(uri_suffix, element_name = nil)
|
@@ -367,6 +391,7 @@ module Ovirt
|
|
367
391
|
options[:timeout] = timeout if timeout
|
368
392
|
options[:open_timeout] = open_timeout if open_timeout
|
369
393
|
options[:verify_ssl] = verify_ssl unless verify_ssl.nil?
|
394
|
+
options[:ssl_ca_file] = @ca_file.path if @ca_file
|
370
395
|
options
|
371
396
|
end
|
372
397
|
|
data/lib/ovirt/template.rb
CHANGED
@@ -27,7 +27,9 @@ module Ovirt
|
|
27
27
|
:attribute => [:type],
|
28
28
|
:node => [:kernel, :initrd, :cmdline])
|
29
29
|
|
30
|
-
|
30
|
+
boot_order = []
|
31
|
+
hash[:os] = { :boot_order => boot_order }
|
32
|
+
|
31
33
|
# Collect boot order
|
32
34
|
node.xpath('os/boot').each do |boot|
|
33
35
|
dev = boot['dev']
|
data/lib/ovirt/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ovirt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Frey
|
@@ -25,7 +25,7 @@ authors:
|
|
25
25
|
autorequire:
|
26
26
|
bindir: bin
|
27
27
|
cert_chain: []
|
28
|
-
date:
|
28
|
+
date: 2017-02-21 00:00:00.000000000 Z
|
29
29
|
dependencies:
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: activesupport
|