def snapshots
unless @vm.exists?
return Response.new :code => 1, :message => 'VM does not exist'
end
conf_file_response = @vm.conf_file
return conf_file_response unless conf_file_response.successful?
command = "#{vmrun_cmd} listSnapshots "
command << "'#{conf_file_response.data}' 2>&1"
command_exec = Fission::Action::ShellExecutor.new command
result = command_exec.execute
response = Response.new :code => result['process_status'].exitstatus
if response.successful?
response.data = parse_snapshot_names_from_output result['output']
else
response.message = result['output']
end
response
end