rbovirt 0.0.37 → 0.0.38

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: 943fd0e4bdc22f8efc17e428cf5b9f94a0dd723c
4
- data.tar.gz: 471793391a5fd220e67653bc66b88cde3ad841da
3
+ metadata.gz: c42e5b1c5f43a076a769257cc35bbff0d1a7dc48
4
+ data.tar.gz: 068e70e837abc2f7606218df4ff6bd4d39b3c57e
5
5
  SHA512:
6
- metadata.gz: 00c0ff37805dbecba86b474b106c6b157fdb36ef25073d62b4c63d115b92c821c58d1bccc06cb91e65561b1695bfc59e5133842abc4d778e225c07b9b956129e
7
- data.tar.gz: db56ec36f83cfb6a8ff4257334a52ac551d0baa4978b5733f89529a97e211661a816c041db3bf755fc619f256c3ebcdeb448684f405e26458a28af718a662ba6
6
+ metadata.gz: 639c692ca2f804a5a16da355099d25f4c3d089ed28923132ca112d51f8bf5eb3711b27e1499843754f1995c6dffe5f820cfc94b38e16d0dee5494378d3c88051
7
+ data.tar.gz: 5634a599a70eb748f8e31a88bafb5979413ef39e51228a41d35e0814f634f9043fd15ddff999eaae7f3f6f6e0962ea0eaeee8ccf335df1a54de6372b17354dba
data/lib/ovirt/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module OVIRT
2
- VERSION = "0.0.37"
2
+ VERSION = "0.0.38"
3
3
  end
data/lib/rbovirt.rb CHANGED
@@ -142,7 +142,7 @@ module OVIRT
142
142
  def http_delete(suburl, body=nil, headers={})
143
143
  begin
144
144
  headers = body ? http_headers(headers) :
145
- {:accept => 'application/xml'}.merge(auth_header).merge(filter_header)
145
+ {:accept => 'application/xml', :version => '3'}.merge(auth_header).merge(filter_header)
146
146
  handle_success(rest_client(suburl).delete_with_payload(body, headers))
147
147
  rescue
148
148
  handle_fault $!
@@ -192,6 +192,7 @@ module OVIRT
192
192
  filter_header.merge(auth_header).merge({
193
193
  :content_type => 'application/xml',
194
194
  :accept => 'application/xml',
195
+ :version => '3',
195
196
  }).merge(headers)
196
197
  end
197
198
 
@@ -0,0 +1,26 @@
1
+ require "#{File.dirname(__FILE__)}/../spec_helper"
2
+
3
+ describe OVIRT::Volume do
4
+
5
+ xml = <<END_HEREDOC
6
+ <disk href="/api/vms/76d29095-bc27-4cd0-8178-07e942aea549/nics/12345678-1234-1234-1234-123456789012" id="12345678-1234-1234-1234-123456789012">
7
+ <name>disk1</name>
8
+ <size>53687091200</size>
9
+ <provisioned_size>53687091200</provisioned_size>
10
+ <actual_size>143360</actual_size>
11
+ <shareable>false</shareable>
12
+ <propagate_errors>false</propagate_errors>
13
+ <active>true</active>
14
+ </disk>
15
+ END_HEREDOC
16
+ vol = OVIRT::Volume::new(nil, Nokogiri::XML(xml).xpath('/').first)
17
+
18
+ it "volume's bootable should be nil, since it was not specified" do
19
+ vol.bootable.should eql(nil)
20
+ end
21
+
22
+ it "volume's interface should be nil, since it was not specified" do
23
+ vol.interface.should eql(nil)
24
+ end
25
+
26
+ end
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.0.37
4
+ version: 0.0.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amos Benari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-12 00:00:00.000000000 Z
11
+ date: 2016-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -134,6 +134,7 @@ files:
134
134
  - spec/spec_helper.rb
135
135
  - spec/unit/client_spec.rb
136
136
  - spec/unit/vm_spec.rb
137
+ - spec/unit/volume_spec.rb
137
138
  homepage: http://github.com/abenari/rbovirt
138
139
  licenses:
139
140
  - MIT
@@ -160,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
161
  version: '0'
161
162
  requirements: []
162
163
  rubyforge_project:
163
- rubygems_version: 2.0.14
164
+ rubygems_version: 2.5.1
164
165
  signing_key:
165
166
  specification_version: 4
166
167
  summary: A Ruby client for oVirt REST API
@@ -172,4 +173,4 @@ test_files:
172
173
  - spec/spec_helper.rb
173
174
  - spec/unit/client_spec.rb
174
175
  - spec/unit/vm_spec.rb
175
- has_rdoc:
176
+ - spec/unit/volume_spec.rb