Bug #1732: Fix -s & -e options for oneacct

This commit is contained in:
Carlos Martín committed 2013-01-17 17:37:02 +01:00
1 parent c3bbc983ca
commit 3d3cc4fa9f
2 files changed
+6 -5

No files matched your search

+4 -3
View File
@@ -15,6 +15,7 @@
#--------------------------------------------------------------------------- #
require 'one_helper'
require 'optparse/time'
class AcctHelper < OpenNebulaHelper::OneHelper
START_TIME = {
@@ -22,7 +23,7 @@ class AcctHelper < OpenNebulaHelper::OneHelper
:short => "-s TIME",
:large => "--start TIME" ,
:description => "Start date and time to take into account",
:format => String # TODO Time
:format => Time
}
END_TIME = {
@@ -30,7 +31,7 @@ class AcctHelper < OpenNebulaHelper::OneHelper
:short => "-e TIME",
:large => "--end TIME" ,
:description => "End date and time",
:format => String # TODO Time
:format => Time
}
USERFILTER = {
@@ -144,7 +145,7 @@ class AcctHelper < OpenNebulaHelper::OneHelper
default :VID, :HOSTNAME, :REASON, :START_TIME, :END_TIME, :MEMORY, :CPU, :NET_RX, :NET_TX
end
def self.print_start_enc_time_header(start_time, end_time)
def self.print_start_end_time_header(start_time, end_time)
print "Showing active history records from "
CLIHelper.scr_bold
+2 -2
View File
@@ -48,8 +48,8 @@ cmd = CommandParser::CmdParser.new(ARGV) do
main do
filter_flag = (options[:userfilter] || VirtualMachinePool::INFO_ALL)
start_time = options[:start] ? options[:start].to_i : -1
end_time = options[:end] ? options[:end].to_i : -1
start_time = options[:start_time] ? options[:start_time].to_i : -1
end_time = options[:end_time] ? options[:end_time].to_i : -1
common_opts = {
:start_time => start_time,