Standardize BaseImageServices handling of timestamps

Bug #735636 reported by Rick Harris
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Mark Washenberger

Bug Description

We need to standardize/document how the ImageService abstraction handles timestamps. I propose we expose datetime objects that we can then strftime on in the API to adhere to whatever each api-spec requires.

This bug arose out of the related-images mergeprop, specifically:

> 530 + # FIXME(sirp): The ImageService and API use two different formats for
> 531 + # timestamps. Ultimately, the ImageService should probably use datetime
> 532 + # objects
> 533 + NOW_SERVICE_STR = "2010-10-11T10:30:22"
> 534 + NOW_API_STR = "2010-10-11T10:30:22Z"
>
> This is a very good point. Would you mind logging a bug to ensure the BaseImageService API docstrings indicate the format of timestamps and that all image services' timestamp fields conform to that interfacem, please? Thanks!

Related branches

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Mark Washenberger (markwash) wrote :

I can work on this one.

My plan:

* Update base image service documentation interface
* Add create / update time support to local image service, make it return datetime objects
* deserialize iso8601 date format in glance client to datetime objects
* find and fix references to the date elsewhere in nova code, presumably the ec2 and os apis
* fix the date format for what is returned by ec2/os apis

Anybody already working on this and want me to leave off?

Do I need to do anything to lp:glance?

Revision history for this message
Rick Harris (rconradharris) wrote :

Thanks Mark!

Plan sounds solid; offhand, can't think of any chances necessary in Glance itself.

Changed in nova:
assignee: nobody → Mark Washenberger (markwash)
Changed in nova:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.2
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.