Class: Tenderloin::OVFTool
- Inherits:
-
Object
- Object
- Tenderloin::OVFTool
- Defined in:
- lib/tenderloin/ovftool.rb
Constant Summary collapse
- TOOL =
"/Applications/VMware\\ Fusion.app//Contents/Library/VMware\\ OVF\\ Tool/ovftool"
Class Method Summary collapse
Class Method Details
.ovf2vmx(ovf, vmx, opts = {}) ⇒ Object
14 15 16 17 18 |
# File 'lib/tenderloin/ovftool.rb', line 14 def self.ovf2vmx(ovf, vmx, opts = {}) cmd_opts = [] cmd_opts << '--lax' if opts[:lax] run("#{cmd_opts.join(' ')} #{ovf} #{vmx}") end |
.run(cmd, opts = '') ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/tenderloin/ovftool.rb', line 5 def self.run(cmd, opts = '') res = `#{TOOL} #{opts} #{cmd}` if $? == 0 return res else raise "Error running ovftool command #{cmd}: " + res end end |