foreman_xen 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/foreman_xen/xenserver.rb +9 -10
- data/lib/foreman_xen/engine.rb +1 -1
- data/lib/foreman_xen/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8538e8389348354506cb45bc49e560cd902642017bbd42a181612ba3296fe0ca
|
4
|
+
data.tar.gz: a1eddbd74c4d0c5b70bbcb04efe1a5fefd68555b4229934b6a4169e86b08eda0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a435f72d1db68dd8550a3dfa67a82f230cfdaccb71e36fa6821fa57b5f3f2d36037f4ba5dc9d42cf7a3e453eb0a94227980c792522cca2a5704e70d8e9fc6ffe
|
7
|
+
data.tar.gz: c70951ebf49095228ee22742da35f14ae4dd68d8a47e908dce45d9b790de99617320d1a3abb66f214215580ded2e6daaeba5d1342a459d755479a4ea8dbe8244
|
@@ -133,7 +133,7 @@ module ForemanXen
|
|
133
133
|
|
134
134
|
def templates!
|
135
135
|
store_in_cache('templates') do
|
136
|
-
client.
|
136
|
+
client.templates.sort_by(&:name)
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
@@ -143,7 +143,7 @@ module ForemanXen
|
|
143
143
|
|
144
144
|
def custom_templates!
|
145
145
|
store_in_cache('custom_templates') do
|
146
|
-
get_templates(client.
|
146
|
+
get_templates(client.custom_templates)
|
147
147
|
end
|
148
148
|
end
|
149
149
|
|
@@ -153,7 +153,7 @@ module ForemanXen
|
|
153
153
|
|
154
154
|
def builtin_templates!
|
155
155
|
store_in_cache('builtin_templates') do
|
156
|
-
get_templates(client.
|
156
|
+
get_templates(client.builtin_templates)
|
157
157
|
end
|
158
158
|
end
|
159
159
|
|
@@ -165,7 +165,7 @@ module ForemanXen
|
|
165
165
|
return [] if vm.snapshots.empty?
|
166
166
|
|
167
167
|
tmps = begin
|
168
|
-
client.
|
168
|
+
client.templates.select(&:is_a_snapshot)
|
169
169
|
rescue
|
170
170
|
[]
|
171
171
|
end
|
@@ -178,7 +178,7 @@ module ForemanXen
|
|
178
178
|
|
179
179
|
def find_snapshots
|
180
180
|
tmps = begin
|
181
|
-
client.
|
181
|
+
client.templates.select(&:is_a_snapshot)
|
182
182
|
rescue
|
183
183
|
[]
|
184
184
|
end
|
@@ -296,7 +296,7 @@ module ForemanXen
|
|
296
296
|
|
297
297
|
other_config = {}
|
298
298
|
if builtin_template_name != ''
|
299
|
-
template = client.
|
299
|
+
template = client.builtin_templates.find { |tmp| tmp.name == args[:builtin_template_name] }
|
300
300
|
other_config = template.other_config
|
301
301
|
other_config.delete 'disks'
|
302
302
|
other_config.delete 'default_template'
|
@@ -373,10 +373,9 @@ module ForemanXen
|
|
373
373
|
|
374
374
|
def client
|
375
375
|
@client ||= Fog::XenServer::Compute.new(
|
376
|
-
:xenserver_url
|
377
|
-
:xenserver_username
|
378
|
-
:xenserver_password
|
379
|
-
:xenserver_redirect_to_master => true
|
376
|
+
:xenserver_url => url,
|
377
|
+
:xenserver_username => user,
|
378
|
+
:xenserver_password => password
|
380
379
|
)
|
381
380
|
end
|
382
381
|
|
data/lib/foreman_xen/engine.rb
CHANGED
@@ -17,7 +17,7 @@ module ForemanXen
|
|
17
17
|
|
18
18
|
initializer 'foreman_xen.register_plugin', :before => :finisher_hook do |app|
|
19
19
|
Foreman::Plugin.register :foreman_xen do
|
20
|
-
requires_foreman '>= 1.
|
20
|
+
requires_foreman '>= 1.18'
|
21
21
|
# Register xen compute resource in foreman
|
22
22
|
compute_resource ForemanXen::Xenserver
|
23
23
|
parameter_filter(ComputeResource, :uuid)
|
data/lib/foreman_xen/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_xen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Nemirovsky
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2019-01-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: fog-xenserver
|