)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"82b8db5165d8a091c43ea39ef2c4b1373fbf547b","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"there are three reasons to return 400 other than correct the user\u0027s input"},{"line_number":17,"context_line":"in server side:"},{"line_number":18,"context_line":"* we cannot decide for the user, api needs explicit request"},{"line_number":19,"context_line":"* we should teach user to request properly to avoid handling same error"},{"line_number":20,"context_line":"* currently, there is no way to accept such request and return a warning,"},{"line_number":21,"context_line":"  if we return 201, the response body can only be an Alarm json dict"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAW3%2F%2FgFc%3D","line":18,"updated":"2014-04-14 07:22:56.000000000","message":"It\u0027s a special case here, as it will not change behavior, just removes unnecessary items from the alarm_ids list.","commit_id":"3a23fe0707010e4100fb32ba14dd306dd289bc0e"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"82b8db5165d8a091c43ea39ef2c4b1373fbf547b","unresolved":false,"context_lines":[{"line_number":16,"context_line":"there are three reasons to return 400 other than correct the user\u0027s input"},{"line_number":17,"context_line":"in server side:"},{"line_number":18,"context_line":"* we cannot decide for the user, api needs explicit request"},{"line_number":19,"context_line":"* we should teach user to request properly to avoid handling same error"},{"line_number":20,"context_line":"* currently, there is no way to accept such request and return a warning,"},{"line_number":21,"context_line":"  if we return 201, the response body can only be an Alarm json dict"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAW3%2F%2FgFU%3D","line":19,"updated":"2014-04-14 07:22:56.000000000","message":"Just like I mentioned above, there is no error in this case according to my knowledge.","commit_id":"3a23fe0707010e4100fb32ba14dd306dd289bc0e"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"82b8db5165d8a091c43ea39ef2c4b1373fbf547b","unresolved":false,"context_lines":[{"line_number":18,"context_line":"* we cannot decide for the user, api needs explicit request"},{"line_number":19,"context_line":"* we should teach user to request properly to avoid handling same error"},{"line_number":20,"context_line":"* currently, there is no way to accept such request and return a warning,"},{"line_number":21,"context_line":"  if we return 201, the response body can only be an Alarm json dict"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: Ic9392355e08834b4d01b0e421de1c77fed8ac5e4"},{"line_number":24,"context_line":"Closes-Bug: #1304886"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAW3%2F%2FgFI%3D","line":21,"updated":"2014-04-14 07:22:56.000000000","message":"If we return the modified alarm with a 201, then maybe it can be an info to the user that something happened with the original alarm.","commit_id":"3a23fe0707010e4100fb32ba14dd306dd289bc0e"}],"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"18fa19bb312ae825116fbdda43a6bfc6e8fa95b2","unresolved":false,"context_lines":[{"line_number":1927,"context_line":""},{"line_number":1928,"context_line":"        if \u0027combination\u0027 \u003d\u003d data.type:"},{"line_number":1929,"context_line":"            ids \u003d list(set(data.combination_rule.alarm_ids))"},{"line_number":1930,"context_line":"            data.combination_rule.alarm_ids \u003d ids"},{"line_number":1931,"context_line":""},{"line_number":1932,"context_line":"        old_alarm \u003d Alarm.from_db_model(alarm_in).as_dict(storage.models.Alarm)"},{"line_number":1933,"context_line":"        updated_alarm \u003d data.as_dict(storage.models.Alarm)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAW3%2F%2Fyzc%3D","line":1930,"updated":"2014-04-10 11:25:39.000000000","message":"Wouldn\u0027t the loss of ordering implicit in the usage of set here to de-dupe be surprising to users?\n\ni.e. if the combination alarm is based on underlying alarms:\n\n  [\u0027foo\u0027, \u0027bar\u0027, \u0027snafu\u0027, \u0027bar\u0027, \u0027snooze\u0027]\n\nwouldn\u0027t the user be surprised if the representation ends up as say:\n\n  [\u0027snooze\u0027, \u0027foo\u0027, \u0027bar\u0027, \u0027snafu\u0027]","commit_id":"b482198762fb69787149bee1161cf325b66b6ffa"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"97237c07f20e2214b0c62a4d6a7d6989d679e63a","unresolved":false,"context_lines":[{"line_number":1927,"context_line":""},{"line_number":1928,"context_line":"        if \u0027combination\u0027 \u003d\u003d data.type:"},{"line_number":1929,"context_line":"            ids \u003d list(set(data.combination_rule.alarm_ids))"},{"line_number":1930,"context_line":"            data.combination_rule.alarm_ids \u003d ids"},{"line_number":1931,"context_line":""},{"line_number":1932,"context_line":"        old_alarm \u003d Alarm.from_db_model(alarm_in).as_dict(storage.models.Alarm)"},{"line_number":1933,"context_line":"        updated_alarm \u003d data.as_dict(storage.models.Alarm)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAW3%2F%2FngM%3D","line":1930,"in_reply_to":"AAAAW3%2F%2Fyzc%3D","updated":"2014-04-11 17:42:11.000000000","message":"Done","commit_id":"b482198762fb69787149bee1161cf325b66b6ffa"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"e377a106a0b7ea1505bfa734e46c0171e91cdbe6","unresolved":false,"context_lines":[{"line_number":1570,"context_line":"    def as_dict(self):"},{"line_number":1571,"context_line":"        return self.as_dict_from_keys([\u0027operator\u0027, \u0027alarm_ids\u0027])"},{"line_number":1572,"context_line":""},{"line_number":1573,"context_line":"    def remove_duplicate_alarm_ids(self):"},{"line_number":1574,"context_line":"        if self.alarm_ids in (wtypes.Unset, None):"},{"line_number":1575,"context_line":"            return"},{"line_number":1576,"context_line":"        # remove duplicate alarm ids and keep the remain\u0027s order"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2FoSA%3D","line":1573,"updated":"2014-04-11 15:18:56.000000000","message":"What about moving this function to utils as a general \u0027remove duplicates from list\u0027 as the \u0027uniq\u0027 function here: https://github.com/openstack/ceilometer/blob/master/ceilometer/utils.py#L174 ?","commit_id":"6eb8427cd0a647fa2ff5e3c4c90299b350574d73"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"3cd94a97005f59b1bace80ae41cac3df7025b96c","unresolved":false,"context_lines":[{"line_number":1570,"context_line":"    def as_dict(self):"},{"line_number":1571,"context_line":"        return self.as_dict_from_keys([\u0027operator\u0027, \u0027alarm_ids\u0027])"},{"line_number":1572,"context_line":""},{"line_number":1573,"context_line":"    def remove_duplicate_alarm_ids(self):"},{"line_number":1574,"context_line":"        if self.alarm_ids in (wtypes.Unset, None):"},{"line_number":1575,"context_line":"            return"},{"line_number":1576,"context_line":"        # remove duplicate alarm ids and keep the remain\u0027s order"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2FnN8%3D","line":1573,"in_reply_to":"AAAAW3%2F%2FoSA%3D","updated":"2014-04-11 18:32:37.000000000","message":"Done","commit_id":"6eb8427cd0a647fa2ff5e3c4c90299b350574d73"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"e377a106a0b7ea1505bfa734e46c0171e91cdbe6","unresolved":false,"context_lines":[{"line_number":1573,"context_line":"    def remove_duplicate_alarm_ids(self):"},{"line_number":1574,"context_line":"        if self.alarm_ids in (wtypes.Unset, None):"},{"line_number":1575,"context_line":"            return"},{"line_number":1576,"context_line":"        # remove duplicate alarm ids and keep the remain\u0027s order"},{"line_number":1577,"context_line":"        d \u003d collections.OrderedDict((_id, None) for _id in self.alarm_ids)"},{"line_number":1578,"context_line":"        self.alarm_ids \u003d d.keys()"},{"line_number":1579,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2FoQ4%3D","line":1576,"updated":"2014-04-11 15:18:56.000000000","message":"s/the remain\u0027s order/the order of the remaining/","commit_id":"6eb8427cd0a647fa2ff5e3c4c90299b350574d73"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"bc58ddffb46289a922aae57f84d310801a15593f","unresolved":false,"context_lines":[{"line_number":1572,"context_line":"    @staticmethod"},{"line_number":1573,"context_line":"    def validate(rule):"},{"line_number":1574,"context_line":"        if rule.alarm_ids !\u003d utils.get_unique_list(rule.alarm_ids):"},{"line_number":1575,"context_line":"            raise ClientSideError(_(\u0027Duplicate alarm ids are detected in \u0027"},{"line_number":1576,"context_line":"                                    \u0027alarm_ids: %s\u0027) % rule.alarm_ids)"},{"line_number":1577,"context_line":"        return rule"},{"line_number":1578,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAW3%2F%2FhxQ%3D","line":1575,"updated":"2014-04-13 19:27:10.000000000","message":"I\u0027m not 100% sure that this requires a validation Error here, as this issue does not cause an error in the operation, it just makes the definition of the alarm cleaner. So it looks more a Warning log situation to me. What do you think?","commit_id":"b8aa2329a994abf936b4983a0776c818e88fc456"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"102609ce524f35b4400107f2663d0a78c17ad137","unresolved":false,"context_lines":[{"line_number":1572,"context_line":"    @staticmethod"},{"line_number":1573,"context_line":"    def validate(rule):"},{"line_number":1574,"context_line":"        if rule.alarm_ids !\u003d utils.get_unique_list(rule.alarm_ids):"},{"line_number":1575,"context_line":"            raise ClientSideError(_(\u0027Duplicate alarm ids are detected in \u0027"},{"line_number":1576,"context_line":"                                    \u0027alarm_ids: %s\u0027) % rule.alarm_ids)"},{"line_number":1577,"context_line":"        return rule"},{"line_number":1578,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAW3%2F%2FhvA%3D","line":1575,"in_reply_to":"AAAAW3%2F%2Fhv0%3D","updated":"2014-04-13 19:53:54.000000000","message":"s/good at/better than/\n\nsorry","commit_id":"b8aa2329a994abf936b4983a0776c818e88fc456"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"aaa9483f99931d7fc2d72d34a177eb7f55af2b10","unresolved":false,"context_lines":[{"line_number":1572,"context_line":"    @staticmethod"},{"line_number":1573,"context_line":"    def validate(rule):"},{"line_number":1574,"context_line":"        if rule.alarm_ids !\u003d utils.get_unique_list(rule.alarm_ids):"},{"line_number":1575,"context_line":"            raise ClientSideError(_(\u0027Duplicate alarm ids are detected in \u0027"},{"line_number":1576,"context_line":"                                    \u0027alarm_ids: %s\u0027) % rule.alarm_ids)"},{"line_number":1577,"context_line":"        return rule"},{"line_number":1578,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAW3%2F%2Fhv0%3D","line":1575,"in_reply_to":"AAAAW3%2F%2FhxQ%3D","updated":"2014-04-13 19:46:03.000000000","message":"I agree with @Nadya\nthere are three reasons to return 400 other than correct the user\u0027s input in server side:\n* we cannot decide for the user, api needs explicit request\n* we should teach user to request properly to avoid handling same error\n* currently, there is no way to accept such request and return a warning, if we return 201, the response body can only be an Alarm json dict\n\nso I think raise a 400 may be good at log a warning\n\nwhat\u0027s your opinion?\n\nI will upload a new patchset to add the mentioned reasons to commit message, if that flush your -1, please re-add it, thanks","commit_id":"b8aa2329a994abf936b4983a0776c818e88fc456"}],"ceilometer/tests/api/v2/test_alarm_scenarios.py":[{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"8c4fca80fcbdb0d14eb4a4b772c505887c1acce7","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"            \u0027name\u0027: \u0027dup_alarm_id\u0027,"},{"line_number":1185,"context_line":"            \u0027type\u0027: \u0027combination\u0027,"},{"line_number":1186,"context_line":"            \u0027combination_rule\u0027: {"},{"line_number":1187,"context_line":"                \u0027alarm_ids\u0027: [\u0027a\u0027, \u0027a\u0027, \u0027a\u0027, \u0027b\u0027, \u0027b\u0027, \u0027c\u0027],"},{"line_number":1188,"context_line":"            }"},{"line_number":1189,"context_line":"        }"},{"line_number":1190,"context_line":"        self.post_json(\u0027/alarms\u0027, params\u003djson_body, status\u003d201,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2FW0Q%3D","line":1187,"updated":"2014-04-15 07:36:53.000000000","message":"It would be good to add a test with test data that is not in alphabetical order and maybe containing numbers also, etc, which is closer to the real alarm ids.","commit_id":"ed2c1a7d5bd7e956db0d243634a0c87a0df13d92"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"530b644f164da6447a1d260246b567b7487f1bf3","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"            \u0027name\u0027: \u0027dup_alarm_id\u0027,"},{"line_number":1185,"context_line":"            \u0027type\u0027: \u0027combination\u0027,"},{"line_number":1186,"context_line":"            \u0027combination_rule\u0027: {"},{"line_number":1187,"context_line":"                \u0027alarm_ids\u0027: [\u0027a\u0027, \u0027a\u0027, \u0027a\u0027, \u0027b\u0027, \u0027b\u0027, \u0027c\u0027],"},{"line_number":1188,"context_line":"            }"},{"line_number":1189,"context_line":"        }"},{"line_number":1190,"context_line":"        self.post_json(\u0027/alarms\u0027, params\u003djson_body, status\u003d201,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2FO%2F4%3D","line":1187,"in_reply_to":"AAAAW3%2F%2FSS0%3D","updated":"2014-04-15 21:39:48.000000000","message":"If we would target the more complex alarm ids, then it would definitely need more sample alarms with new ids. So I did not think about anything complex, and as I mentioned before, the non-alphabetical ordered alarm_ids list will serve our needs here perfectly IMHO.\n\nThanks for yours also, I could have been more clear too. :)","commit_id":"ed2c1a7d5bd7e956db0d243634a0c87a0df13d92"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"69dc85401140cb39899ee9ad5210d933c9086c6f","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"            \u0027name\u0027: \u0027dup_alarm_id\u0027,"},{"line_number":1185,"context_line":"            \u0027type\u0027: \u0027combination\u0027,"},{"line_number":1186,"context_line":"            \u0027combination_rule\u0027: {"},{"line_number":1187,"context_line":"                \u0027alarm_ids\u0027: [\u0027a\u0027, \u0027a\u0027, \u0027a\u0027, \u0027b\u0027, \u0027b\u0027, \u0027c\u0027],"},{"line_number":1188,"context_line":"            }"},{"line_number":1189,"context_line":"        }"},{"line_number":1190,"context_line":"        self.post_json(\u0027/alarms\u0027, params\u003djson_body, status\u003d201,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2FSS0%3D","line":1187,"in_reply_to":"AAAAW3%2F%2FT0E%3D","updated":"2014-04-15 15:13:37.000000000","message":"as I mentioned before, the alarm id in alarm_ids **must exists**, otherwise the post will raise a 400 error, so I cannot directly use something like [\u0027a\u0027, \u0027123\u0027, \u0027a123bc2d2\u0027]. We only have 4 samples, all of them use single character as alarm_id, so if we want alarm id to be more complex, the way are adding new sample or creating real alarm\n\nor, am I misunderstanding something?\n\nthanks for your great patience :)","commit_id":"ed2c1a7d5bd7e956db0d243634a0c87a0df13d92"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"8ae41a2e5e9b2cee7e6d73c29b762eb8c297340b","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"            \u0027name\u0027: \u0027dup_alarm_id\u0027,"},{"line_number":1185,"context_line":"            \u0027type\u0027: \u0027combination\u0027,"},{"line_number":1186,"context_line":"            \u0027combination_rule\u0027: {"},{"line_number":1187,"context_line":"                \u0027alarm_ids\u0027: [\u0027a\u0027, \u0027a\u0027, \u0027a\u0027, \u0027b\u0027, \u0027b\u0027, \u0027c\u0027],"},{"line_number":1188,"context_line":"            }"},{"line_number":1189,"context_line":"        }"},{"line_number":1190,"context_line":"        self.post_json(\u0027/alarms\u0027, params\u003djson_body, status\u003d201,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2FT0E%3D","line":1187,"in_reply_to":"AAAAW3%2F%2FUWI%3D","updated":"2014-04-15 12:53:20.000000000","message":"I think we misunderstood each other a bit. So originally I wanted to ask you to apply non-alphabetical order in the alarm_ids list also. An additional idea of mine was to use something more complex, than one letter, maybe numbers included, but it was just a quick minor idea. And then you mentioned the UUIDs, which maybe would not be bad, to have something that looks like UUIDs, but I\u0027m not sure also that it would be a real added value on this level of testing. So I think if the non-alphabetical order is done, then this patch is fine.","commit_id":"ed2c1a7d5bd7e956db0d243634a0c87a0df13d92"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"995ac49c867cd097a909fe055ed9d26dd591da91","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"            \u0027name\u0027: \u0027dup_alarm_id\u0027,"},{"line_number":1185,"context_line":"            \u0027type\u0027: \u0027combination\u0027,"},{"line_number":1186,"context_line":"            \u0027combination_rule\u0027: {"},{"line_number":1187,"context_line":"                \u0027alarm_ids\u0027: [\u0027a\u0027, \u0027a\u0027, \u0027a\u0027, \u0027b\u0027, \u0027b\u0027, \u0027c\u0027],"},{"line_number":1188,"context_line":"            }"},{"line_number":1189,"context_line":"        }"},{"line_number":1190,"context_line":"        self.post_json(\u0027/alarms\u0027, params\u003djson_body, status\u003d201,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2FUWI%3D","line":1187,"in_reply_to":"AAAAW3%2F%2FVuM%3D","updated":"2014-04-15 11:55:57.000000000","message":"hi, Ildiko\n\nthe non-alphabetical ordered alarm_ids is really reasonable, so i will do it.\n\nThe uuid like id needs a new created alarm, which means another post. But in such case, we use a real id created by source code, and we have no way to check what it is (random), only can use new_created_alarm.alarm_id to check the value is not modified after filter duplicate operation.  If that is what you mean, it\u0027s quite simple, and can be done too. But I think it may not be so useful. Do I explain it clearly enough? ....\n\nchange sample id to real uuid like format can be another patch\n\nthanks","commit_id":"ed2c1a7d5bd7e956db0d243634a0c87a0df13d92"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"0c959af6d2c4a37588277296271d68426726abd2","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"            \u0027name\u0027: \u0027dup_alarm_id\u0027,"},{"line_number":1185,"context_line":"            \u0027type\u0027: \u0027combination\u0027,"},{"line_number":1186,"context_line":"            \u0027combination_rule\u0027: {"},{"line_number":1187,"context_line":"                \u0027alarm_ids\u0027: [\u0027a\u0027, \u0027a\u0027, \u0027a\u0027, \u0027b\u0027, \u0027b\u0027, \u0027c\u0027],"},{"line_number":1188,"context_line":"            }"},{"line_number":1189,"context_line":"        }"},{"line_number":1190,"context_line":"        self.post_json(\u0027/alarms\u0027, params\u003djson_body, status\u003d201,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2FWAA%3D","line":1187,"in_reply_to":"AAAAW3%2F%2FW0Q%3D","updated":"2014-04-15 09:08:57.000000000","message":"hi, Ildiko\n\nthe problem is that for now it will check the alarm in alarm_ids, it must exists, and since we only have 4 samples, so here is the only choice\n\nbut we can modify existent alarm\u0027s id to uuid like format\nor simply create new alarm which will have no impact to other test code, but i think it is not necessary\n\nI prefer the first one, because I think sample for test code should be close to real one","commit_id":"ed2c1a7d5bd7e956db0d243634a0c87a0df13d92"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"54415743c5b953c773288b32590acb480a4730f7","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"            \u0027name\u0027: \u0027dup_alarm_id\u0027,"},{"line_number":1185,"context_line":"            \u0027type\u0027: \u0027combination\u0027,"},{"line_number":1186,"context_line":"            \u0027combination_rule\u0027: {"},{"line_number":1187,"context_line":"                \u0027alarm_ids\u0027: [\u0027a\u0027, \u0027a\u0027, \u0027a\u0027, \u0027b\u0027, \u0027b\u0027, \u0027c\u0027],"},{"line_number":1188,"context_line":"            }"},{"line_number":1189,"context_line":"        }"},{"line_number":1190,"context_line":"        self.post_json(\u0027/alarms\u0027, params\u003djson_body, status\u003d201,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2FVuM%3D","line":1187,"in_reply_to":"AAAAW3%2F%2FWAA%3D","updated":"2014-04-15 09:34:19.000000000","message":"For this patch I think it would be enough to add a test with a non-alphabetical ordered alarm_ids list and also another, with one alarm with UUID like id in the alarm_ids list. I did not want change everything here, the include more realistic test data was a quick idea.\n\nIf you\u0027re willing to change the alarm ids in the currently existing sample alarms, I\u0027m not against, I\u0027m just not 100% sure that it is the scope of this patch, I let you to decide. :)","commit_id":"ed2c1a7d5bd7e956db0d243634a0c87a0df13d92"}],"ceilometer/utils.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c358855ccf02acd30610ed40a2915ced5141bd47","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    return deduped"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"def get_unique_list(duplicated_list):"},{"line_number":187,"context_line":"    if duplicated_list is None:"},{"line_number":188,"context_line":"        return"},{"line_number":189,"context_line":"    unique_list \u003d []"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAW3%2F%2FdXw%3D","line":186,"updated":"2014-04-14 13:23:35.000000000","message":"You just implemented set() right?","commit_id":"3a23fe0707010e4100fb32ba14dd306dd289bc0e"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"3ba949d1674407bd219e937115abed1b58b7500c","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    return deduped"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"def get_unique_list(duplicated_list):"},{"line_number":187,"context_line":"    if duplicated_list is None:"},{"line_number":188,"context_line":"        return"},{"line_number":189,"context_line":"    unique_list \u003d []"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAW3%2F%2FXyQ%3D","line":186,"in_reply_to":"AAAAW3%2F%2FX6g%3D","updated":"2014-04-15 04:12:36.000000000","message":"yes, it cleaner!\n\nit still only accept hashable element, but since for now there is no unhashable case in this patch, I think it is good to remove this function\n\nthanks a lot\n\nps: sorted will return a list, so the outer list wrapper is redundant","commit_id":"3a23fe0707010e4100fb32ba14dd306dd289bc0e"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"74d428365cdf800e27439d0ec6cf68cafe806ac2","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    return deduped"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"def get_unique_list(duplicated_list):"},{"line_number":187,"context_line":"    if duplicated_list is None:"},{"line_number":188,"context_line":"        return"},{"line_number":189,"context_line":"    unique_list \u003d []"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAW3%2F%2FX6g%3D","line":186,"in_reply_to":"AAAAW3%2F%2FcSw%3D","updated":"2014-04-15 03:16:08.000000000","message":"If you just want to keep the order of the list, here is simple way:\n\nlist(sorted(set(duplicated_list), key\u003dduplicated_list.index))\n\nMy Best, liu sheng","commit_id":"3a23fe0707010e4100fb32ba14dd306dd289bc0e"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"dd8d9f6a47ce56beca58e626e71f1fddd0834beb","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    return deduped"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"def get_unique_list(duplicated_list):"},{"line_number":187,"context_line":"    if duplicated_list is None:"},{"line_number":188,"context_line":"        return"},{"line_number":189,"context_line":"    unique_list \u003d []"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAW3%2F%2FcSw%3D","line":186,"in_reply_to":"AAAAW3%2F%2FdXw%3D","updated":"2014-04-14 15:17:13.000000000","message":"I think the \u0027and\u0027 and \u0027or\u0027 operator will have same effect for different order when evaluate alarm, but it seems the side effect of order adjust is not necessary, so i keep the original order, as @Eoghan Glynn pointed out, not surprise the user\n\nkeep order is the main reason, the other reason is that set only supports hashable list element, this function supports unhashable list element, although currently there is no such use case","commit_id":"3a23fe0707010e4100fb32ba14dd306dd289bc0e"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a38efd6fec78ee96c38943c646931d1e1c1bc62a","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    return deduped"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"def get_unique_list(duplicated_list):"},{"line_number":187,"context_line":"    if duplicated_list is None:"},{"line_number":188,"context_line":"        return"},{"line_number":189,"context_line":"    unique_list \u003d []"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAW3%2F%2FdMo%3D","line":186,"in_reply_to":"AAAAW3%2F%2FdXw%3D","updated":"2014-04-14 13:48:07.000000000","message":"There was a comment in the first patch set about keeping the order of the specified alarm ids in the alarm_ids list: https://review.openstack.org/#/c/86501/1/ceilometer/api/controllers/v2.py","commit_id":"3a23fe0707010e4100fb32ba14dd306dd289bc0e"}]}
