Bug 989908

Summary: oo-admin-usage reports "end time cannot be greater than the start time"" while start time is later than end time
Product: OpenShift Online Reporter: Liang Xia <lxia>
Component: PodAssignee: Abhishek Gupta <abhgupta>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.x   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-29 12:48:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Liang Xia 2013-07-30 07:11:14 UTC
Description of problem:
Try to show usage info via oo-admin-usage, with option --start and --end while start time greater than end time.
"The end time cannot be greater than the start time" will show. Actually, this should be "The start time cannot be greater than the end time"

Version-Release number of selected component (if applicable):
devenv_3580 

How reproducible:
always

Steps to Reproduce:
1.oo-admin-usage -l user --start 2013-07-30 --end 2013-07-18
2.
3.

Actual results:
"The end time cannot be greater than the start time"

Expected results:
"The start time cannot be greater than the end time"

Additional info:

Comment 1 Abhishek Gupta 2013-08-13 20:29:55 UTC
Fixed with --> https://github.com/openshift/origin-server/pull/3345

Comment 3 Liang Xia 2013-08-14 02:51:52 UTC
Verified on devenv_3646, it has been fixed.

# oo-admin-usage -l lxia -s 2013-09-01 -e 2013-08-01
The start time cannot be greater than the end time
== Synopsis

oo-admin-usage: List the usage data for a user. 
Note: The usage cost displayed is based on the usage duration and the usage rate. 
It does not take into account any unbilled usage by the billing provider.

== Usage

oo-admin-usage OPTIONS

Options:
-l|--login
    The user login whose usage data is to be displayed (required)
-a|--app
    The application name to filter the usage data 
-g|--gear
    The gear id to filter the usage data 
-s|--start
    The start date (yyyy-mm-dd) to filter the usage data (defaults to start of current month in UTC)
-e|--end
    The end date (yyyy-mm-dd) to filter the usage data (defaults to the current time in UTC)
-h|--help
    Show Usage info