)]}'
{"ceilometer/compute/pollsters/cpu.py":[{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"b70c68248e1cd1be12cca7328d7744c038a42971","unresolved":false,"context_lines":[{"line_number":36,"context_line":"            instance_name \u003d util.instance_name(instance)"},{"line_number":37,"context_line":"            try:"},{"line_number":38,"context_line":"                cpu_info \u003d manager.inspector.inspect_cpus(instance_name)"},{"line_number":39,"context_line":"                LOG.info(\"CPUTIME USAGE: %(instance)s %(time)d\" %"},{"line_number":40,"context_line":"                         {\u0027instance\u0027: instance.__dict__,"},{"line_number":41,"context_line":"                          \u0027time\u0027: cpu_info.time})"},{"line_number":42,"context_line":"                cpu_num \u003d {\u0027cpu_number\u0027: cpu_info.number}"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAWH%2F%2FLG8%3D","line":39,"updated":"2014-03-19 18:16:17.000000000","message":"Why is \u0027_()\u0027 removed only from this particular LOG.info?","commit_id":"0753ef9f76189225cb49323c4550f0cc8dffcba2"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"acf330aa712e7f3554b9324d658e2941476299e1","unresolved":false,"context_lines":[{"line_number":36,"context_line":"            instance_name \u003d util.instance_name(instance)"},{"line_number":37,"context_line":"            try:"},{"line_number":38,"context_line":"                cpu_info \u003d manager.inspector.inspect_cpus(instance_name)"},{"line_number":39,"context_line":"                LOG.info(\"CPUTIME USAGE: %(instance)s %(time)d\" %"},{"line_number":40,"context_line":"                         {\u0027instance\u0027: instance.__dict__,"},{"line_number":41,"context_line":"                          \u0027time\u0027: cpu_info.time})"},{"line_number":42,"context_line":"                cpu_num \u003d {\u0027cpu_number\u0027: cpu_info.number}"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAWH%2F%2FD1o%3D","line":39,"in_reply_to":"AAAAWH%2F%2FLG8%3D","updated":"2014-03-20 15:32:43.000000000","message":"When testing this class the instance object used below is a MagicMock object, and passing the MagicMock\u0027s __dict__ to the _() was exposing what I think might be a weird MagicMock bug. An AttributeError for the \"_mock_methods\" attribute is raised if you try to print a MagicMock.__dict__ that was deepcopied (a deep copy of the parameters given to _() is made in _()). \n\nThis is not related to _() I was able to reproduce this problem without _() being involved just trying to copy the __dict__ and trying to print it. By removing the _() we just print it and a copy is not made so it prints.\n\nWe could also leave the _() but not pass the MagicMock\u0027s __dict__ maybe we just pass in the instance, but I felt this would preserve logging the actual instance __dict__","commit_id":"0753ef9f76189225cb49323c4550f0cc8dffcba2"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"3494a12d3133b3ff8a0892ddbbff8576831a4159","unresolved":false,"context_lines":[{"line_number":36,"context_line":"            instance_name \u003d util.instance_name(instance)"},{"line_number":37,"context_line":"            try:"},{"line_number":38,"context_line":"                cpu_info \u003d manager.inspector.inspect_cpus(instance_name)"},{"line_number":39,"context_line":"                LOG.info(\"CPUTIME USAGE: %(instance)s %(time)d\" %"},{"line_number":40,"context_line":"                         {\u0027instance\u0027: instance.__dict__,"},{"line_number":41,"context_line":"                          \u0027time\u0027: cpu_info.time})"},{"line_number":42,"context_line":"                cpu_num \u003d {\u0027cpu_number\u0027: cpu_info.number}"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAWH%2F%2FC8o%3D","line":39,"updated":"2014-03-20 17:25:41.000000000","message":"I made a small code research, the result is the following:\n\nThere is a similar code snippet here: https://github.com/openstack/ceilometer/blob/master/ceilometer/compute/pollsters/memory.py#L33\n\nThe only difference is that the level here is LOG.debug and it is unmodified, so the tests are working for this version. I think that maybe it can be the reason, why this issue happens only with this particular LOG.info, as I did not find other LOG.info in a get_samples block like this, under /compute/pollsters/. My general opinion about this issue that we should no modify the code because of a possible MagicMock bug. The bug should be corrected in MagicMock.\n\nA possible fix for this issue here, in my opinion, is to change the log level to DEBUG, as the other logs with \u0027USAGE\u0027 information in get_samples functions are debug logs, and leave the \u0027_()\u0027 untouched. There were some discussions about log levels in other patch sets, so it can be refactored separately in another patch, if these log levels are not correct as it is a project level issue, but I think it is ok to fix this inconsistency here for now.","commit_id":"871f846c798e100a15a64a6b9cdbf9762bdc6c89"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"931c4fb5e2bcd0d5cab1722b42205b64b22d458f","unresolved":false,"context_lines":[{"line_number":36,"context_line":"            instance_name \u003d util.instance_name(instance)"},{"line_number":37,"context_line":"            try:"},{"line_number":38,"context_line":"                cpu_info \u003d manager.inspector.inspect_cpus(instance_name)"},{"line_number":39,"context_line":"                LOG.info(\"CPUTIME USAGE: %(instance)s %(time)d\" %"},{"line_number":40,"context_line":"                         {\u0027instance\u0027: instance.__dict__,"},{"line_number":41,"context_line":"                          \u0027time\u0027: cpu_info.time})"},{"line_number":42,"context_line":"                cpu_num \u003d {\u0027cpu_number\u0027: cpu_info.number}"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAWH%2F%2FC0k%3D","line":39,"in_reply_to":"AAAAWH%2F%2FC8o%3D","updated":"2014-03-20 17:44:19.000000000","message":"OK, I am fine with either approach, so I will adjust the log level in the next PS. Thank you,","commit_id":"871f846c798e100a15a64a6b9cdbf9762bdc6c89"}],"ceilometer/service.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"f3b601b1456a567d3c2e9db675aa017a87531188","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    # or select()"},{"line_number":114,"context_line":"    eventlet.monkey_patch(socket\u003dTrue, select\u003dTrue)"},{"line_number":115,"context_line":"    gettextutils.install(\u0027ceilometer\u0027, lazy\u003dTrue)"},{"line_number":116,"context_line":"    gettextutils.enable_lazy()"},{"line_number":117,"context_line":"    rpc.set_defaults(control_exchange\u003d\u0027ceilometer\u0027)"},{"line_number":118,"context_line":"    cfg.set_defaults(log.log_opts,"},{"line_number":119,"context_line":"                     default_log_levels\u003d[\u0027amqplib\u003dWARN\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FfsY%3D","line":116,"updated":"2014-03-17 15:08:32.000000000","message":"so lazy in install(\u0027ceilometer\u0027, lazy\u003dTrue) is something else?\n\ndoes this comment by dstanek mean anything? https://github.com/openstack/keystone/blob/289686484013e54f385563f9c0ce9a3893f69b08/keystone/tests/__init__.py\n\nseems to suggest it needs to be called before .install()","commit_id":"481330c2a0c2ef0c07e7ac5b6785812bdfcbcdfb"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"5ee5d4e9ddf90240feb535448e017f59736004ee","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    # or select()"},{"line_number":114,"context_line":"    eventlet.monkey_patch(socket\u003dTrue, select\u003dTrue)"},{"line_number":115,"context_line":"    gettextutils.install(\u0027ceilometer\u0027, lazy\u003dTrue)"},{"line_number":116,"context_line":"    gettextutils.enable_lazy()"},{"line_number":117,"context_line":"    rpc.set_defaults(control_exchange\u003d\u0027ceilometer\u0027)"},{"line_number":118,"context_line":"    cfg.set_defaults(log.log_opts,"},{"line_number":119,"context_line":"                     default_log_levels\u003d[\u0027amqplib\u003dWARN\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FerQ%3D","line":116,"in_reply_to":"AAAAWH%2F%2FfsY%3D","updated":"2014-03-17 16:54:30.000000000","message":"Hi Gordon, \n\ngettextutils.install(lazy\u003dTrue) and gettextutils.enable_lazy() do basically the same thing, they install the translation function_() with \"lazy translation\" enabled. \n\nThe difference between the install(lazy\u003dTrue) and enable_lazy() is that the installed _ function of the former can be overridden if the _ is re-imported in a module, and the override does not support lazy translation.\n\nIn ceilometer, lazy translation had been initially turned on here: https://review.openstack.org/#/c/66983/ but a lot of the modules import the _ directly, and so translation was not working in those modules. That is why this patch is installing the _() using enable_lazy() since that is not overriden by individual imports and translation works.\n\nThank you,","commit_id":"481330c2a0c2ef0c07e7ac5b6785812bdfcbcdfb"}],"ceilometer/storage/impl_mongodb.py":[{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"b70c68248e1cd1be12cca7328d7744c038a42971","unresolved":false,"context_lines":[{"line_number":803,"context_line":"        :param pagination: Optional pagination query."},{"line_number":804,"context_line":"        \"\"\""},{"line_number":805,"context_line":"        if pagination:"},{"line_number":806,"context_line":"            raise NotImplementedError((\u0027Pagination not implemented\u0027))"},{"line_number":807,"context_line":""},{"line_number":808,"context_line":"        query \u003d {}"},{"line_number":809,"context_line":"        if user is not None:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAWH%2F%2FLa4%3D","line":806,"updated":"2014-03-19 18:16:17.000000000","message":"Please remove the additional round brackets.","commit_id":"0753ef9f76189225cb49323c4550f0cc8dffcba2"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"acf330aa712e7f3554b9324d658e2941476299e1","unresolved":false,"context_lines":[{"line_number":803,"context_line":"        :param pagination: Optional pagination query."},{"line_number":804,"context_line":"        \"\"\""},{"line_number":805,"context_line":"        if pagination:"},{"line_number":806,"context_line":"            raise NotImplementedError((\u0027Pagination not implemented\u0027))"},{"line_number":807,"context_line":""},{"line_number":808,"context_line":"        query \u003d {}"},{"line_number":809,"context_line":"        if user is not None:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAWH%2F%2FD0U%3D","line":806,"in_reply_to":"AAAAWH%2F%2FLa4%3D","updated":"2014-03-20 15:32:43.000000000","message":"Done","commit_id":"0753ef9f76189225cb49323c4550f0cc8dffcba2"}],"ceilometer/storage/impl_sqlalchemy.py":[{"author":{"_account_id":7179,"name":"Brad Pokorny","email":"brad_pokorny@symantec.com","username":"bpokorny"},"change_message_id":"e9b3f3372d01905b3f10772fe6f14532f5e2cf14","unresolved":false,"context_lines":[{"line_number":752,"context_line":"            for group in groupby:"},{"line_number":753,"context_line":"                if group not in [\u0027user_id\u0027, \u0027project_id\u0027, \u0027resource_id\u0027]:"},{"line_number":754,"context_line":"                    msg \u003d \"Unable to group by these fields\""},{"line_number":755,"context_line":"                    raise NotImplementedError(msg)"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"        if not period:"},{"line_number":758,"context_line":"            for res in self._make_stats_query(sample_filter,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FxwY%3D","line":755,"updated":"2014-03-13 21:36:57.000000000","message":"Suggest replacing the double quotes with single quotes and removing the msg variable to keep consistent with the other exceptions in this file.  ie.\n\nraise NotImplementedError(\u0027Unable to group by these fields\u0027)","commit_id":"19da6682ef3a2f795e1904a8c070e03b2413f90d"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"d138982c8f1c8cc47f1f96f2565524735e25d98e","unresolved":false,"context_lines":[{"line_number":752,"context_line":"            for group in groupby:"},{"line_number":753,"context_line":"                if group not in [\u0027user_id\u0027, \u0027project_id\u0027, \u0027resource_id\u0027]:"},{"line_number":754,"context_line":"                    msg \u003d \"Unable to group by these fields\""},{"line_number":755,"context_line":"                    raise NotImplementedError(msg)"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"        if not period:"},{"line_number":758,"context_line":"            for res in self._make_stats_query(sample_filter,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2Fxhs%3D","line":755,"in_reply_to":"AAAAWH%2F%2FxwY%3D","updated":"2014-03-13 22:06:59.000000000","message":"Done","commit_id":"19da6682ef3a2f795e1904a8c070e03b2413f90d"},{"author":{"_account_id":7179,"name":"Brad Pokorny","email":"brad_pokorny@symantec.com","username":"bpokorny"},"change_message_id":"e9b3f3372d01905b3f10772fe6f14532f5e2cf14","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"    def _handle_metadata(self, op, field_name, value):"},{"line_number":1307,"context_line":"        if op \u003d\u003d self.operators[\"in\"]:"},{"line_number":1308,"context_line":"            msg \u003d \"Metadata query with in operator is not implemented\""},{"line_number":1309,"context_line":"            raise NotImplementedError(msg)"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"        field_name \u003d field_name[len(\u0027resource_metadata.\u0027):]"},{"line_number":1312,"context_line":"        meta_table \u003d META_TYPE_MAP[type(value)]"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FxwM%3D","line":1309,"updated":"2014-03-13 21:36:57.000000000","message":"Suggest replacing the double quotes with single quotes and removing the msg variable to keep consistent with the other exceptions in this file.  ie.\n\nraise NotImplementedError(\u0027Metadata query with in operator is not implemented\u0027)","commit_id":"19da6682ef3a2f795e1904a8c070e03b2413f90d"},{"author":{"_account_id":7996,"name":"Luis A. Garcia","email":"luis@linux.vnet.ibm.com","username":"luisg"},"change_message_id":"d138982c8f1c8cc47f1f96f2565524735e25d98e","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"    def _handle_metadata(self, op, field_name, value):"},{"line_number":1307,"context_line":"        if op \u003d\u003d self.operators[\"in\"]:"},{"line_number":1308,"context_line":"            msg \u003d \"Metadata query with in operator is not implemented\""},{"line_number":1309,"context_line":"            raise NotImplementedError(msg)"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"        field_name \u003d field_name[len(\u0027resource_metadata.\u0027):]"},{"line_number":1312,"context_line":"        meta_table \u003d META_TYPE_MAP[type(value)]"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2Fxgo%3D","line":1309,"in_reply_to":"AAAAWH%2F%2FxwM%3D","updated":"2014-03-13 22:06:59.000000000","message":"Done","commit_id":"19da6682ef3a2f795e1904a8c070e03b2413f90d"}]}
