rbovirt 0.0.22 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rbovirt might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66f25b02a4d111b071e462bea72d9e77520b6dd1
4
- data.tar.gz: 54b4faa6d9047cd217cce97992b72697a6cfe542
3
+ metadata.gz: 94e63732e7ec8866ab567ac471f9f804b4722379
4
+ data.tar.gz: 08906ac25e1cf5ecb74017117f3d2fa7394e72d6
5
5
  SHA512:
6
- metadata.gz: 297ff6778ae94e0d29d8dbb42d9cc3927278ccd7c1bfdf34e5458026e58ae744ade61b49b0e21d6461635d7f28b997ef51746677cc9f958faf96aa02646b9e07
7
- data.tar.gz: 788f983b0f7d1db2baf583a2cb35f965cc4da9e482a975b39e8dbef1ba42b87ce9e7a24b78ddef25523d00a0a8b8576d68e751252318695d591f84b1e5068674
6
+ metadata.gz: f3a931b11fda68a422400d765e6b0e2ed070205223e1faa2203d9e08b6d26d27ab614b73f5d0bb61747a6ffaee4c1cf271e6f4004f5048c4b19be10836b3f1e1
7
+ data.tar.gz: 47261ec06247e853e14a8f57b79dec9deee835cb22b8eb26ee4a7d94bb464c54f56c1e758f72de803bfac49b2a655f4de326f05a598d4cf27d2385fe34e60773
data/Gemfile CHANGED
@@ -1,18 +1,3 @@
1
1
  source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
- gem "nokogiri"
6
- gem "rest-client"
7
- gem "rdoc"
8
- gem "rspec"
2
+ gemspec
9
3
 
10
- # Add dependencies to develop your gem here.
11
- # Include everything needed to run rake, tests, features, etc.
12
- group :development do
13
- gem "shoulda", ">= 0"
14
- gem "bundler", "> 1.0.0"
15
- gem "jeweler", "~> 1.6.4"
16
- gem "rcov", "<= 0.9.11"
17
- gem "rspec-rails", "~> 2.6"
18
- end
data/lib/client/vm_api.rb CHANGED
@@ -31,7 +31,7 @@ module OVIRT
31
31
  end
32
32
  end
33
33
 
34
- opts[:cluster_name] ||= clusters.first.name
34
+ opts[:cluster_name] ||= clusters.first.name unless opts[:cluster]
35
35
  OVIRT::VM::new(self, http_post("/vms",OVIRT::VM.to_xml(opts)).root)
36
36
  end
37
37
 
@@ -36,7 +36,7 @@ module OVIRT
36
36
  def parse_xml_attributes!(xml)
37
37
  @mac = (xml/'mac').first[:address] rescue nil #template interfaces doesn't have MAC address.
38
38
  @interface = (xml/'interface').first.text
39
- @network = (xml/'network').first[:id]
39
+ @network = ((xml/'network').first[:id] rescue nil)
40
40
  @vm = Link::new(@client, (xml/'vm').first[:id], (xml/'vm').first[:href]) if (xml/'vm') rescue nil
41
41
  @template = Link::new(@client, (xml/'template').first[:id], (xml/'template').first[:href]) rescue nil
42
42
  end
data/lib/ovirt/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module OVIRT
2
- VERSION = "0.0.22"
2
+ VERSION = "0.0.23"
3
3
  end
data/lib/ovirt/vm.rb CHANGED
@@ -23,7 +23,7 @@ module OVIRT
23
23
  return false unless @status =~ /down/i
24
24
  volumes.each do |volume|
25
25
  return false if volume.status =~ /locked/i
26
- end if @client.api_version?("3","1") || @client.api_version?("3","2")
26
+ end
27
27
  true
28
28
  end
29
29
 
data/lib/ovirt/volume.rb CHANGED
@@ -37,7 +37,8 @@ module OVIRT
37
37
  @interface = (xml/'interface').first.text
38
38
  @format = (xml/'format').first.text
39
39
  @sparse = (xml/'sparse').first.text
40
- @status = (xml/'status').first.text
40
+ @status = ((xml/'status').first.text rescue nil)
41
+ @status ||= ((xml/'status/state').first.text rescue nil)
41
42
  @vm = Link::new(@client, (xml/'vm').first[:id], (xml/'vm').first[:href]) rescue nil
42
43
  @quota = ((xml/'quota').first[:id] rescue nil)
43
44
  end
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,3 @@
1
- #require 'rubygems'
2
- #require 'bundler/setup'
3
-
4
1
  require 'rspec'
5
2
  require 'rspec/mocks'
6
3
  require 'rbovirt'
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.22
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amos Benari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-12 00:00:00.000000000 Z
11
+ date: 2014-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -95,7 +95,6 @@ files:
95
95
  - LICENSE.txt
96
96
  - README.rdoc
97
97
  - Rakefile
98
- - VERSION
99
98
  - lib/client/cluster_api.rb
100
99
  - lib/client/datacenter_api.rb
101
100
  - lib/client/host_api.rb
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.0.21