Bug 709395

Summary: consumer history with start/end date fails with Attribute error.
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: z_otherAssignee: James Slagle <jslagle>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: jconnor, jslagle
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 25   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 12:08:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 647488    

Description Preethi Thomas 2011-05-31 15:32:15 UTC
Description of problem:


Version-Release number of selected component (if applicable):
[root@preethi ~]# rpm -q pulp
pulp-0.0.181-1.fc14.noarch

[root@preethi ~]# pulp-admin consumer history --id=preethi --start_date=2011-05-26
error: operation failed: AttributeError: 'str' object has no attribute 'tzinfo'

[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# pulp-admin consumer history --id=preethi --end_date=2011-05-27
error: operation failed: AttributeError: 'NoneType' object has no attribute 'tzinfo'

Comment 1 James Slagle 2011-06-13 20:04:43 UTC
There were 2 issues at play here.  Looks like there was a copy/paste issue when converting the end_date before making the query for history.  Second, there was a change to make the timestamps in the db to be in iso8601 date format, however the queries in the consumer_history api were still using epoch.  I fixed those issues and the tests.

There were a couple of commits, however the latest one is:
d963c42bc20ca4b434535d7ada773dc0f07a4597

Comment 2 Jeff Ortel 2011-06-17 21:10:12 UTC
build: 0.192

Comment 3 Preethi Thomas 2011-08-09 18:36:56 UTC
[root@preethi ~]# rpm -q pulp
pulp-0.0.223-1.fc14.noarch


[root@preethi ~]# pulp-admin consumer history --id=preethi --start_date=2011-08-08
+------------------------------------------+
              Consumer History
+------------------------------------------+

Event Type            	Repo Unbound             
Timestamp             	2011-08-09 11:15:35-04:00
Originator            	admin                    
Repo ID               	f14-updates              

Event Type            	Repo Bound               
Timestamp             	2011-08-09 09:20:14-04:00
Originator            	admin                    
Repo ID               	f14-updates              

Event Type            	Consumer Created         
Timestamp             	2011-08-08 16:18:44-04:00
Originator            	admin                    

[root@preethi ~]# pulp-admin consumer history --id=preethi --end_date=2011-08-09 
+------------------------------------------+
              Consumer History
+------------------------------------------+

Event Type            	Repo Unbound             
Timestamp             	2011-08-09 11:15:35-04:00
Originator            	admin                    
Repo ID               	f14-updates              

Event Type            	Repo Bound               
Timestamp             	2011-08-09 09:20:14-04:00
Originator            	admin                    
Repo ID               	f14-updates              

Event Type            	Consumer Created         
Timestamp             	2011-08-08 16:18:44-04:00
Originator            	admin

Comment 4 Preethi Thomas 2011-08-16 12:08:24 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 5 Preethi Thomas 2011-08-16 12:21:27 UTC
Closing with Community Release 15

pulp-0.0.223-4.