)]}'
{"cinder/cmd/volume_usage_audit.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8895472b7825b3845d489c9310f541ca7f2e7954","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            LOG.exception(_LE(\"Exists snapshot notification failed: %s\"),"},{"line_number":196,"context_line":"                          exc_msg, resource\u003dsnapshot_ref)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"\t\tutc \u003d pytz.UTC"},{"line_number":199,"context_line":"\t\tbegin \u003d utc.localize(begin)"},{"line_number":200,"context_line":"\t\tend \u003d utc.localize(end)"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        if (CONF.send_actions and"},{"line_number":203,"context_line":"                snapshot_ref.created_at \u003e begin and"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_d61cbcc3","line":200,"range":{"start_line":198,"start_character":0,"end_line":200,"end_character":25},"updated":"2016-12-02 09:23:52.000000000","message":"You should definitely start by reading \"Step 0\" of our coding style guide [1].\n\n[1] http://docs.openstack.org/developer/hacking/#step-0","commit_id":"6b0ee7304a3f9f93ce29a6a1290ca66212cc9005"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"b6f4bb6072ba940000dab6f1b0fb5650fbda3f69","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        \u0027audit_period_ending\u0027: str(end),"},{"line_number":105,"context_line":"    }"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    volumes \u003d db.volume_get_active_by_window(admin_context,"},{"line_number":108,"context_line":"                                             begin,"},{"line_number":109,"context_line":"                                             end)"},{"line_number":110,"context_line":"    LOG.info(_LI(\"Found %d volumes\"), len(volumes))"},{"line_number":111,"context_line":"    for volume_ref in volumes:"},{"line_number":112,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_628b9f68","line":109,"range":{"start_line":107,"start_character":0,"end_line":109,"end_character":49},"updated":"2016-12-06 12:58:42.000000000","message":"That\u0027s the root of the problem - you should go through versioned objects layer and use:\n\n    volumes \u003d objects.VolumesList.get_active_by_window(admin_context,\n                                                       begin, end)\n\nThe get_active_by_window method is missing from VolumesList object, so you should add it there.\n\nThen you\u0027ll get timezone-aware datetimes here. start and end should be tzaware as well. This way user will provide start and end time in his own timezone and those will be correctly compared to UTC-based time in the DB.","commit_id":"457b3d6a47e541632b8e1c4edee686209903e3fc"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"b6f4bb6072ba940000dab6f1b0fb5650fbda3f69","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                LOG.exception(_LE(\"Delete snapshot notification failed: %s\"),"},{"line_number":253,"context_line":"                              exc_msg, resource\u003dsnapshot_ref)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    backups \u003d db.backup_get_active_by_window(admin_context,"},{"line_number":256,"context_line":"                                             begin, end)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    LOG.info(_LI(\"Found %d backups\"), len(backups))"},{"line_number":259,"context_line":"    for backup_ref in backups:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_02e10b2d","line":256,"range":{"start_line":255,"start_character":0,"end_line":256,"end_character":56},"updated":"2016-12-06 12:58:42.000000000","message":"Same here.","commit_id":"457b3d6a47e541632b8e1c4edee686209903e3fc"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c4f2eb030557ee0f7a68c665b1419fa04bb6d9ef","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    if CONF.end_time:"},{"line_number":90,"context_line":"        end \u003d datetime.datetime.strptime(CONF.end_time,"},{"line_number":91,"context_line":"                                         \"%Y-%m-%d %H:%M:%S\")"},{"line_number":92,"context_line":"    begin \u003d begin.replace(tzinfo\u003diso8601.Utc())"},{"line_number":93,"context_line":"    end \u003d end.replace(tzinfo\u003diso8601.Utc())"},{"line_number":94,"context_line":"    if not end \u003e begin:"},{"line_number":95,"context_line":"        msg \u003d _(\"The end time (%(end)s) must be after the start \""},{"line_number":96,"context_line":"                \"time (%(start)s).\") % {\u0027start\u0027: begin,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_8d624b15","line":93,"range":{"start_line":92,"start_character":0,"end_line":93,"end_character":43},"updated":"2016-12-08 09:58:54.000000000","message":"This is fine, as we\u0027re showing the created_at in cinderclient as UTC values.","commit_id":"218528cf1b83feee10f0233b0f8f62663d8aea65"}]}
