Revision effd1ea5 src/onedb/onedb

View differences:

src/onedb/onedb
48 48
require 'cli/command_parser'
49 49
require 'onedb'
50 50
require 'opennebula'
51
require 'actions/purge_history'
51 52

  
52 53
FORCE={
53 54
    :name => "force",
......
414 415
            [-1, e.message]
415 416
        end
416 417
    end
418

  
419
    ###########################################################################
420
    # Purge history
421
    ###########################################################################
422
    purge_history_desc = <<-EOT.unindent
423
        Deletes all but the last history records from non DONE VMs
424
    EOT
425

  
426
    command :'purge-history' , purge_history_desc, :options=>[BACKUP] do
427
        begin
428
            action = OneDBAction::PurgeHistory.new
429
            action.run
430
        rescue Exception => e
431
            pp e.backtrace
432
            [-1, e.message]
433
        end
434
    end
435

  
417 436
end

Also available in: Unified diff