diff --git a/src/mad/ruby/vmwarelib.rb b/src/mad/ruby/vmwarelib.rb index d2b58e25c7..5a8b646c35 100644 --- a/src/mad/ruby/vmwarelib.rb +++ b/src/mad/ruby/vmwarelib.rb @@ -15,6 +15,7 @@ # ---------------------------------------------------------------------------- # require "scripts_common" +require 'yaml' require "CommandManager" class VmWareDriver @@ -27,10 +28,12 @@ class VmWareDriver BIN_LOCATION = "/usr/bin" LIB_LOCATION = "/usr/lib/one" ETC_LOCATION = "/etc/one/" + VAR_LOCATION = "/var/lib/one" else LIB_LOCATION = ONE_LOCATION + "/lib" BIN_LOCATION = ONE_LOCATION + "/bin" ETC_LOCATION = ONE_LOCATION + "/etc/" + VAR_LOCATION = ONE_LOCATION + "/var/" end CONF_FILE = ETC_LOCATION + "/vmwarerc" @@ -228,9 +231,9 @@ class VmWareDriver #Performs a action usgin libvirt def do_action(cmd) - rc = LocalCommand.run(esx_cmd(command)) + rc = LocalCommand.run(esx_cmd(cmd)) - if rc.code = 0 + if rc.code == 0 return [true, rc.stdout] else err = "Error executing: #{cmd} err: #{rc.stderr} out: #{rc.stdout}" @@ -270,4 +273,4 @@ class VmWareDriver return deploy_id end -end \ No newline at end of file +end diff --git a/src/vmm_mad/remotes/vmware/deploy b/src/vmm_mad/remotes/vmware/deploy index aae48e318c..8192ce7127 100755 --- a/src/vmm_mad/remotes/vmware/deploy +++ b/src/vmm_mad/remotes/vmware/deploy @@ -32,7 +32,7 @@ require 'vmwarelib' dfile = ARGV[0] host = ARGV[1] -vmware_drv = VMWareDriver.new(host) +vmware_drv = VmWareDriver.new(host) puts vmware_drv.deploy(dfile)