)]}'
{"ceilometerclient/common/utils.py":[{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"2a073b48de59b69e1a8adebdb315cf379aefcdfc","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"def print_field_value(value, out_file\u003dsys.stdout):"},{"line_number":201,"context_line":"    if isinstance(value, dict):"},{"line_number":202,"context_line":"        value \u003d jsonutils.dumps(value)"},{"line_number":203,"context_line":"    if six.PY3:"},{"line_number":204,"context_line":"        print(encodeutils.safe_encode(str(value)).decode(), file\u003dout_file)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_9f0c6dee","line":201,"updated":"2015-05-05 11:11:50.000000000","message":"-1\n\n# ceilometer event-show 24901ae8-f38a-4821-902f-818405a0a3d6 -f traits | python -m json.tool\n\nExpecting property name: line 1 column 3 (char 2)\n\nif support list here:\n\n# ceilometer event-show 24901ae8-f38a-4821-902f-818405a0a3d6 -f traits | python -m json.tool\n[\n    {\n        \"name\": \"request_id\",\n        \"type\": \"string\",\n        \"value\": \"req-68cef3ef-13f7-48a0-be21-3ff05f993f59\"\n    },\n    {\n        \"name\": \"service\",\n        \"type\": \"string\",\n        \"value\": \"volumeType.SIA1000008648\"\n    },\n    {\n        \"name\": \"tenant_id\",\n        \"type\": \"string\",\n        \"value\": \"89a26f698a704d41b47c1abd74e456a9\"\n    }\n]","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"40ace8f35fb37e3fb3e3b7590f60b6ae2a955d7f","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"def print_field_value(value, out_file\u003dsys.stdout):"},{"line_number":201,"context_line":"    if isinstance(value, dict):"},{"line_number":202,"context_line":"        value \u003d jsonutils.dumps(value)"},{"line_number":203,"context_line":"    if six.PY3:"},{"line_number":204,"context_line":"        print(encodeutils.safe_encode(str(value)).decode(), file\u003dout_file)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aca2d91_92b6ff88","line":201,"in_reply_to":"1aca2d91_3662b6d9","updated":"2015-05-07 06:12:40.000000000","message":"I missed explaining relevant context here. I but thanks for pointing this out. I uploaded patch fixing that.","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"530420d1c47330dd06f40f6bb62b1b79de89db81","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"def print_field_value(value, out_file\u003dsys.stdout):"},{"line_number":201,"context_line":"    if isinstance(value, dict):"},{"line_number":202,"context_line":"        value \u003d jsonutils.dumps(value)"},{"line_number":203,"context_line":"    if six.PY3:"},{"line_number":204,"context_line":"        print(encodeutils.safe_encode(str(value)).decode(), file\u003dout_file)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aca2d91_3662b6d9","line":201,"in_reply_to":"3acd31a7_05724e7b","updated":"2015-05-06 01:27:16.000000000","message":"I don\u0027t know what are you talking about, when -f is specified, this function will be called, it has no business with print_dict and print_list. Or do I misunderstand something?","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"4f654fb6f726ab70b7c2188cdf24c41b37d3e66d","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"def print_field_value(value, out_file\u003dsys.stdout):"},{"line_number":201,"context_line":"    if isinstance(value, dict):"},{"line_number":202,"context_line":"        value \u003d jsonutils.dumps(value)"},{"line_number":203,"context_line":"    if six.PY3:"},{"line_number":204,"context_line":"        print(encodeutils.safe_encode(str(value)).decode(), file\u003dout_file)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_a5015a07","line":201,"in_reply_to":"3acd31a7_9f0c6dee","updated":"2015-05-05 11:22:16.000000000","message":"Actually, this is because of the way traits are being printed. There is a function here called print_list, which actually printing.","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"97efba65e4b49bad2c513e0ef2f460d77a1a97c6","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"def print_field_value(value, out_file\u003dsys.stdout):"},{"line_number":201,"context_line":"    if isinstance(value, dict):"},{"line_number":202,"context_line":"        value \u003d jsonutils.dumps(value)"},{"line_number":203,"context_line":"    if six.PY3:"},{"line_number":204,"context_line":"        print(encodeutils.safe_encode(str(value)).decode(), file\u003dout_file)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_05724e7b","line":201,"in_reply_to":"3acd31a7_a5015a07","updated":"2015-05-05 11:24:04.000000000","message":"I don\u0027t know why my whole comment doesn\u0027t appear here. But anyway, there is a function called print_list which actually does the printing, and that output is not compatible with the one that print_dict does. I think that\u0027s a separate bug.","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"2a073b48de59b69e1a8adebdb315cf379aefcdfc","unresolved":false,"context_lines":[{"line_number":201,"context_line":"    if isinstance(value, dict):"},{"line_number":202,"context_line":"        value \u003d jsonutils.dumps(value)"},{"line_number":203,"context_line":"    if six.PY3:"},{"line_number":204,"context_line":"        print(encodeutils.safe_encode(str(value)).decode(), file\u003dout_file)"},{"line_number":205,"context_line":"    else:"},{"line_number":206,"context_line":"        print(encodeutils.safe_encode(str(value)), file\u003dout_file)"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_eae5e137","line":204,"updated":"2015-05-05 11:11:50.000000000","message":"why use str here? does jsonutils.dumps not enough?","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"40ace8f35fb37e3fb3e3b7590f60b6ae2a955d7f","unresolved":false,"context_lines":[{"line_number":201,"context_line":"    if isinstance(value, dict):"},{"line_number":202,"context_line":"        value \u003d jsonutils.dumps(value)"},{"line_number":203,"context_line":"    if six.PY3:"},{"line_number":204,"context_line":"        print(encodeutils.safe_encode(str(value)).decode(), file\u003dout_file)"},{"line_number":205,"context_line":"    else:"},{"line_number":206,"context_line":"        print(encodeutils.safe_encode(str(value)), file\u003dout_file)"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1aca2d91_d24a3783","line":204,"in_reply_to":"3acd31a7_25442a48","updated":"2015-05-07 06:12:40.000000000","message":"I uploaded another patch with a comment as an explanation","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"4f654fb6f726ab70b7c2188cdf24c41b37d3e66d","unresolved":false,"context_lines":[{"line_number":201,"context_line":"    if isinstance(value, dict):"},{"line_number":202,"context_line":"        value \u003d jsonutils.dumps(value)"},{"line_number":203,"context_line":"    if six.PY3:"},{"line_number":204,"context_line":"        print(encodeutils.safe_encode(str(value)).decode(), file\u003dout_file)"},{"line_number":205,"context_line":"    else:"},{"line_number":206,"context_line":"        print(encodeutils.safe_encode(str(value)), file\u003dout_file)"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_25442a48","line":204,"in_reply_to":"3acd31a7_eae5e137","updated":"2015-05-05 11:22:16.000000000","message":"I copied this from cliutils. As it seemed to be the way things are being actually printed. on the other hand, print_dict seems to do a decode before actually printing","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"2a073b48de59b69e1a8adebdb315cf379aefcdfc","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    if six.PY3:"},{"line_number":204,"context_line":"        print(encodeutils.safe_encode(str(value)).decode(), file\u003dout_file)"},{"line_number":205,"context_line":"    else:"},{"line_number":206,"context_line":"        print(encodeutils.safe_encode(str(value)), file\u003dout_file)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"def exit(msg\u003d\u0027\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_8a3e6d8a","line":206,"updated":"2015-05-05 11:11:50.000000000","message":"ditto","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"}],"ceilometerclient/tests/unit/v2/test_shell.py":[{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"2a073b48de59b69e1a8adebdb315cf379aefcdfc","unresolved":false,"context_lines":[{"line_number":1254,"context_line":""},{"line_number":1255,"context_line":"    def do_test_show_field_from_entity(self, field, mock_get_function):"},{"line_number":1256,"context_line":"        output \u003d self._do_show_entity(field, mock_get_function)"},{"line_number":1257,"context_line":"        expected_field_value \u003d self.get_serialized_field(self.entity, field)"},{"line_number":1258,"context_line":"        self.assertEqual(str(expected_field_value) + \u0027\\n\u0027, output)"},{"line_number":1259,"context_line":""},{"line_number":1260,"context_line":"    def get_serialized_field(self, entity, field):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_ea4721ba","line":1257,"updated":"2015-05-05 11:11:50.000000000","message":"I think this parameter is not needed, since it is an object attribute, you can access it in get_serialized_field directly","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"2a073b48de59b69e1a8adebdb315cf379aefcdfc","unresolved":false,"context_lines":[{"line_number":1255,"context_line":"    def do_test_show_field_from_entity(self, field, mock_get_function):"},{"line_number":1256,"context_line":"        output \u003d self._do_show_entity(field, mock_get_function)"},{"line_number":1257,"context_line":"        expected_field_value \u003d self.get_serialized_field(self.entity, field)"},{"line_number":1258,"context_line":"        self.assertEqual(str(expected_field_value) + \u0027\\n\u0027, output)"},{"line_number":1259,"context_line":""},{"line_number":1260,"context_line":"    def get_serialized_field(self, entity, field):"},{"line_number":1261,"context_line":"        attribute \u003d getattr(entity, field)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_2aeab9db","line":1258,"updated":"2015-05-05 11:11:50.000000000","message":"does str required?","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"4f654fb6f726ab70b7c2188cdf24c41b37d3e66d","unresolved":false,"context_lines":[{"line_number":1255,"context_line":"    def do_test_show_field_from_entity(self, field, mock_get_function):"},{"line_number":1256,"context_line":"        output \u003d self._do_show_entity(field, mock_get_function)"},{"line_number":1257,"context_line":"        expected_field_value \u003d self.get_serialized_field(self.entity, field)"},{"line_number":1258,"context_line":"        self.assertEqual(str(expected_field_value) + \u0027\\n\u0027, output)"},{"line_number":1259,"context_line":""},{"line_number":1260,"context_line":"    def get_serialized_field(self, entity, field):"},{"line_number":1261,"context_line":"        attribute \u003d getattr(entity, field)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_85a2defb","line":1258,"in_reply_to":"3acd31a7_2aeab9db","updated":"2015-05-05 11:22:16.000000000","message":"yes, since it\u0027s an object, and the output will be an str. Seems that the output needs to be printed in the same way, because else we have different representations of json data. For instance, it is already the case that the traits from an event and the metadata for a sample are printed in different ways which are not compatible.","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"40ace8f35fb37e3fb3e3b7590f60b6ae2a955d7f","unresolved":false,"context_lines":[{"line_number":1255,"context_line":"    def do_test_show_field_from_entity(self, field, mock_get_function):"},{"line_number":1256,"context_line":"        output \u003d self._do_show_entity(field, mock_get_function)"},{"line_number":1257,"context_line":"        expected_field_value \u003d self.get_serialized_field(self.entity, field)"},{"line_number":1258,"context_line":"        self.assertEqual(str(expected_field_value) + \u0027\\n\u0027, output)"},{"line_number":1259,"context_line":""},{"line_number":1260,"context_line":"    def get_serialized_field(self, entity, field):"},{"line_number":1261,"context_line":"        attribute \u003d getattr(entity, field)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aca2d91_522627cf","line":1258,"in_reply_to":"3acd31a7_85a2defb","updated":"2015-05-07 06:12:40.000000000","message":"You were right, the str was not needed.","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"2a073b48de59b69e1a8adebdb315cf379aefcdfc","unresolved":false,"context_lines":[{"line_number":1263,"context_line":"        print_utils.print_field_value(attribute, out_file\u003doutput)"},{"line_number":1264,"context_line":"        value \u003d output.getvalue()"},{"line_number":1265,"context_line":"        # print will append a newline."},{"line_number":1266,"context_line":"        return value[:-1] if value and value[-1] \u003d\u003d \u0027\\n\u0027 else value"},{"line_number":1267,"context_line":""},{"line_number":1268,"context_line":""},{"line_number":1269,"context_line":"class EventShowTest(EntityShowTest):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_caec65f5","line":1266,"updated":"2015-05-05 11:11:50.000000000","message":"strip \\n then append it in L1258?","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"40ace8f35fb37e3fb3e3b7590f60b6ae2a955d7f","unresolved":false,"context_lines":[{"line_number":1263,"context_line":"        print_utils.print_field_value(attribute, out_file\u003doutput)"},{"line_number":1264,"context_line":"        value \u003d output.getvalue()"},{"line_number":1265,"context_line":"        # print will append a newline."},{"line_number":1266,"context_line":"        return value[:-1] if value and value[-1] \u003d\u003d \u0027\\n\u0027 else value"},{"line_number":1267,"context_line":""},{"line_number":1268,"context_line":""},{"line_number":1269,"context_line":"class EventShowTest(EntityShowTest):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aca2d91_d5ffc1ff","line":1266,"in_reply_to":"3acd31a7_c55d7616","updated":"2015-05-07 06:12:40.000000000","message":"I uploaded another patch simplifying this.","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"4f654fb6f726ab70b7c2188cdf24c41b37d3e66d","unresolved":false,"context_lines":[{"line_number":1263,"context_line":"        print_utils.print_field_value(attribute, out_file\u003doutput)"},{"line_number":1264,"context_line":"        value \u003d output.getvalue()"},{"line_number":1265,"context_line":"        # print will append a newline."},{"line_number":1266,"context_line":"        return value[:-1] if value and value[-1] \u003d\u003d \u0027\\n\u0027 else value"},{"line_number":1267,"context_line":""},{"line_number":1268,"context_line":""},{"line_number":1269,"context_line":"class EventShowTest(EntityShowTest):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_c55d7616","line":1266,"in_reply_to":"3acd31a7_caec65f5","updated":"2015-05-05 11:22:16.000000000","message":"This is because this functions are re-used for printing the more verbose output (the option of not printing a specific field). And there we need it to be without the newline","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"}],"ceilometerclient/v2/shell.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"20863f208c6bae0541e6ec8a0398232aea38c127","unresolved":false,"context_lines":[{"line_number":1089,"context_line":"           required\u003dTrue, action\u003dNotEmptyAction)"},{"line_number":1090,"context_line":"@utils.arg(\u0027-t\u0027, \u0027--trait_name\u0027, metavar\u003d\u0027\u003cTRAIT_NAME\u003e\u0027,"},{"line_number":1091,"context_line":"           help\u003d\u0027The name of the trait to list.\u0027,"},{"line_number":1092,"context_line":"           required\u003dTrue, action\u003dNotEmptyAction)"},{"line_number":1093,"context_line":"def do_trait_list(cc, args\u003d{}):"},{"line_number":1094,"context_line":"    \"\"\"List all traits with name \u003ctrait_name\u003e for Event Type \u003cevent_type\u003e.\"\"\""},{"line_number":1095,"context_line":"    traits \u003d cc.traits.list(args.event_type, args.trait_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab921fb_4656375d","line":1092,"updated":"2015-04-24 13:21:12.000000000","message":"you can lists traits using this... maybe we\u0027re missing the correct support here?","commit_id":"ba8e8fd0012ab3b9e613ba61b64cec62568ea90c"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"1622d512d5b4777b01d3afe78d835331806c8373","unresolved":false,"context_lines":[{"line_number":1089,"context_line":"           required\u003dTrue, action\u003dNotEmptyAction)"},{"line_number":1090,"context_line":"@utils.arg(\u0027-t\u0027, \u0027--trait_name\u0027, metavar\u003d\u0027\u003cTRAIT_NAME\u003e\u0027,"},{"line_number":1091,"context_line":"           help\u003d\u0027The name of the trait to list.\u0027,"},{"line_number":1092,"context_line":"           required\u003dTrue, action\u003dNotEmptyAction)"},{"line_number":1093,"context_line":"def do_trait_list(cc, args\u003d{}):"},{"line_number":1094,"context_line":"    \"\"\"List all traits with name \u003ctrait_name\u003e for Event Type \u003cevent_type\u003e.\"\"\""},{"line_number":1095,"context_line":"    traits \u003d cc.traits.list(args.event_type, args.trait_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab921fb_977d9770","line":1092,"in_reply_to":"bab921fb_1c108e4d","updated":"2015-04-24 13:48:11.000000000","message":"Sure. Well, my main point is that I would like to be able to easily print specific attributes from an event in an easy way. I think this addition would actually become more useful once this CR https://review.openstack.org/#/c/176447/ lands, so then I could actually dump the raw data from an event, which would be useful. What I could do is make this commit dependant on yours, and add the dumping of raw data, would that be alright?","commit_id":"ba8e8fd0012ab3b9e613ba61b64cec62568ea90c"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"5b9a21eec30d81e8fd3420812563388a276f9141","unresolved":false,"context_lines":[{"line_number":1089,"context_line":"           required\u003dTrue, action\u003dNotEmptyAction)"},{"line_number":1090,"context_line":"@utils.arg(\u0027-t\u0027, \u0027--trait_name\u0027, metavar\u003d\u0027\u003cTRAIT_NAME\u003e\u0027,"},{"line_number":1091,"context_line":"           help\u003d\u0027The name of the trait to list.\u0027,"},{"line_number":1092,"context_line":"           required\u003dTrue, action\u003dNotEmptyAction)"},{"line_number":1093,"context_line":"def do_trait_list(cc, args\u003d{}):"},{"line_number":1094,"context_line":"    \"\"\"List all traits with name \u003ctrait_name\u003e for Event Type \u003cevent_type\u003e.\"\"\""},{"line_number":1095,"context_line":"    traits \u003d cc.traits.list(args.event_type, args.trait_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab921fb_99783091","line":1092,"in_reply_to":"bab921fb_4656375d","updated":"2015-04-24 13:25:10.000000000","message":"Can you elaborate on that? Seems to me that this functionality is not the same as the proposition in this CR.","commit_id":"ba8e8fd0012ab3b9e613ba61b64cec62568ea90c"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"9eee76e8996543ff91b3395d7a2641c5190bb4aa","unresolved":false,"context_lines":[{"line_number":1089,"context_line":"           required\u003dTrue, action\u003dNotEmptyAction)"},{"line_number":1090,"context_line":"@utils.arg(\u0027-t\u0027, \u0027--trait_name\u0027, metavar\u003d\u0027\u003cTRAIT_NAME\u003e\u0027,"},{"line_number":1091,"context_line":"           help\u003d\u0027The name of the trait to list.\u0027,"},{"line_number":1092,"context_line":"           required\u003dTrue, action\u003dNotEmptyAction)"},{"line_number":1093,"context_line":"def do_trait_list(cc, args\u003d{}):"},{"line_number":1094,"context_line":"    \"\"\"List all traits with name \u003ctrait_name\u003e for Event Type \u003cevent_type\u003e.\"\"\""},{"line_number":1095,"context_line":"    traits \u003d cc.traits.list(args.event_type, args.trait_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab921fb_1c108e4d","line":1092,"in_reply_to":"bab921fb_99783091","updated":"2015-04-24 13:36:14.000000000","message":"summary of what i typed in irc (for record sake)\n\nwell it seems like all you want is the traits... which this does (not for a specific event... yet). granted it\u0027s not in json.\n\ni guess my question is that the purpose of the cli client... if you want pure json you can use curl requests to target","commit_id":"ba8e8fd0012ab3b9e613ba61b64cec62568ea90c"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b765792f7605b88e976305bc54dcdc252b2ed01f","unresolved":false,"context_lines":[{"line_number":1048,"context_line":"@utils.arg(\u0027-f\u0027, \u0027--field\u0027,"},{"line_number":1049,"context_line":"           choices\u003d[\u0027event_type\u0027, \u0027generated\u0027, \u0027traits\u0027, \u0027raw\u0027],"},{"line_number":1050,"context_line":"           help\u003d\u0027The field from the event that should be displayed\u0027,"},{"line_number":1051,"context_line":"           required\u003dFalse)"},{"line_number":1052,"context_line":"def do_event_show(cc, args\u003d{}):"},{"line_number":1053,"context_line":"    \"\"\"Show a particular event.\"\"\""},{"line_number":1054,"context_line":"    event \u003d cc.events.get(args.message_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ad32947_5cce755b","line":1051,"updated":"2015-04-27 14:40:45.000000000","message":"you don\u0027t need required\u003dFalse, it\u0027s already the default.","commit_id":"e6abdfe3c77c361858e7593da8418c937dad70ba"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b765792f7605b88e976305bc54dcdc252b2ed01f","unresolved":false,"context_lines":[{"line_number":1061,"context_line":"        utils.print_dict(data, wrap\u003d72)"},{"line_number":1062,"context_line":""},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"def print_event_field_value(value):"},{"line_number":1065,"context_line":"    if six.PY3:"},{"line_number":1066,"context_line":"        print(encodeutils.safe_encode(value).decode())"},{"line_number":1067,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ad32947_dc084594","line":1064,"updated":"2015-04-27 14:40:45.000000000","message":"can you move this into utils.","commit_id":"e6abdfe3c77c361858e7593da8418c937dad70ba"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"2a073b48de59b69e1a8adebdb315cf379aefcdfc","unresolved":false,"context_lines":[{"line_number":51,"context_line":"COMPLEX_OPERATORS \u003d [\u0027and\u0027, \u0027or\u0027]"},{"line_number":52,"context_line":"SIMPLE_OPERATORS \u003d [\"\u003d\", \"!\u003d\", \"\u003c\", \"\u003c\u003d\", \u0027\u003e\u0027, \u0027\u003e\u003d\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"_EVENT_SHOW_FIELDS \u003d [\u0027event_type\u0027, \u0027generated\u0027, \u0027traits\u0027, \u0027raw\u0027]"},{"line_number":55,"context_line":"_SAMPLE_SHOW_FIELDS \u003d [\u0027id\u0027, \u0027meter\u0027, \u0027volume\u0027, \u0027type\u0027, \u0027unit\u0027, \u0027source\u0027,"},{"line_number":56,"context_line":"                       \u0027resource_id\u0027, \u0027user_id\u0027, \u0027project_id\u0027, \u0027timestamp\u0027,"},{"line_number":57,"context_line":"                       \u0027recorded_at\u0027, \u0027metadata\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_3f231958","line":54,"updated":"2015-05-05 11:11:50.000000000","message":"I thought you\u0027re interested in some complex columns, this seems go too far. And it seems only one field can be selected, which is useful in pipe process, I notice that neutron can prints some fields which might be more useful than only support single field.","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"4f654fb6f726ab70b7c2188cdf24c41b37d3e66d","unresolved":false,"context_lines":[{"line_number":51,"context_line":"COMPLEX_OPERATORS \u003d [\u0027and\u0027, \u0027or\u0027]"},{"line_number":52,"context_line":"SIMPLE_OPERATORS \u003d [\"\u003d\", \"!\u003d\", \"\u003c\", \"\u003c\u003d\", \u0027\u003e\u0027, \u0027\u003e\u003d\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"_EVENT_SHOW_FIELDS \u003d [\u0027event_type\u0027, \u0027generated\u0027, \u0027traits\u0027, \u0027raw\u0027]"},{"line_number":55,"context_line":"_SAMPLE_SHOW_FIELDS \u003d [\u0027id\u0027, \u0027meter\u0027, \u0027volume\u0027, \u0027type\u0027, \u0027unit\u0027, \u0027source\u0027,"},{"line_number":56,"context_line":"                       \u0027resource_id\u0027, \u0027user_id\u0027, \u0027project_id\u0027, \u0027timestamp\u0027,"},{"line_number":57,"context_line":"                       \u0027recorded_at\u0027, \u0027metadata\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_853e5e8a","line":54,"in_reply_to":"3acd31a7_3f231958","updated":"2015-05-05 11:22:16.000000000","message":"I tried to make it re-usable, maybe I failed in that. I could refactor it to make it better, any suggestions? By the way, can you point me out to the neutron documentation? I could take a look.","commit_id":"5f43754c0099d101704ea5f35d4e35e5a2805281"}]}
