)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f39c07c656568b3739638aa9a4502e41e2dbcbbc","unresolved":false,"context_lines":[{"line_number":16,"context_line":"OVO."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"The following projects use helpers.SegmentTypeDriver with a model"},{"line_number":19,"context_line":"that is not an OVO and will be effected by this change:"},{"line_number":20,"context_line":"networking-avaya"},{"line_number":21,"context_line":"networking-bagpipe"},{"line_number":22,"context_line":"networking-h3c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1f1a1f67_e0261469","line":19,"updated":"2017-07-20 21:45:46.000000000","message":"We need to send an email about the change to openstack-dev@ in advance and give some time for users to switch. We should at least make sure that bagpipe (part of Neutron stadium) has all the needed patches aligned and ready for merge before we push the Workflow+1 button here.","commit_id":"f327a2031b1e89fc73e1d6c003f515e1d4e160b8"}],"neutron/plugins/ml2/drivers/helpers.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f39c07c656568b3739638aa9a4502e41e2dbcbbc","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def __init__(self, model):"},{"line_number":62,"context_line":"        super(SegmentTypeDriver, self).__init__()"},{"line_number":63,"context_line":"        self.model \u003d model.db_model"},{"line_number":64,"context_line":"        self.obj \u003d model"},{"line_number":65,"context_line":"        self.primary_keys \u003d self.obj.primary_keys"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_408dc879","line":63,"range":{"start_line":63,"start_character":21,"end_line":63,"end_character":26},"updated":"2017-07-20 21:45:46.000000000","message":"then it\u0027s not a model (an sqlalchemy concept)? Should it be \u0027obj\u0027?\n\nMore interestingly, it doesn\u0027t seem like you actually make use of an object anywhere in the class; instead you use it as a class. Then shouldn\u0027t the name of the variable reflect that?","commit_id":"f327a2031b1e89fc73e1d6c003f515e1d4e160b8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"258a6712c1656bff4de35314bc49e947c3eaef61","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def __init__(self, model):"},{"line_number":62,"context_line":"        super(SegmentTypeDriver, self).__init__()"},{"line_number":63,"context_line":"        self.model \u003d model.db_model"},{"line_number":64,"context_line":"        self.obj \u003d model"},{"line_number":65,"context_line":"        self.primary_keys \u003d self.obj.primary_keys"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff346bd7_a3523b66","line":63,"range":{"start_line":63,"start_character":21,"end_line":63,"end_character":26},"in_reply_to":"1f1a1f67_408dc879","updated":"2017-07-26 15:43:17.000000000","message":"Done","commit_id":"f327a2031b1e89fc73e1d6c003f515e1d4e160b8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"98a1113b1bcb92d87452565be2cb6d9cf8a58137","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        try:"},{"line_number":85,"context_line":"            with ctx_manager:"},{"line_number":86,"context_line":"                allocs \u003d self.obj.get_objects(context, **raw_segment)"},{"line_number":87,"context_line":"                if allocs:"},{"line_number":88,"context_line":"                    alloc \u003d allocs[0]"},{"line_number":89,"context_line":"                    if alloc.allocated:"},{"line_number":90,"context_line":"                        # Segment already allocated"},{"line_number":91,"context_line":"                        return"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_b57cb8eb","line":88,"range":{"start_line":86,"start_character":16,"end_line":88,"end_character":37},"updated":"2017-07-13 20:12:27.000000000","message":"I feel like I can use get_object here. The raw_segment should include the unique_key(s) or the primary_key(s)","commit_id":"f327a2031b1e89fc73e1d6c003f515e1d4e160b8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"258a6712c1656bff4de35314bc49e947c3eaef61","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        try:"},{"line_number":85,"context_line":"            with ctx_manager:"},{"line_number":86,"context_line":"                allocs \u003d self.obj.get_objects(context, **raw_segment)"},{"line_number":87,"context_line":"                if allocs:"},{"line_number":88,"context_line":"                    alloc \u003d allocs[0]"},{"line_number":89,"context_line":"                    if alloc.allocated:"},{"line_number":90,"context_line":"                        # Segment already allocated"},{"line_number":91,"context_line":"                        return"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff346bd7_8380578d","line":88,"range":{"start_line":86,"start_character":16,"end_line":88,"end_character":37},"in_reply_to":"1f1a1f67_00d6b050","updated":"2017-07-26 15:43:17.000000000","message":"I would like to use get_object but the segment has no way of specifying a c_tag for allocation so I have to use get_objects here and grab the first allocation.","commit_id":"f327a2031b1e89fc73e1d6c003f515e1d4e160b8"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"ee392d55960df74beee0dbe8bfa4f770ea7a4851","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        try:"},{"line_number":85,"context_line":"            with ctx_manager:"},{"line_number":86,"context_line":"                allocs \u003d self.obj.get_objects(context, **raw_segment)"},{"line_number":87,"context_line":"                if allocs:"},{"line_number":88,"context_line":"                    alloc \u003d allocs[0]"},{"line_number":89,"context_line":"                    if alloc.allocated:"},{"line_number":90,"context_line":"                        # Segment already allocated"},{"line_number":91,"context_line":"                        return"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_ef212afd","line":88,"range":{"start_line":86,"start_character":16,"end_line":88,"end_character":37},"in_reply_to":"1f1a1f67_b57cb8eb","updated":"2017-07-14 09:34:36.000000000","message":"If you switch to use get_object(), you need to consider if it returns None.","commit_id":"f327a2031b1e89fc73e1d6c003f515e1d4e160b8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f39c07c656568b3739638aa9a4502e41e2dbcbbc","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        try:"},{"line_number":85,"context_line":"            with ctx_manager:"},{"line_number":86,"context_line":"                allocs \u003d self.obj.get_objects(context, **raw_segment)"},{"line_number":87,"context_line":"                if allocs:"},{"line_number":88,"context_line":"                    alloc \u003d allocs[0]"},{"line_number":89,"context_line":"                    if alloc.allocated:"},{"line_number":90,"context_line":"                        # Segment already allocated"},{"line_number":91,"context_line":"                        return"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_00d6b050","line":88,"range":{"start_line":86,"start_character":16,"end_line":88,"end_character":37},"in_reply_to":"1f1a1f67_ef212afd","updated":"2017-07-20 21:45:46.000000000","message":"alloc \u003d self.obj.get_objects(context, **raw_segment)\nif alloc is None:\n    return\n...","commit_id":"f327a2031b1e89fc73e1d6c003f515e1d4e160b8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"98a1113b1bcb92d87452565be2cb6d9cf8a58137","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                                  \"started \","},{"line_number":96,"context_line":"                                  {\"type\": network_type,"},{"line_number":97,"context_line":"                                   \"segment\": raw_segment})"},{"line_number":98,"context_line":"                        if self.obj.update_objects(context, allocated\u003dFalse,"},{"line_number":99,"context_line":"                               values\u003d{\"allocated\": True}, **raw_segment):"},{"line_number":100,"context_line":"                            LOG.debug(\"%(type)s segment %(segment)s allocate \""},{"line_number":101,"context_line":"                                      \"done \","},{"line_number":102,"context_line":"                                  {\"type\": network_type,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_3568a81f","line":99,"range":{"start_line":98,"start_character":24,"end_line":99,"end_character":74},"updated":"2017-07-13 20:12:27.000000000","message":"same here.","commit_id":"f327a2031b1e89fc73e1d6c003f515e1d4e160b8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f39c07c656568b3739638aa9a4502e41e2dbcbbc","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                                  \"started \","},{"line_number":96,"context_line":"                                  {\"type\": network_type,"},{"line_number":97,"context_line":"                                   \"segment\": raw_segment})"},{"line_number":98,"context_line":"                        if self.obj.update_objects(context, allocated\u003dFalse,"},{"line_number":99,"context_line":"                               values\u003d{\"allocated\": True}, **raw_segment):"},{"line_number":100,"context_line":"                            LOG.debug(\"%(type)s segment %(segment)s allocate \""},{"line_number":101,"context_line":"                                      \"done \","},{"line_number":102,"context_line":"                                  {\"type\": network_type,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_a0c49c93","line":99,"range":{"start_line":98,"start_character":24,"end_line":99,"end_character":74},"in_reply_to":"1f1a1f67_3568a81f","updated":"2017-07-20 21:45:46.000000000","message":"What do you refer to? It\u0027s not clear from just reading the comment. If (based on your comment) you suggest that we should replace it with get_object + .update(), then no, we can\u0027t because we need update_objects as a way to \u0027lock\u0027 the updated record for the use of the current session.","commit_id":"f327a2031b1e89fc73e1d6c003f515e1d4e160b8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"258a6712c1656bff4de35314bc49e947c3eaef61","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                                  \"started \","},{"line_number":96,"context_line":"                                  {\"type\": network_type,"},{"line_number":97,"context_line":"                                   \"segment\": raw_segment})"},{"line_number":98,"context_line":"                        if self.obj.update_objects(context, allocated\u003dFalse,"},{"line_number":99,"context_line":"                               values\u003d{\"allocated\": True}, **raw_segment):"},{"line_number":100,"context_line":"                            LOG.debug(\"%(type)s segment %(segment)s allocate \""},{"line_number":101,"context_line":"                                      \"done \","},{"line_number":102,"context_line":"                                  {\"type\": network_type,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff346bd7_e3ee0387","line":99,"range":{"start_line":98,"start_character":24,"end_line":99,"end_character":74},"in_reply_to":"1f1a1f67_a0c49c93","updated":"2017-07-26 15:43:17.000000000","message":"yes thats what I was referring to. I\u0027ll leave it as is.","commit_id":"f327a2031b1e89fc73e1d6c003f515e1d4e160b8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f39c07c656568b3739638aa9a4502e41e2dbcbbc","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                       \"segment\": raw_segment})"},{"line_number":153,"context_line":"            if self.obj.update_objects(context, allocated\u003dFalse,"},{"line_number":154,"context_line":"                                       values\u003d{\"allocated\": True},"},{"line_number":155,"context_line":"                                       **raw_segment):"},{"line_number":156,"context_line":"                LOG.debug(\"%(type)s segment allocate from pool \""},{"line_number":157,"context_line":"                          \"success with %(segment)s \","},{"line_number":158,"context_line":"                          {\"type\": network_type,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_806f6091","line":155,"updated":"2017-07-20 21:45:46.000000000","message":"please move allocated\u003dFalse to the line after values\u003d{...} to logically separate parameters that are used as filters from those that are driving the OVO logic (values, context).","commit_id":"f327a2031b1e89fc73e1d6c003f515e1d4e160b8"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"258a6712c1656bff4de35314bc49e947c3eaef61","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                       \"segment\": raw_segment})"},{"line_number":153,"context_line":"            if self.obj.update_objects(context, allocated\u003dFalse,"},{"line_number":154,"context_line":"                                       values\u003d{\"allocated\": True},"},{"line_number":155,"context_line":"                                       **raw_segment):"},{"line_number":156,"context_line":"                LOG.debug(\"%(type)s segment allocate from pool \""},{"line_number":157,"context_line":"                          \"success with %(segment)s \","},{"line_number":158,"context_line":"                          {\"type\": network_type,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff346bd7_83fdf73b","line":155,"in_reply_to":"1f1a1f67_806f6091","updated":"2017-07-26 15:43:17.000000000","message":"Done","commit_id":"f327a2031b1e89fc73e1d6c003f515e1d4e160b8"}]}
