ovirt 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ovirt/base.rb +1 -1
- data/lib/ovirt/service.rb +1 -1
- data/lib/ovirt/version.rb +1 -1
- data/spec/base_spec.rb +8 -0
- data/spec/service_spec.rb +5 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 592fb6a64d52fa897faad834c4c5874bea89ac63
|
4
|
+
data.tar.gz: 3b38a6108e3fa79e073929bc461fab31961c0c4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfa70c2fffa484403532a59f74184727bd65ca46e0976034f049383ca16d59f59403adaebe7a03a544e4d55b0dee5012876d8deb9014f7433e55f64a43a3e5de
|
7
|
+
data.tar.gz: ea20ead44f3d4cf96bbc3b667d5d257a31745b32b6651e51377818e98fa3a67ffe56f347f99c0c4ffe41d485ffe1ce7a1e9fdfe169b00eb7149fd08e3acb51cf
|
data/lib/ovirt/base.rb
CHANGED
@@ -319,7 +319,7 @@ module Ovirt
|
|
319
319
|
|
320
320
|
def update
|
321
321
|
builder = Nokogiri::XML::Builder.new do |xml|
|
322
|
-
xml.send(namespace.last.downcase) { yield xml if block_given? }
|
322
|
+
xml.send(self.class.namespace.last.downcase) { yield xml if block_given? }
|
323
323
|
end
|
324
324
|
data = builder.doc.root.to_xml
|
325
325
|
|
data/lib/ovirt/service.rb
CHANGED
@@ -140,7 +140,7 @@ module Ovirt
|
|
140
140
|
def self.ovirt?(options)
|
141
141
|
options[:username] = options[:password] = "_unused"
|
142
142
|
!new(options).engine_ssh_public_key.to_s.blank?
|
143
|
-
rescue RestClient::ResourceNotFound
|
143
|
+
rescue RestClient::ResourceNotFound, NoMethodError
|
144
144
|
false
|
145
145
|
end
|
146
146
|
|
data/lib/ovirt/version.rb
CHANGED
data/spec/base_spec.rb
CHANGED
@@ -14,4 +14,12 @@ describe Ovirt::Base do
|
|
14
14
|
expect(Ovirt::Base.send(:href_to_guid, guid)).to eq(guid)
|
15
15
|
expect { Ovirt::Base.send(:href_to_guid, 12_345) }.to raise_error(ArgumentError)
|
16
16
|
end
|
17
|
+
|
18
|
+
it "#update" do
|
19
|
+
vm = build(:vm)
|
20
|
+
|
21
|
+
expect(vm.service).to receive(:resource_put).with("vms/", "<vm>\n <description>test description</description>\n</vm>")
|
22
|
+
|
23
|
+
vm.update { |x| x.description("test description") }
|
24
|
+
end
|
17
25
|
end
|
data/spec/service_spec.rb
CHANGED
@@ -54,6 +54,11 @@ EOX
|
|
54
54
|
expect(described_class.ovirt?(:server => "127.0.0.1")).to be false
|
55
55
|
end
|
56
56
|
|
57
|
+
it "false when invalid content encoding returned" do
|
58
|
+
expect_any_instance_of(described_class).to receive(:engine_ssh_public_key).and_raise(NoMethodError)
|
59
|
+
expect(described_class.ovirt?(:server => "127.0.0.1")).to be false
|
60
|
+
end
|
61
|
+
|
57
62
|
it "true when key non-empty" do
|
58
63
|
fake_key = "ssh-rsa " + ("A" * 372) + " ovirt-engine\n"
|
59
64
|
expect_any_instance_of(described_class).to receive(:engine_ssh_public_key).and_return(fake_key)
|
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.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Frey
|
@@ -13,10 +13,11 @@ authors:
|
|
13
13
|
- Matthew Draper
|
14
14
|
- Richard Oliveri
|
15
15
|
- Chris Portman
|
16
|
+
- Adam Grare
|
16
17
|
autorequire:
|
17
18
|
bindir: bin
|
18
19
|
cert_chain: []
|
19
|
-
date:
|
20
|
+
date: 2016-02-23 00:00:00.000000000 Z
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
22
23
|
name: bundler
|
@@ -170,6 +171,7 @@ email:
|
|
170
171
|
- matthew@trebex.net
|
171
172
|
- roliveri@redhat.com
|
172
173
|
- chris.portman@optusnet.com.au
|
174
|
+
- agrare@redhat.com
|
173
175
|
executables: []
|
174
176
|
extensions: []
|
175
177
|
extra_rdoc_files: []
|
@@ -241,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
243
|
version: '0'
|
242
244
|
requirements: []
|
243
245
|
rubyforge_project:
|
244
|
-
rubygems_version: 2.4.5
|
246
|
+
rubygems_version: 2.4.5.1
|
245
247
|
signing_key:
|
246
248
|
specification_version: 4
|
247
249
|
summary: Ovirt provides a simple Object Oriented interface to the REST API of oVirt
|