)]}'
{"ceilometer/storage/impl_mongodb.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3b5a8298a6afd0b3968bb0b00f1a01c00f6e5b78","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    return q"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"def compatible_counter_unit(meter):"},{"line_number":126,"context_line":"    \"\"\"Get the counter_unit for backward compatibility where no counter_unit"},{"line_number":127,"context_line":"    is stored in the resource collection."},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F6qY%3D","line":125,"updated":"2013-03-06 16:01:38.000000000","message":"I\u0027m not comfortable with reproducing this information, or embedding it in the storage driver. I really expected to fix this just by setting the units to a blank value, but avoiding an error in the query when the field was missing in the database.\n\nIf we do want to keep \"valid\" unit names, then I would prefer to have them defined somewhere centrally (a ceilometer.units module?) *or* update the plugins to report the units for each counter along with its name.","commit_id":"a0dca5a8bd73b30a157420018d581cb2a3de914a"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"9b64a360a7163deb7438087096b90a0c6724b5e1","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    return q"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"def compatible_counter_unit(meter):"},{"line_number":126,"context_line":"    \"\"\"Get the counter_unit for backward compatibility where no counter_unit"},{"line_number":127,"context_line":"    is stored in the resource collection."},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F5xQ%3D","line":125,"in_reply_to":"AAAAN3%2F%2F6qY%3D","updated":"2013-03-07 02:31:11.000000000","message":"Ok. Let\u0027s keep is simple by returning blank value so the behavior is consistent with sqlalchemy.","commit_id":"a0dca5a8bd73b30a157420018d581cb2a3de914a"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"878a4585610982b81decffbceebc9e62f8ccd711","unresolved":false,"context_lines":[{"line_number":475,"context_line":"                m \u003d {}"},{"line_number":476,"context_line":"                m[\u0027name\u0027] \u003d r_meter[\u0027counter_name\u0027]"},{"line_number":477,"context_line":"                m[\u0027type\u0027] \u003d r_meter[\u0027counter_type\u0027]"},{"line_number":478,"context_line":"                m[\u0027unit\u0027] \u003d compatible_value(r_meter, \u0027counter_unit\u0027)"},{"line_number":479,"context_line":"                m[\u0027resource_id\u0027] \u003d r[\u0027_id\u0027]"},{"line_number":480,"context_line":"                m[\u0027project_id\u0027] \u003d r[\u0027project_id\u0027]"},{"line_number":481,"context_line":"                m[\u0027user_id\u0027] \u003d r[\u0027user_id\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F4VY%3D","line":478,"updated":"2013-03-07 20:01:11.000000000","message":"There\u0027s no need to define a function for this. It can just be \n\n  r_meter.get(\u0027counter_unit\u0027, \u0027\u0027)","commit_id":"650ec41999d69f18f987cecb9f03827e2dfc3e77"}],"tests/storage/test_impl_mongodb.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3b5a8298a6afd0b3968bb0b00f1a01c00f6e5b78","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                                               source\u003d\u0027test\u0027)"},{"line_number":180,"context_line":"        self.conn.record_metering_data(msg)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        # Remove the counter_unit column"},{"line_number":183,"context_line":"        # Since ming doesn\u0027t support \u0027$unset\u0027 operator, we have to use"},{"line_number":184,"context_line":"        # \u0027$set\u0027 and \u0027$addToSet\u0027 instead."},{"line_number":185,"context_line":"        r \u003d self.conn.db.resource.find()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F6qU%3D","line":182,"updated":"2013-03-06 16:01:38.000000000","message":"It seems like it would be simpler to just insert the values we expect directly, instead of using record_metering_data() and then modifying the results. A direct update would also preserve the v1 form of the data structure, in case we change the schema again, and would uncover other missing fields that need to be tested in the same way.","commit_id":"a0dca5a8bd73b30a157420018d581cb2a3de914a"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"9b64a360a7163deb7438087096b90a0c6724b5e1","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                                               source\u003d\u0027test\u0027)"},{"line_number":180,"context_line":"        self.conn.record_metering_data(msg)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        # Remove the counter_unit column"},{"line_number":183,"context_line":"        # Since ming doesn\u0027t support \u0027$unset\u0027 operator, we have to use"},{"line_number":184,"context_line":"        # \u0027$set\u0027 and \u0027$addToSet\u0027 instead."},{"line_number":185,"context_line":"        r \u003d self.conn.db.resource.find()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F5sY%3D","line":182,"in_reply_to":"AAAAN3%2F%2F6qU%3D","updated":"2013-03-07 02:31:11.000000000","message":"Would like to use the old version of record_metering_data() to stubout the current one.","commit_id":"a0dca5a8bd73b30a157420018d581cb2a3de914a"}]}
