)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"79979fc08dc967b8d4ff64c9638d9347c21147a9","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fix bug #1043999"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"os-simple_tenant_usage will return usage during the period between paramter"},{"line_number":12,"context_line":"\u0027period_start\u0027 and paramter \u0027period_stop\u0027. But it will return incorrect usage"},{"line_number":13,"context_line":"if \u0027period_stop\u0027 \u003e now . So I set period_stop \u003d now if period_stop \u003e now, it"},{"line_number":14,"context_line":"will calculate correct usage during the period between \u0027period_start\u0027 and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAALH%2F%2FiKM%3D","line":11,"updated":"2012-09-03 18:50:25.000000000","message":"parameter","commit_id":"fdbaa519f200bc14164a927d93c316078a9ea4e1"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"79979fc08dc967b8d4ff64c9638d9347c21147a9","unresolved":false,"context_lines":[{"line_number":13,"context_line":"if \u0027period_stop\u0027 \u003e now . So I set period_stop \u003d now if period_stop \u003e now, it"},{"line_number":14,"context_line":"will calculate correct usage during the period between \u0027period_start\u0027 and"},{"line_number":15,"context_line":"min(period_stop, now)."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I61c211fd85b729aaeaac6ef24644ee19eb5bb6b0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAALH%2F%2FiJ8%3D","line":16,"updated":"2012-09-03 18:50:25.000000000","message":"A little more explanation would have helped me e.g.\n\n  Fix simple_tenant_usage\u0027s handing of future end times\n\n  Fixes bug #1043999\n\n  simple_tenant_usage returns the usage in the range between the supplied \n  start and end query parameters. The _hours_for() method calculates the\n  number of hours the instance was running in this range, even if the end time\n  is in the future.\n\n  By default, python-novaclient requests usage between 4 weeks ago and tomorrow.\n  This means we a report which accounts for 24 hours of extra running time for each\n  currently running instance. Fix this by clamping the period of the returned report\n  at the current time.","commit_id":"fdbaa519f200bc14164a927d93c316078a9ea4e1"}],"nova/api/openstack/compute/contrib/simple_tenant_usage.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"79979fc08dc967b8d4ff64c9638d9347c21147a9","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        (period_start, period_stop, detailed) \u003d self._get_datetime_range(req)"},{"line_number":221,"context_line":"        now \u003d timeutils.utcnow()"},{"line_number":222,"context_line":"        if period_stop \u003e now:"},{"line_number":223,"context_line":"            period_stop \u003d now"},{"line_number":224,"context_line":"        usages \u003d self._tenant_usages_for_period(context,"},{"line_number":225,"context_line":"                                                period_start,"},{"line_number":226,"context_line":"                                                period_stop,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FiKQ%3D","line":223,"updated":"2012-09-03 18:50:25.000000000","message":"This is fine, but I\u0027d put it in _tenant_usages_for_period()","commit_id":"fdbaa519f200bc14164a927d93c316078a9ea4e1"},{"author":{"_account_id":2481,"name":"Rongze Zhu","email":"zrzhit@gmail.com","username":"zrzhit"},"change_message_id":"482d0f7e9e5400f953352d746e3e7d1fd04f0d55","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        (period_start, period_stop, detailed) \u003d self._get_datetime_range(req)"},{"line_number":221,"context_line":"        now \u003d timeutils.utcnow()"},{"line_number":222,"context_line":"        if period_stop \u003e now:"},{"line_number":223,"context_line":"            period_stop \u003d now"},{"line_number":224,"context_line":"        usages \u003d self._tenant_usages_for_period(context,"},{"line_number":225,"context_line":"                                                period_start,"},{"line_number":226,"context_line":"                                                period_stop,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FhtE%3D","line":223,"in_reply_to":"AAAALH%2F%2FiKQ%3D","updated":"2012-09-04 09:43:04.000000000","message":"I also don\u0027t like repeat codes. But literally, _tenant_usages_for_period() calculate the period between period_start and period_stop parameters. So I think that it doesn\u0027t need care about whether period_stop is large than now.","commit_id":"fdbaa519f200bc14164a927d93c316078a9ea4e1"}],"nova/tests/api/openstack/compute/contrib/test_simple_tenant_usage.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"0262489a4804873a98b6621909767c638ff5240c","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    def test_end_time_in_the_future(self):"},{"line_number":128,"context_line":"        future \u003d NOW + datetime.timedelta(hours\u003dHOURS)"},{"line_number":129,"context_line":"        self._test_verify_index(START, future)"},{"line_number":130,"context_line":"        self._test_verify_show(START, future)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _get_tenant_usages(self, detailed\u003d\u0027\u0027):"},{"line_number":133,"context_line":"        req \u003d webob.Request.blank("}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FhmE%3D","line":130,"updated":"2012-09-04 14:27:06.000000000","message":"For consistency, it would be better I think if the index and show tests were separated also in the future end-time case, e.g.: \n\n  def test_verify_index_future_end_time(self):\n      future \u003d NOW + datetime.timedelta(hours\u003dHOURS)\n      self._test_verify_index(START, future)\n\n  def test_verify_show_future_end_time(self):\n      future \u003d NOW + datetime.timedelta(hours\u003dHOURS)\n      self._test_verify_show(START, future)","commit_id":"3938478a00fb54fdf8ed3ab7892e1e25a1e66635"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"bbcec49136ccdfe64fe3fe592df37c7cc22e6d7e","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    def test_verify_index(self):"},{"line_number":122,"context_line":"        self._test_verify_index(START, STOP)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def test_verify_index_futrue_end_time(self):"},{"line_number":125,"context_line":"        future \u003d NOW + datetime.timedelta(hours\u003dHOURS)"},{"line_number":126,"context_line":"        self._test_verify_index(START, future)"},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2FgPA%3D","line":124,"updated":"2012-09-05 18:57:52.000000000","message":"futrue?","commit_id":"869443f41c8826c9a4de1dcc65c5a5354b623a04"}]}
