)]}'
{"aodhclient/v2/alarm_cli.py":[{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"94896fc3d329136561ab7b175172b929d15c0735","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    create \u003d True"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def get_parser(self, prog_name):"},{"line_number":166,"context_line":"        parser \u003d _add_name_to_parser("},{"line_number":167,"context_line":"            super(CliAlarmCreate, self).get_parser(prog_name))"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        parser.add_argument(\u0027-t\u0027, \u0027--type\u0027, metavar\u003d\u0027\u003cTYPE\u003e\u0027,"},{"line_number":170,"context_line":"                            required\u003dself.create,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_8d1ab96d","line":167,"range":{"start_line":166,"start_character":17,"end_line":167,"end_character":62},"updated":"2016-04-27 05:41:36.000000000","message":"-1: required\u003dTrue","commit_id":"64aabf9ba3e99d6372803887ad8e8bb645a0d8ac"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"55dc0dd42dfa63185f41bf04ad212a9713f3dd20","unresolved":false,"context_lines":[{"line_number":409,"context_line":"            super(CliAlarmUpdate, self).get_parser(prog_name))"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    def take_action(self, parsed_args):"},{"line_number":412,"context_line":"        _check_name_and_id(parsed_args, \u0027update\u0027)"},{"line_number":413,"context_line":"        attributes \u003d self._alarm_from_args(parsed_args)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        if parsed_args.name:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_cc793895","line":412,"range":{"start_line":412,"start_character":8,"end_line":412,"end_character":48},"updated":"2016-04-28 01:11:13.000000000","message":"my test shows:\n\n$ aodh alarm list\n+--------------------------------------+-------+------+-------------------+----------+---------+\n| alarm_id                             | type  | name | state             | severity | enabled |\n+--------------------------------------+-------+------+-------------------+----------+---------+\n| e513e3d2-bd2d-4f75-8eae-e5dd3a09faab | event | test | alarm             | low      | True    |\n| 7d11ccb0-4cc6-43ed-bfea-1e31e90d0f94 | event | test | insufficient data | low      | True    |\n+--------------------------------------+-------+------+-------------------+----------+---------+\n\n$ aodh alarm update 7d11ccb0-4cc6-43ed-bfea-1e31e90d0f94 --name test-another                        \nYou should provide only one of alarm ID and alarm name(--name) to update an alarm.\n\nSo the check is actually not needed","commit_id":"d690abf1f7a519bab2fa5c82adfddf1f8f7ace84"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"55dc0dd42dfa63185f41bf04ad212a9713f3dd20","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        _check_name_and_id(parsed_args, \u0027update\u0027)"},{"line_number":413,"context_line":"        attributes \u003d self._alarm_from_args(parsed_args)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        if parsed_args.name:"},{"line_number":416,"context_line":"            _id \u003d _find_alarm_by_name(self.app.client.alarm,"},{"line_number":417,"context_line":"                                      parsed_args.id, True)"},{"line_number":418,"context_line":"        elif uuidutils.is_uuid_like(parsed_args.id):"},{"line_number":419,"context_line":"            try:"},{"line_number":420,"context_line":"                alarm \u003d self.app.client.alarm.update(alarm_id\u003dparsed_args.id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_8ce1002d","line":417,"range":{"start_line":415,"start_character":8,"end_line":417,"end_character":59},"updated":"2016-04-28 01:11:13.000000000","message":"for update case, we cannot treat name as priority option, because use may want to update the name field, with a new name, so we should not look up for this name","commit_id":"d690abf1f7a519bab2fa5c82adfddf1f8f7ace84"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"55dc0dd42dfa63185f41bf04ad212a9713f3dd20","unresolved":false,"context_lines":[{"line_number":423,"context_line":"                # Maybe it was not an ID but a name, damn"},{"line_number":424,"context_line":"                _id \u003d _find_alarm_by_name(self.app.client.alarm,"},{"line_number":425,"context_line":"                                          parsed_args.id, True)"},{"line_number":426,"context_line":"            else:"},{"line_number":427,"context_line":"                return self.dict2columns(_format_alarm(alarm))"},{"line_number":428,"context_line":"        else:"},{"line_number":429,"context_line":"            _id \u003d _find_alarm_by_name(self.app.client.alarm,"},{"line_number":430,"context_line":"                                      parsed_args.id, return_id\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_2c06ec1b","line":427,"range":{"start_line":426,"start_character":12,"end_line":427,"end_character":62},"updated":"2016-04-28 01:11:13.000000000","message":"is there any reason must put the return in the else block? I think put it in try logic can make it more readable (too many else) and reduce one extra line","commit_id":"d690abf1f7a519bab2fa5c82adfddf1f8f7ace84"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"8c2e8ef86ce9422c5d591c1e0bfaac5d739df0cb","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        elif parsed_args.id:"},{"line_number":425,"context_line":"            _id \u003d _find_alarm_by_name(self.app.client.alarm,"},{"line_number":426,"context_line":"                                      parsed_args.id, return_id\u003dTrue)"},{"line_number":427,"context_line":"        else:"},{"line_number":428,"context_line":"            # TODO(zqfan): what if user --name old_name --name new_name?"},{"line_number":429,"context_line":"            _id \u003d _find_alarm_by_name(self.app.client.alarm,"},{"line_number":430,"context_line":"                                      parsed_args.name, return_id\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_9ae632ae","line":427,"updated":"2016-04-28 20:32:45.000000000","message":"Don\u0027t have time to check right now, but I think update miss something. the ID argument should be required, because right now if you don\u0027t pass ID nor --name, well… it\u0027s not going to work since --update is not mandatory.\n\nSo that part does not seem right :)","commit_id":"b27c50ccb368c9e97f98ccb63eaa726e26e01b2d"}]}
