)]}'
{"neutron/db/securitygroups_db.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1a02ccf73e1c91511e8999802136e2fb2d9f9ecf","unresolved":false,"context_lines":[{"line_number":584,"context_line":"        # is changed which cannot be because other methods are already"},{"line_number":585,"context_line":"        # relying on this behavior. Therefore, we do the filtering"},{"line_number":586,"context_line":"        # below to check for these corner cases."},{"line_number":587,"context_line":"        rule_dict \u003d security_group_rule[\u0027security_group_rule\u0027].copy()"},{"line_number":588,"context_line":"        sg_protocol \u003d rule_dict.pop(\u0027protocol\u0027, None)"},{"line_number":589,"context_line":"        for db_rule in db_rules:"},{"line_number":590,"context_line":"            rule_id \u003d db_rule.pop(\u0027id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_9a47d24a","line":587,"range":{"start_line":587,"start_character":20,"end_line":587,"end_character":67},"updated":"2016-04-05 15:14:46.000000000","message":"This is a much better way to go about this.","commit_id":"5a41caa47a080fdbc1801e2771163734b9790c57"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"60992436813319e0c86fcb127ee260982acbb336","unresolved":false,"context_lines":[{"line_number":584,"context_line":"        # is changed which cannot be because other methods are already"},{"line_number":585,"context_line":"        # relying on this behavior. Therefore, we do the filtering"},{"line_number":586,"context_line":"        # below to check for these corner cases."},{"line_number":587,"context_line":"        rule_dict \u003d security_group_rule[\u0027security_group_rule\u0027].copy()"},{"line_number":588,"context_line":"        sg_protocol \u003d rule_dict.pop(\u0027protocol\u0027, None)"},{"line_number":589,"context_line":"        for db_rule in db_rules:"},{"line_number":590,"context_line":"            rule_id \u003d db_rule.pop(\u0027id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_d0776b9d","line":587,"range":{"start_line":587,"start_character":20,"end_line":587,"end_character":67},"in_reply_to":"9a061dce_9a47d24a","updated":"2016-04-05 15:43:52.000000000","message":"do we need a deepcopy here?","commit_id":"5a41caa47a080fdbc1801e2771163734b9790c57"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"f8b28ebfd3a0de78048e00e13fe6a5de904623a1","unresolved":false,"context_lines":[{"line_number":584,"context_line":"        # is changed which cannot be because other methods are already"},{"line_number":585,"context_line":"        # relying on this behavior. Therefore, we do the filtering"},{"line_number":586,"context_line":"        # below to check for these corner cases."},{"line_number":587,"context_line":"        rule_dict \u003d security_group_rule[\u0027security_group_rule\u0027].copy()"},{"line_number":588,"context_line":"        sg_protocol \u003d rule_dict.pop(\u0027protocol\u0027, None)"},{"line_number":589,"context_line":"        for db_rule in db_rules:"},{"line_number":590,"context_line":"            rule_id \u003d db_rule.pop(\u0027id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_e9e9ea1b","line":587,"range":{"start_line":587,"start_character":20,"end_line":587,"end_character":67},"in_reply_to":"9a061dce_d0776b9d","updated":"2016-04-05 16:22:26.000000000","message":"This is reasonable for me. We need to compare db_protocol with sg_protocol and rule_dict with db_rule without changing security_group_rule passed as argument.","commit_id":"5a41caa47a080fdbc1801e2771163734b9790c57"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cb1725f871b5112ec0e65e6950ceee0259546ae5","unresolved":false,"context_lines":[{"line_number":584,"context_line":"        # is changed which cannot be because other methods are already"},{"line_number":585,"context_line":"        # relying on this behavior. Therefore, we do the filtering"},{"line_number":586,"context_line":"        # below to check for these corner cases."},{"line_number":587,"context_line":"        rule_dict \u003d security_group_rule[\u0027security_group_rule\u0027].copy()"},{"line_number":588,"context_line":"        sg_protocol \u003d rule_dict.pop(\u0027protocol\u0027, None)"},{"line_number":589,"context_line":"        for db_rule in db_rules:"},{"line_number":590,"context_line":"            rule_id \u003d db_rule.pop(\u0027id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_c93a2698","line":587,"range":{"start_line":587,"start_character":20,"end_line":587,"end_character":67},"in_reply_to":"9a061dce_e9e9ea1b","updated":"2016-04-05 16:24:32.000000000","message":"garyk, since we just pop out protocol and don\u0027t modify any other key *contents*, it should be fine to have just .copy()","commit_id":"5a41caa47a080fdbc1801e2771163734b9790c57"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"60992436813319e0c86fcb127ee260982acbb336","unresolved":false,"context_lines":[{"line_number":593,"context_line":"            is_protocol_matching \u003d ("},{"line_number":594,"context_line":"                self._get_ip_proto_name_and_num(db_protocol) \u003d\u003d"},{"line_number":595,"context_line":"                self._get_ip_proto_name_and_num(sg_protocol))"},{"line_number":596,"context_line":"            if (is_protocol_matching and rule_dict \u003d\u003d db_rule):"},{"line_number":597,"context_line":"                raise ext_sg.SecurityGroupRuleExists(rule_id\u003drule_id)"},{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    def _validate_ip_prefix(self, rule):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_b063d7db","line":596,"updated":"2016-04-05 15:43:52.000000000","message":"minor nit but you do not need the brackets","commit_id":"5a41caa47a080fdbc1801e2771163734b9790c57"}],"neutron/tests/unit/db/test_securitygroups_db.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b3a1a9d48412d743ac91c5eacd704f68cbcb7152","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                self.mixin.create_security_group_rule("},{"line_number":92,"context_line":"                    self.ctx, mock.MagicMock())"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def test__check_for_duplicate_rules_in_db_does_not_drop_protocol(self):"},{"line_number":95,"context_line":"        with mock.patch.object(self.mixin, \u0027get_security_group_rules\u0027,"},{"line_number":96,"context_line":"                               return_value\u003d[mock.Mock()]):"},{"line_number":97,"context_line":"            context \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_f088af24","line":94,"updated":"2016-04-05 15:46:48.000000000","message":"would it be possible that we actually have a real check with the mocks here?","commit_id":"5a41caa47a080fdbc1801e2771163734b9790c57"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"2428b6e1817296b384d297117131afa30fce73cb","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                self.mixin.create_security_group_rule("},{"line_number":92,"context_line":"                    self.ctx, mock.MagicMock())"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def test__check_for_duplicate_rules_in_db_does_not_drop_protocol(self):"},{"line_number":95,"context_line":"        with mock.patch.object(self.mixin, \u0027get_security_group_rules\u0027,"},{"line_number":96,"context_line":"                               return_value\u003d[mock.Mock()]):"},{"line_number":97,"context_line":"            context \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_2774a1fb","line":94,"in_reply_to":"9a061dce_c96186aa","updated":"2016-04-05 20:37:12.000000000","message":"The test looks correct and effective to me.","commit_id":"5a41caa47a080fdbc1801e2771163734b9790c57"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cb1725f871b5112ec0e65e6950ceee0259546ae5","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                self.mixin.create_security_group_rule("},{"line_number":92,"context_line":"                    self.ctx, mock.MagicMock())"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def test__check_for_duplicate_rules_in_db_does_not_drop_protocol(self):"},{"line_number":95,"context_line":"        with mock.patch.object(self.mixin, \u0027get_security_group_rules\u0027,"},{"line_number":96,"context_line":"                               return_value\u003d[mock.Mock()]):"},{"line_number":97,"context_line":"            context \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_c96186aa","line":94,"in_reply_to":"9a061dce_f088af24","updated":"2016-04-05 16:24:32.000000000","message":"Can you elaborate? I don\u0027t think I follow.","commit_id":"5a41caa47a080fdbc1801e2771163734b9790c57"}]}
