knife-xapi 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -212,8 +212,8 @@ class Chef
212
212
 
213
213
  # get the template vm we are going to build from
214
214
  template_ref = find_template( locate_config_value(:xapi_vm_template) )
215
-
216
- Chef::Log.debug "Cloning Guest from Template: #{h.color(template_ref, :bold, :cyan )}"
215
+
216
+ Chef::Log.debug "Cloning Guest from Template: #{h.color(template_ref, :bold, :cyan )}"
217
217
  task = xapi.Async.VM.clone(template_ref, fqdn)
218
218
  ui.msg "Waiting on Template Clone"
219
219
  vm_ref = get_task_ref(task)
@@ -226,7 +226,18 @@ class Chef
226
226
 
227
227
  # configure the install repo
228
228
  repo = locate_config_value(:install_repo)
229
- xapi.VM.set_other_config(vm_ref, { "install-repository" => repo } )
229
+
230
+ # make sure we don't clobber existing params
231
+ other_config = Hash.new
232
+ record = xapi.VM.get_record(vm_ref)
233
+ if record.has_key? "other_config"
234
+ other_config = record["other_config"]
235
+ end
236
+ other_config["install-repository"] = repo
237
+ # for some reason the deb disks template is wonkey and has weird entry here
238
+ other_config.delete_if {|k,v| k=="disks"}
239
+ Chef::Log.debug "Other_config: #{other_config.inspect}"
240
+ xapi.VM.set_other_config(vm_ref, other_config)
230
241
 
231
242
  cpus = locate_config_value( :xapi_cpus ).to_s
232
243
 
@@ -1,3 +1,3 @@
1
1
  module KnifeXenserver
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-xapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-20 00:00:00.000000000 Z
12
+ date: 2012-09-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef