1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00

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

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

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

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,