knife-xapi 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -101,7 +101,7 @@ class Chef
101
101
  ui.msg "Setting Install Repo: #{h.color(repo,:bold, :cyan)}"
102
102
  xapi.VM.set_other_config(vm_ref, { "install-repository" => repo } )
103
103
 
104
- cpus = Chef::Config[:knife][:xapi_cpus] || 2
104
+ cpus = Chef::Config[:knife][:xapi_cpus].to_s || "2"
105
105
  xapi.VM.set_VCPUs_max( vm_ref, cpus )
106
106
  xapi.VM.set_VCPUs_at_startup( vm_ref, cpus )
107
107
 
@@ -116,7 +116,7 @@ class Chef
116
116
  #
117
117
  boot_args = Chef::Config[:knife][:xapi_kernel_params] || "graphical utf8"
118
118
  # if no hostname param set hostname to given vm name
119
- boot_args << "hostname=#{server_name}" unless boot_args.match(/hostname=.+\s?/)
119
+ boot_args << " hostname=#{server_name}" unless boot_args.match(/hostname=.+\s?/)
120
120
  ui.msg "Setting Boot Args: #{h.color boot_args, :cyan}"
121
121
  xapi.VM.set_PV_args( vm_ref, boot_args )
122
122
 
@@ -164,7 +164,9 @@ class Chef
164
164
 
165
165
  rescue Exception => e
166
166
  ui.msg "#{h.color 'ERROR:'} #{h.color( e.message, :red )}"
167
- ui.msg "#{h.color( e.backtrace, :yellow)}"
167
+ # have to use join here to pass a string to highline
168
+ puts "Nested backtrace:"
169
+ ui.msg "#{h.color( e.backtrace.join("\n"), :yellow)}"
168
170
 
169
171
  cleanup(vm_ref)
170
172
  end
@@ -1,3 +1,3 @@
1
1
  module KnifeXenserver
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
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.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: