)]}'
{"neutron/db/securitygroups_db.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"085a93ffad7779721924415186868f48dba97a00","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        # fetch sg from db to load the sg rules with sg model."},{"line_number":126,"context_line":"        sg \u003d sg_obj.SecurityGroup.get_object(context, id\u003dsg.id)"},{"line_number":127,"context_line":"        secgroup_dict \u003d self._make_security_group_dict(context, sg.db_obj)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        kwargs[\u0027security_group\u0027] \u003d secgroup_dict"},{"line_number":130,"context_line":"        registry.notify(resources.SECURITY_GROUP, events.AFTER_CREATE, self,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_f971af77","line":127,"updated":"2017-06-15 13:30:24.000000000","message":"sg.db_obj is supposed to be a sqla model already.","commit_id":"962ed0159784d696a6a4a274768a0a7b9717620c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4cbbd21e199f9d9caf354478d077b69c81e6399a","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        # fetch sg from db to load the sg rules with sg model."},{"line_number":126,"context_line":"        sg \u003d sg_obj.SecurityGroup.get_object(context, id\u003dsg.id)"},{"line_number":127,"context_line":"        secgroup_dict \u003d self._make_security_group_dict(context, sg.db_obj)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        kwargs[\u0027security_group\u0027] \u003d secgroup_dict"},{"line_number":130,"context_line":"        registry.notify(resources.SECURITY_GROUP, events.AFTER_CREATE, self,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_44a7960c","line":127,"in_reply_to":"7f231b9d_f971af77","updated":"2017-06-15 13:50:40.000000000","message":"Done","commit_id":"962ed0159784d696a6a4a274768a0a7b9717620c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"085a93ffad7779721924415186868f48dba97a00","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        try:"},{"line_number":178,"context_line":"            with db_api.context_manager.reader.using(context):"},{"line_number":179,"context_line":"                ret \u003d self._make_security_group_dict("},{"line_number":180,"context_line":"                    context, self._get_security_group(context, id), fields)"},{"line_number":181,"context_line":"                ret[\u0027security_group_rules\u0027] \u003d self.get_security_group_rules("},{"line_number":182,"context_line":"                    context, {\u0027security_group_id\u0027: [id]})"},{"line_number":183,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_d96a737f","line":180,"updated":"2017-06-15 13:30:24.000000000","message":"yeah, here is a problem, we should pass .db_obj","commit_id":"962ed0159784d696a6a4a274768a0a7b9717620c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4cbbd21e199f9d9caf354478d077b69c81e6399a","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        try:"},{"line_number":178,"context_line":"            with db_api.context_manager.reader.using(context):"},{"line_number":179,"context_line":"                ret \u003d self._make_security_group_dict("},{"line_number":180,"context_line":"                    context, self._get_security_group(context, id), fields)"},{"line_number":181,"context_line":"                ret[\u0027security_group_rules\u0027] \u003d self.get_security_group_rules("},{"line_number":182,"context_line":"                    context, {\u0027security_group_id\u0027: [id]})"},{"line_number":183,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_24b01a43","line":180,"in_reply_to":"7f231b9d_d96a737f","updated":"2017-06-15 13:50:40.000000000","message":"Done","commit_id":"962ed0159784d696a6a4a274768a0a7b9717620c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"085a93ffad7779721924415186868f48dba97a00","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                    exc_cls\u003dext_sg.SecurityGroupConflict, **kwargs)"},{"line_number":255,"context_line":"            sg.update_fields(s)"},{"line_number":256,"context_line":"            sg.update()"},{"line_number":257,"context_line":"        sg_dict \u003d self._make_security_group_dict(context, sg)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        kwargs[\u0027security_group\u0027] \u003d sg_dict"},{"line_number":260,"context_line":"        registry.notify(resources.SECURITY_GROUP, events.AFTER_UPDATE, self,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f231b9d_99063bce","line":257,"updated":"2017-06-15 13:30:24.000000000","message":"ditto","commit_id":"962ed0159784d696a6a4a274768a0a7b9717620c"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"ceb8c30c22c4c9a3273662b156c3ffcb6983a2ce","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                                  **kwargs)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        # fetch sg from db to load the sg rules with sg model."},{"line_number":125,"context_line":"        sg \u003d sg_obj.SecurityGroup.get_object(context, id\u003dsg.id)"},{"line_number":126,"context_line":"        secgroup_dict \u003d self._make_security_group_dict(sg)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        kwargs[\u0027security_group\u0027] \u003d secgroup_dict"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f231b9d_aae3d033","line":125,"range":{"start_line":125,"start_character":8,"end_line":125,"end_character":63},"updated":"2017-06-15 16:21:09.000000000","message":"this can be removed as well, this re-fetch was done to load rules with models","commit_id":"0ebb462661e4311af782b5707bac4ad2e5a12904"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"9019b157033143e2722aa9d4972663e4c38fc29e","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                                  **kwargs)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        # fetch sg from db to load the sg rules with sg model."},{"line_number":125,"context_line":"        sg \u003d sg_obj.SecurityGroup.get_object(context, id\u003dsg.id)"},{"line_number":126,"context_line":"        secgroup_dict \u003d self._make_security_group_dict(sg)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        kwargs[\u0027security_group\u0027] \u003d secgroup_dict"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f231b9d_db3940d7","line":125,"range":{"start_line":125,"start_character":8,"end_line":125,"end_character":63},"in_reply_to":"7f231b9d_0557555a","updated":"2017-06-15 17:44:38.000000000","message":"I added this fetch only to load rules with db_obj, since its no longer used, it can be removed,  testing will make sure if it is needed or not.","commit_id":"0ebb462661e4311af782b5707bac4ad2e5a12904"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"944c876031e549715b829398357a2166da8e83b1","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                                  **kwargs)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        # fetch sg from db to load the sg rules with sg model."},{"line_number":125,"context_line":"        sg \u003d sg_obj.SecurityGroup.get_object(context, id\u003dsg.id)"},{"line_number":126,"context_line":"        secgroup_dict \u003d self._make_security_group_dict(sg)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        kwargs[\u0027security_group\u0027] \u003d secgroup_dict"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f231b9d_0557555a","line":125,"range":{"start_line":125,"start_character":8,"end_line":125,"end_character":63},"in_reply_to":"7f231b9d_aae3d033","updated":"2017-06-15 16:57:20.000000000","message":"i will need to check that. without the fetch with the rules below things were breaking (line 392)","commit_id":"0ebb462661e4311af782b5707bac4ad2e5a12904"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e547fbf23e843dfb45dc72df36a30a00601b5ef3","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        # fetch sg from db to load the sg rules with sg model."},{"line_number":125,"context_line":"        sg \u003d sg_obj.SecurityGroup.get_object(context, id\u003dsg.id)"},{"line_number":126,"context_line":"        secgroup_dict \u003d self._make_security_group_dict(sg)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        kwargs[\u0027security_group\u0027] \u003d secgroup_dict"},{"line_number":129,"context_line":"        registry.notify(resources.SECURITY_GROUP, events.AFTER_CREATE, self,"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f231b9d_1bb8d8e2","line":126,"updated":"2017-06-15 17:58:26.000000000","message":"I thought the issue was that _make_security_group_dict needed a DB object, isn\u0027t this changing it to OVO?","commit_id":"0ebb462661e4311af782b5707bac4ad2e5a12904"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e547fbf23e843dfb45dc72df36a30a00601b5ef3","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        sg_objs \u003d sg_obj.SecurityGroup.get_objects("},{"line_number":155,"context_line":"            context, _pager\u003dpager, validate_filters\u003dFalse, **filters)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        return [self._make_security_group_dict(obj, fields)"},{"line_number":158,"context_line":"                for obj in sg_objs]"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    @db_api.retry_if_session_inactive()"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f231b9d_fbd07c21","line":157,"updated":"2017-06-15 17:58:26.000000000","message":"why this whitespace change?","commit_id":"0ebb462661e4311af782b5707bac4ad2e5a12904"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e547fbf23e843dfb45dc72df36a30a00601b5ef3","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                              exc_cls\u003dext_sg.SecurityGroupConflict, **kwargs)"},{"line_number":392,"context_line":"        # fetch sg_rule from db to load the sg rules with sg model."},{"line_number":393,"context_line":"        sg_rule \u003d sg_obj.SecurityGroupRule.get_object(context, id\u003dsg_rule.id)"},{"line_number":394,"context_line":"        return self._make_security_group_rule_dict(sg_rule)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    def _get_ip_proto_number(self, protocol):"},{"line_number":397,"context_line":"        if protocol is None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f231b9d_dbcdc085","line":394,"updated":"2017-06-15 17:58:26.000000000","message":"Same here, i thought you wanted DB objects and not OVOs?","commit_id":"0ebb462661e4311af782b5707bac4ad2e5a12904"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"82de0d7f845e1dedcc6681e81653e11f8b6e0949","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        res[\u0027security_group_rules\u0027] \u003d [self._make_security_group_rule_dict(r)"},{"line_number":269,"context_line":"                                       for r in security_group.rules]"},{"line_number":270,"context_line":"        resource_extend.apply_funcs(ext_sg.SECURITYGROUPS, res,"},{"line_number":271,"context_line":"                                    security_group.db_obj)"},{"line_number":272,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f231b9d_e1bfa65e","line":271,"updated":"2017-06-15 20:54:19.000000000","message":"It still seems like we are inconsistent here. This is passing a db_obj into the extension function and others are passing OVO objects.\n\nWhich one do you want?","commit_id":"bb2dd990723521be7716156b9098cc380eb8f7d2"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"50958ce3a05ed2a7758e4bc2552fc904b3ca2c19","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        res[\u0027security_group_rules\u0027] \u003d [self._make_security_group_rule_dict(r)"},{"line_number":269,"context_line":"                                       for r in security_group.rules]"},{"line_number":270,"context_line":"        resource_extend.apply_funcs(ext_sg.SECURITYGROUPS, res,"},{"line_number":271,"context_line":"                                    security_group.db_obj)"},{"line_number":272,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f231b9d_4e72feae","line":271,"in_reply_to":"7f231b9d_1368b1b6","updated":"2017-06-16 04:49:40.000000000","message":"I am really confused.\n\nmethods decorated by @resource_extend.extends is expected to have db object as the second parameter, and apply_funcs take db object as the third parameter. It is consistent.\n\nWhat confuses me is why we switched the third parameter to OVO.\n\nI think it creates another inconsistency.","commit_id":"bb2dd990723521be7716156b9098cc380eb8f7d2"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"1639527d7760f215891c160c86346287f4890c9e","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        res[\u0027security_group_rules\u0027] \u003d [self._make_security_group_rule_dict(r)"},{"line_number":269,"context_line":"                                       for r in security_group.rules]"},{"line_number":270,"context_line":"        resource_extend.apply_funcs(ext_sg.SECURITYGROUPS, res,"},{"line_number":271,"context_line":"                                    security_group.db_obj)"},{"line_number":272,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f231b9d_6e7b7a7a","line":271,"in_reply_to":"7f231b9d_4e72feae","updated":"2017-06-16 04:52:36.000000000","message":"Does apply_funcs now take OVO and should extend methods take OVO now??","commit_id":"bb2dd990723521be7716156b9098cc380eb8f7d2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"98a8f8d0ac5e32dadb6cbc54f59efb88f468bd66","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        res[\u0027security_group_rules\u0027] \u003d [self._make_security_group_rule_dict(r)"},{"line_number":269,"context_line":"                                       for r in security_group.rules]"},{"line_number":270,"context_line":"        resource_extend.apply_funcs(ext_sg.SECURITYGROUPS, res,"},{"line_number":271,"context_line":"                                    security_group.db_obj)"},{"line_number":272,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f231b9d_c764ba24","line":271,"in_reply_to":"7f231b9d_6c2a6d2c","updated":"2017-06-15 22:01:44.000000000","message":"apply_funcs ends up calling dictionary extension functions just like _make_security_group_rule_dict.\n\nI\u0027m confused why this patch adjusts the latter to take an object and the former to take a db instance.","commit_id":"bb2dd990723521be7716156b9098cc380eb8f7d2"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"4768a4030243f87df642723926c5069691c7214a","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        res[\u0027security_group_rules\u0027] \u003d [self._make_security_group_rule_dict(r)"},{"line_number":269,"context_line":"                                       for r in security_group.rules]"},{"line_number":270,"context_line":"        resource_extend.apply_funcs(ext_sg.SECURITYGROUPS, res,"},{"line_number":271,"context_line":"                                    security_group.db_obj)"},{"line_number":272,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f231b9d_ae7ab2ed","line":271,"in_reply_to":"7f231b9d_6e7b7a7a","updated":"2017-06-16 05:18:01.000000000","message":"Hmm.... In case of subnetpool, .db_obj is passed.\nFrom what I checked, db_obj looks the right way.\n\nIt seems there is no registered funcs for security groups and security group rules, so I wonder both works. In addition, OVO and sqla db object both support attribute and dictionary access.\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L1161-L1162","commit_id":"bb2dd990723521be7716156b9098cc380eb8f7d2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9db8b4a99c2b9c5ec30aea85ff28e179b745a3d1","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        res[\u0027security_group_rules\u0027] \u003d [self._make_security_group_rule_dict(r)"},{"line_number":269,"context_line":"                                       for r in security_group.rules]"},{"line_number":270,"context_line":"        resource_extend.apply_funcs(ext_sg.SECURITYGROUPS, res,"},{"line_number":271,"context_line":"                                    security_group.db_obj)"},{"line_number":272,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f231b9d_e9742438","line":271,"in_reply_to":"7f231b9d_ae7ab2ed","updated":"2017-06-16 05:54:54.000000000","message":"i think that this should be the object then the extend callback can decide how to do this. Please see patch set #9.","commit_id":"bb2dd990723521be7716156b9098cc380eb8f7d2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"206ed673e9e799c3c37856f93d2326372980ffe9","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        res[\u0027security_group_rules\u0027] \u003d [self._make_security_group_rule_dict(r)"},{"line_number":269,"context_line":"                                       for r in security_group.rules]"},{"line_number":270,"context_line":"        resource_extend.apply_funcs(ext_sg.SECURITYGROUPS, res,"},{"line_number":271,"context_line":"                                    security_group.db_obj)"},{"line_number":272,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f231b9d_1368b1b6","line":271,"in_reply_to":"7f231b9d_c764ba24","updated":"2017-06-16 04:00:12.000000000","message":"i have updated. we now get the object and treat it correctly (internally use the db_obj)","commit_id":"bb2dd990723521be7716156b9098cc380eb8f7d2"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"0a566ef12001d3d58454a4eb125c2dbb211c329f","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        res[\u0027security_group_rules\u0027] \u003d [self._make_security_group_rule_dict(r)"},{"line_number":269,"context_line":"                                       for r in security_group.rules]"},{"line_number":270,"context_line":"        resource_extend.apply_funcs(ext_sg.SECURITYGROUPS, res,"},{"line_number":271,"context_line":"                                    security_group.db_obj)"},{"line_number":272,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f231b9d_6c2a6d2c","line":271,"in_reply_to":"7f231b9d_e1bfa65e","updated":"2017-06-15 21:11:13.000000000","message":"I only see 2 uses of resource_extend.apply_funcs; the other on line 527; both passing the db_obj.\n\nThat said can you please clarify your comment as I\u0027m not sure which others you are referring to.","commit_id":"bb2dd990723521be7716156b9098cc380eb8f7d2"}]}
