rbovirt 0.0.5 → 0.0.6
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.
- data/lib/ovirt/vm.rb +3 -3
- data/rbovirt.gemspec +1 -1
- data/spec/unit/vm_spec.rb +2 -2
- metadata +67 -112
data/lib/ovirt/vm.rb
CHANGED
@@ -5,7 +5,7 @@ module OVIRT
|
|
5
5
|
|
6
6
|
class VM < BaseObject
|
7
7
|
attr_reader :description, :status, :memory, :profile, :display, :host, :cluster, :template
|
8
|
-
attr_reader :storage, :cores, :creation_time, :os, :
|
8
|
+
attr_reader :storage, :cores, :creation_time, :os, :ips, :vnc
|
9
9
|
attr_accessor :interfaces, :volumes
|
10
10
|
|
11
11
|
def initialize(client, xml)
|
@@ -85,7 +85,7 @@ module OVIRT
|
|
85
85
|
@cores = ((xml/'cpu/topology').first[:cores].to_i * (xml/'cpu/topology').first[:sockets].to_i rescue nil)
|
86
86
|
@storage = ((xml/'disks/disk/size').first.text rescue nil)
|
87
87
|
@creation_time = (xml/'creation_time').text
|
88
|
-
@
|
88
|
+
@ips = (xml/'guest_info/ips/ip').map { |ip| ip[:address] }
|
89
89
|
@vnc = {
|
90
90
|
:address => ((xml/'display/address').first.text rescue "127.0.0.1"),
|
91
91
|
:port => ((xml/'display/port').first.text rescue "5890")
|
@@ -97,4 +97,4 @@ module OVIRT
|
|
97
97
|
end
|
98
98
|
|
99
99
|
end
|
100
|
-
end
|
100
|
+
end
|
data/rbovirt.gemspec
CHANGED
data/spec/unit/vm_spec.rb
CHANGED
@@ -67,7 +67,7 @@ END_HEREDOC
|
|
67
67
|
end
|
68
68
|
|
69
69
|
it "should parse VM xml" do
|
70
|
-
vm = OVIRT::VM.new(nil, Nokogiri::XML(@xml).xpath('/'))
|
70
|
+
vm = OVIRT::VM.new(nil, Nokogiri::XML(@xml).xpath('/').first)
|
71
71
|
vm.class.should eql(OVIRT::VM)
|
72
72
|
end
|
73
73
|
|
@@ -78,7 +78,7 @@ END_HEREDOC
|
|
78
78
|
end
|
79
79
|
|
80
80
|
it "should be running" do
|
81
|
-
vm = OVIRT::VM.new(nil, Nokogiri::XML(@xml).xpath('/'))
|
81
|
+
vm = OVIRT::VM.new(nil, Nokogiri::XML(@xml).xpath('/').first)
|
82
82
|
vm.running?.should eql(true)
|
83
83
|
end
|
84
84
|
|
metadata
CHANGED
@@ -1,136 +1,101 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbovirt
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 5
|
10
|
-
version: 0.0.5
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.6
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Amos Benari
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
22
|
-
prerelease: false
|
12
|
+
date: 2012-02-01 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
23
15
|
name: nokogiri
|
24
|
-
|
16
|
+
requirement: &70167913971680 !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
33
|
-
requirement: *id001
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
34
22
|
type: :runtime
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
23
|
prerelease: false
|
24
|
+
version_requirements: *70167913971680
|
25
|
+
- !ruby/object:Gem::Dependency
|
37
26
|
name: rest-client
|
38
|
-
|
27
|
+
requirement: &70167913971000 !ruby/object:Gem::Requirement
|
39
28
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
segments:
|
45
|
-
- 0
|
46
|
-
version: "0"
|
47
|
-
requirement: *id002
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
48
33
|
type: :runtime
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
34
|
prerelease: false
|
35
|
+
version_requirements: *70167913971000
|
36
|
+
- !ruby/object:Gem::Dependency
|
51
37
|
name: shoulda
|
52
|
-
|
38
|
+
requirement: &70167913969940 !ruby/object:Gem::Requirement
|
53
39
|
none: false
|
54
|
-
requirements:
|
55
|
-
- -
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
|
58
|
-
segments:
|
59
|
-
- 0
|
60
|
-
version: "0"
|
61
|
-
requirement: *id003
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
62
44
|
type: :development
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
45
|
prerelease: false
|
46
|
+
version_requirements: *70167913969940
|
47
|
+
- !ruby/object:Gem::Dependency
|
65
48
|
name: bundler
|
66
|
-
|
49
|
+
requirement: &70167913969440 !ruby/object:Gem::Requirement
|
67
50
|
none: false
|
68
|
-
requirements:
|
51
|
+
requirements:
|
69
52
|
- - ~>
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
hash: 23
|
72
|
-
segments:
|
73
|
-
- 1
|
74
|
-
- 0
|
75
|
-
- 0
|
53
|
+
- !ruby/object:Gem::Version
|
76
54
|
version: 1.0.0
|
77
|
-
requirement: *id004
|
78
55
|
type: :development
|
79
|
-
- !ruby/object:Gem::Dependency
|
80
56
|
prerelease: false
|
57
|
+
version_requirements: *70167913969440
|
58
|
+
- !ruby/object:Gem::Dependency
|
81
59
|
name: jeweler
|
82
|
-
|
60
|
+
requirement: &70167913993860 !ruby/object:Gem::Requirement
|
83
61
|
none: false
|
84
|
-
requirements:
|
62
|
+
requirements:
|
85
63
|
- - ~>
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
hash: 7
|
88
|
-
segments:
|
89
|
-
- 1
|
90
|
-
- 6
|
91
|
-
- 4
|
64
|
+
- !ruby/object:Gem::Version
|
92
65
|
version: 1.6.4
|
93
|
-
requirement: *id005
|
94
66
|
type: :development
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
67
|
prerelease: false
|
68
|
+
version_requirements: *70167913993860
|
69
|
+
- !ruby/object:Gem::Dependency
|
97
70
|
name: rcov
|
98
|
-
|
71
|
+
requirement: &70167913991540 !ruby/object:Gem::Requirement
|
99
72
|
none: false
|
100
|
-
requirements:
|
101
|
-
- -
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
|
104
|
-
segments:
|
105
|
-
- 0
|
106
|
-
version: "0"
|
107
|
-
requirement: *id006
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
108
77
|
type: :development
|
109
|
-
- !ruby/object:Gem::Dependency
|
110
78
|
prerelease: false
|
79
|
+
version_requirements: *70167913991540
|
80
|
+
- !ruby/object:Gem::Dependency
|
111
81
|
name: rspec-rails
|
112
|
-
|
82
|
+
requirement: &70167913989260 !ruby/object:Gem::Requirement
|
113
83
|
none: false
|
114
|
-
requirements:
|
84
|
+
requirements:
|
115
85
|
- - ~>
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
|
118
|
-
segments:
|
119
|
-
- 2
|
120
|
-
- 6
|
121
|
-
version: "2.6"
|
122
|
-
requirement: *id007
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '2.6'
|
123
88
|
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *70167913989260
|
124
91
|
description: A Ruby client for oVirt REST API
|
125
92
|
email: abenari@redhat.com
|
126
93
|
executables: []
|
127
|
-
|
128
94
|
extensions: []
|
129
|
-
|
130
|
-
extra_rdoc_files:
|
95
|
+
extra_rdoc_files:
|
131
96
|
- LICENSE.txt
|
132
97
|
- README.rdoc
|
133
|
-
files:
|
98
|
+
files:
|
134
99
|
- .document
|
135
100
|
- Gemfile
|
136
101
|
- LICENSE.txt
|
@@ -153,39 +118,29 @@ files:
|
|
153
118
|
- spec/integration/vm_crud_spec.rb
|
154
119
|
- spec/spec_helper.rb
|
155
120
|
- spec/unit/vm_spec.rb
|
156
|
-
has_rdoc: true
|
157
121
|
homepage: http://github.com/abenari/rbovirt
|
158
|
-
licenses:
|
122
|
+
licenses:
|
159
123
|
- MIT
|
160
124
|
post_install_message:
|
161
125
|
rdoc_options: []
|
162
|
-
|
163
|
-
require_paths:
|
126
|
+
require_paths:
|
164
127
|
- lib
|
165
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
128
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
166
129
|
none: false
|
167
|
-
requirements:
|
168
|
-
- -
|
169
|
-
- !ruby/object:Gem::Version
|
170
|
-
|
171
|
-
|
172
|
-
- 0
|
173
|
-
version: "0"
|
174
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
135
|
none: false
|
176
|
-
requirements:
|
177
|
-
- -
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
|
180
|
-
segments:
|
181
|
-
- 0
|
182
|
-
version: "0"
|
136
|
+
requirements:
|
137
|
+
- - ! '>='
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
183
140
|
requirements: []
|
184
|
-
|
185
141
|
rubyforge_project:
|
186
|
-
rubygems_version: 1.
|
142
|
+
rubygems_version: 1.8.10
|
187
143
|
signing_key:
|
188
144
|
specification_version: 3
|
189
145
|
summary: A Ruby client for oVirt REST API
|
190
146
|
test_files: []
|
191
|
-
|