shade/releasenotes/notes/compute-usage-defaults-5f5b2936f17ff400.yaml
Monty Taylor 072001a628
Allow a user to submit start and end time as strings
get_compute_usage currently requires a user to provide a datetime
object. That's actually fairly unfriendly. Also, it turns out if you
happen to produce one of those with timezone offset information, Nova
will return a 400 error. It's pretty easy to convert a datetime with
timezone info to a datetime in UTC without it - so do that first.

Now a user can submit a fully compliant ISO 8601 datetime with whatever
info they want and we'll make it meet nova's standards. They can also
supply a datetime if they prefer.

Also - do date parsing before project get - to avoid an API call if the
validation that doesn't need an API call fails.

Finally, supply a default for 'start' of the first day OpenStack
existed.

Change-Id: I53989d47f0d24695c19c1023e35acb315bec9eea
2017-05-23 14:05:59 -05:00

10 lines
433 B
YAML

---
features:
- get_compute_usage now has a default value for the start
parameter of 2010-07-06. That was the date the OpenStack
project started. It's completely impossible for someone
to have Nova usage data that goes back further in time.
Also, both the start and end date parameters now also
accept strings which will be parsed and timezones will
be properly converted to UTC which is what Nova expects.