)]}'
{"tackerclient/common/validators.py":[{"author":{"_account_id":18955,"name":"dharmendra","email":"dharmendra.kushwaha@gmail.com","username":"dharmendra"},"change_message_id":"ea4ba658d630246b733adce134310d922e6e1674","unresolved":false,"context_lines":[{"line_number":70,"context_line":"             {\u0027attr_name\u0027: attr_name.replace(\u0027_\u0027, \u0027-\u0027), \u0027val\u0027: val}))"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def validate_file_size(file_name, size, unit):"},{"line_number":74,"context_line":"    file_size \u003d os.path.getsize(file_name)"},{"line_number":75,"context_line":"    if file_size \u003e size:"},{"line_number":76,"context_line":"        msg \u003d _(\u0027%(file_name)s exceeds maximum size (%(size)s %(unit)s)\u0027) \\"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_29af6f2c","line":73,"range":{"start_line":73,"start_character":40,"end_line":73,"end_character":45},"updated":"2016-07-15 05:52:45.000000000","message":"Why to pass unit here, if not used in size check?\n\nEx. A file with size just 2Bytes, will always raise error even we call validate_file_size(\u003cfile name\u003e, 1, \u0027Gb\u0027)\n\nPlease verify this.","commit_id":"25fd55e0fa48aabf31d2b782147310088f087607"},{"author":{"_account_id":9631,"name":"sajuptpm","email":"sajuptpm@gmail.com","username":"sajuptpm"},"change_message_id":"bc3b68d61601173f59886f9dd25e0ba866d0ab6d","unresolved":false,"context_lines":[{"line_number":70,"context_line":"             {\u0027attr_name\u0027: attr_name.replace(\u0027_\u0027, \u0027-\u0027), \u0027val\u0027: val}))"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def validate_file_size(file_name, size, unit):"},{"line_number":74,"context_line":"    file_size \u003d os.path.getsize(file_name)"},{"line_number":75,"context_line":"    if file_size \u003e size:"},{"line_number":76,"context_line":"        msg \u003d _(\u0027%(file_name)s exceeds maximum size (%(size)s %(unit)s)\u0027) \\"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_d2b80beb","line":73,"range":{"start_line":73,"start_character":40,"end_line":73,"end_character":45},"in_reply_to":"1aa78d24_29af6f2c","updated":"2016-07-15 09:18:27.000000000","message":"done, Please review it","commit_id":"25fd55e0fa48aabf31d2b782147310088f087607"},{"author":{"_account_id":18955,"name":"dharmendra","email":"dharmendra.kushwaha@gmail.com","username":"dharmendra"},"change_message_id":"ea4ba658d630246b733adce134310d922e6e1674","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    if file_size \u003e size:"},{"line_number":76,"context_line":"        msg \u003d _(\u0027%(file_name)s exceeds maximum size (%(size)s %(unit)s)\u0027) \\"},{"line_number":77,"context_line":"            % {\u0027file_name\u0027: file_name, \u0027size\u0027: size, \u0027unit\u0027: unit}"},{"line_number":78,"context_line":"        raise exceptions.CommandError(msg)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_e939e7f3","line":78,"range":{"start_line":78,"start_character":15,"end_line":78,"end_character":37},"updated":"2016-07-15 05:52:45.000000000","message":"Instead of raising CommandError, can we raise more accurate error like MaxSizeError/ValidationError?","commit_id":"25fd55e0fa48aabf31d2b782147310088f087607"},{"author":{"_account_id":9631,"name":"sajuptpm","email":"sajuptpm@gmail.com","username":"sajuptpm"},"change_message_id":"bc3b68d61601173f59886f9dd25e0ba866d0ab6d","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    if file_size \u003e size:"},{"line_number":76,"context_line":"        msg \u003d _(\u0027%(file_name)s exceeds maximum size (%(size)s %(unit)s)\u0027) \\"},{"line_number":77,"context_line":"            % {\u0027file_name\u0027: file_name, \u0027size\u0027: size, \u0027unit\u0027: unit}"},{"line_number":78,"context_line":"        raise exceptions.CommandError(msg)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_32c86f75","line":78,"range":{"start_line":78,"start_character":15,"end_line":78,"end_character":37},"in_reply_to":"1aa78d24_e939e7f3","updated":"2016-07-15 09:18:27.000000000","message":"done, Please review it","commit_id":"25fd55e0fa48aabf31d2b782147310088f087607"}],"tackerclient/tacker/v1_0/vm/vnfd.py":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"2e1a238d171e1a7d66f35b5e1ba14e28f52aba9a","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def args2body(self, parsed_args):"},{"line_number":62,"context_line":"        body \u003d {self.resource: {}}"},{"line_number":63,"context_line":"        if parsed_args.vnfd_file:"},{"line_number":64,"context_line":"            validators.validate_file_size(parsed_args.vnfd_file,"},{"line_number":65,"context_line":"                                          constants.UPLOAD_FILE_SIZE)"},{"line_number":66,"context_line":"            with open(parsed_args.vnfd_file) as f:"},{"line_number":67,"context_line":"                vnfd \u003d f.read()"}],"source_content_type":"text/x-python","patch_set":7,"id":"dada55a8_08447a72","line":64,"range":{"start_line":64,"start_character":23,"end_line":64,"end_character":41},"updated":"2016-07-18 05:00:04.000000000","message":"do this at API lever. Since API lever will probably be used by other projects, such as openstackclient.","commit_id":"b73d4e75dc596e27a5710f6ec8aaf5e415fc0910"},{"author":{"_account_id":9631,"name":"sajuptpm","email":"sajuptpm@gmail.com","username":"sajuptpm"},"change_message_id":"fb64f5d2bafee8ca552ee9d29a4e0227e193b118","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def args2body(self, parsed_args):"},{"line_number":62,"context_line":"        body \u003d {self.resource: {}}"},{"line_number":63,"context_line":"        if parsed_args.vnfd_file:"},{"line_number":64,"context_line":"            validators.validate_file_size(parsed_args.vnfd_file,"},{"line_number":65,"context_line":"                                          constants.UPLOAD_FILE_SIZE)"},{"line_number":66,"context_line":"            with open(parsed_args.vnfd_file) as f:"},{"line_number":67,"context_line":"                vnfd \u003d f.read()"}],"source_content_type":"text/x-python","patch_set":7,"id":"dada55a8_dc30640a","line":64,"range":{"start_line":64,"start_character":23,"end_line":64,"end_character":41},"in_reply_to":"dada55a8_08447a72","updated":"2016-07-18 07:46:13.000000000","message":"Thanks for reviewing this code.\nWe can add this check in openstackclient, right?\nWe can quickly show error message to user, If we do it in client side\nWe need to get it uploaded to server side to complete the validation there.\nWhat you think ?","commit_id":"b73d4e75dc596e27a5710f6ec8aaf5e415fc0910"},{"author":{"_account_id":9631,"name":"sajuptpm","email":"sajuptpm@gmail.com","username":"sajuptpm"},"change_message_id":"95052dd93ae4e4e65d54ead11f7aa9c9da224920","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def args2body(self, parsed_args):"},{"line_number":62,"context_line":"        body \u003d {self.resource: {}}"},{"line_number":63,"context_line":"        if parsed_args.vnfd_file:"},{"line_number":64,"context_line":"            validators.validate_file_size(parsed_args.vnfd_file,"},{"line_number":65,"context_line":"                                          constants.UPLOAD_FILE_SIZE)"},{"line_number":66,"context_line":"            with open(parsed_args.vnfd_file) as f:"},{"line_number":67,"context_line":"                vnfd \u003d f.read()"}],"source_content_type":"text/x-python","patch_set":7,"id":"dada55a8_47ac1c8c","line":64,"range":{"start_line":64,"start_character":23,"end_line":64,"end_character":41},"in_reply_to":"dada55a8_dc30640a","updated":"2016-07-20 11:06:15.000000000","message":"We have to use tackerclient in openstackclient.","commit_id":"b73d4e75dc596e27a5710f6ec8aaf5e415fc0910"}]}
