)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a48d0a632ce317f5ebc9d56977a29046193da436","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2017-03-02 14:37:50 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Enlighten server tags API about cells"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Iff71a1bc1762f864d93bace974ad36136347dfdf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba2be162_e3ded4db","line":8,"updated":"2017-03-03 19:31:13.000000000","message":"Would be nice to track this series against the blueprint you have for these API changes.","commit_id":"47edae318d67229dbb207ea8dd48373513855fb7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"df454f752d60eae1fdab9ddf09e4ecf52d226981","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2017-03-02 14:37:50 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Enlighten server tags API about cells"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Iff71a1bc1762f864d93bace974ad36136347dfdf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba2be162_1125c05a","line":8,"in_reply_to":"ba2be162_b411705f","updated":"2017-03-06 11:10:18.000000000","message":"FWIW, the gerrit topic is useful for me, but yeah sure, we could add it.","commit_id":"47edae318d67229dbb207ea8dd48373513855fb7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"837d7c6e0290d0a408c202082df32ef12206f2f8","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2017-03-02 14:37:50 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Enlighten server tags API about cells"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Iff71a1bc1762f864d93bace974ad36136347dfdf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba2be162_b411705f","line":8,"in_reply_to":"ba2be162_e3ded4db","updated":"2017-03-03 20:33:30.000000000","message":"Yeah, sorry I\u0027ll go back and add it to all of these.. I\u0027m just kinda trying to get to a stable point and then I have cleanup to do anyway.","commit_id":"47edae318d67229dbb207ea8dd48373513855fb7"}],"nova/api/openstack/compute/server_tags.py":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"3ef675b10fcccb2e5692d9b477dc516b2f01c197","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        try:"},{"line_number":65,"context_line":"            im \u003d objects.InstanceMapping.get_by_instance_uuid(context,"},{"line_number":66,"context_line":"                                                              server_id)"},{"line_number":67,"context_line":"            with nova_context.target_cell(context, im.cell_mapping):"},{"line_number":68,"context_line":"                exists \u003d objects.Tag.exists(context, server_id, id)"},{"line_number":69,"context_line":"        except (exception.InstanceNotFound,"},{"line_number":70,"context_line":"                exception.InstanceMappingNotFound) as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_5a25e106","line":67,"updated":"2017-03-03 08:43:25.000000000","message":"The thing I talked about in https://review.openstack.org/#/c/438023/.\n\nCan be something like:\ntry:\n  with optional_cell_coxtext(instance_uuid\u003dserver_id):\n     exists \u003d objects.Tag.exists(context, server_id, id)\nexcept exception.InstanceNotFound:\n  ...","commit_id":"47edae318d67229dbb207ea8dd48373513855fb7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"df454f752d60eae1fdab9ddf09e4ecf52d226981","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        try:"},{"line_number":65,"context_line":"            im \u003d objects.InstanceMapping.get_by_instance_uuid(context,"},{"line_number":66,"context_line":"                                                              server_id)"},{"line_number":67,"context_line":"            with nova_context.target_cell(context, im.cell_mapping):"},{"line_number":68,"context_line":"                exists \u003d objects.Tag.exists(context, server_id, id)"},{"line_number":69,"context_line":"        except (exception.InstanceNotFound,"},{"line_number":70,"context_line":"                exception.InstanceMappingNotFound) as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_3143a414","line":67,"in_reply_to":"ba2be162_5a25e106","updated":"2017-03-06 11:10:18.000000000","message":"We could change that later, sure.","commit_id":"47edae318d67229dbb207ea8dd48373513855fb7"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"563ebbeb1d6cf9b7e689cda1fef16a31ab3b1e78","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        try:"},{"line_number":102,"context_line":"            im \u003d objects.InstanceMapping.get_by_instance_uuid(context,"},{"line_number":103,"context_line":"                                                              server_id)"},{"line_number":104,"context_line":"        except exception.InstanceMappingNotFound as e:"},{"line_number":105,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        with nova_context.target_cell(context, im.cell_mapping):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_28d96b84","line":104,"range":{"start_line":104,"start_character":15,"end_line":104,"end_character":48},"updated":"2017-03-06 16:18:23.000000000","message":"I\u0027m sure there\u0027s a reason it can\u0027t be InstanceNotFound here... right?\n\nSimilar question below.","commit_id":"47edae318d67229dbb207ea8dd48373513855fb7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"df454f752d60eae1fdab9ddf09e4ecf52d226981","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        except exception.InstanceMappingNotFound as e:"},{"line_number":105,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        with nova_context.target_cell(context, im.cell_mapping):"},{"line_number":108,"context_line":"            self._check_instance_in_valid_state(context, server_id,"},{"line_number":109,"context_line":"                                                \u0027update tag\u0027)"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_51ead8db","line":107,"updated":"2017-03-06 11:10:18.000000000","message":"We could have used the set_target_cell() method instead here, but meh okay.","commit_id":"47edae318d67229dbb207ea8dd48373513855fb7"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"563ebbeb1d6cf9b7e689cda1fef16a31ab3b1e78","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        except exception.InstanceMappingNotFound as e:"},{"line_number":105,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        with nova_context.target_cell(context, im.cell_mapping):"},{"line_number":108,"context_line":"            self._check_instance_in_valid_state(context, server_id,"},{"line_number":109,"context_line":"                                                \u0027update tag\u0027)"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_48f05fca","line":107,"in_reply_to":"ba2be162_51ead8db","updated":"2017-03-06 16:18:23.000000000","message":"How come this is outside the try/except here, but inside in the above two?\n\nSimilar question below.","commit_id":"47edae318d67229dbb207ea8dd48373513855fb7"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"563ebbeb1d6cf9b7e689cda1fef16a31ab3b1e78","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        try:"},{"line_number":120,"context_line":"            with nova_context.target_cell(context, im.cell_mapping):"},{"line_number":121,"context_line":"                tags \u003d objects.TagList.get_by_resource_id(context, server_id)"},{"line_number":122,"context_line":"        except exception.InstanceNotFound as e:"},{"line_number":123,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        if len(tags) \u003e\u003d objects.instance.MAX_TAG_COUNT:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_08cd8786","line":122,"range":{"start_line":122,"start_character":25,"end_line":122,"end_character":41},"updated":"2017-03-06 16:18:23.000000000","message":"Also InstanceMappingNotFound?\n\nSimilar question below.","commit_id":"47edae318d67229dbb207ea8dd48373513855fb7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"433dffaac1e5554a446ccb9e4e734f39fac9f452","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        context.can(st_policies.POLICY_ROOT % \u0027update\u0027)"},{"line_number":101,"context_line":"        try:"},{"line_number":102,"context_line":"            im \u003d objects.InstanceMapping.get_by_instance_uuid(context,"},{"line_number":103,"context_line":"                                                              server_id)"},{"line_number":104,"context_line":"        except exception.InstanceMappingNotFound as e:"},{"line_number":105,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_31f36775","line":103,"updated":"2017-03-07 17:51:17.000000000","message":"You might want to consider DRY\u0027ing up this a bit with a _get_mapping_for_instance() method that handles the raising of webob.exc.HTTPNotFound(). That would mean a little less repeated code.","commit_id":"92151b529f48733291e4f774fc754e553833b56e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6ca0222f446be02ee81dcaff5cf39d2ffd7b64a3","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        context.can(st_policies.POLICY_ROOT % \u0027update\u0027)"},{"line_number":101,"context_line":"        try:"},{"line_number":102,"context_line":"            im \u003d objects.InstanceMapping.get_by_instance_uuid(context,"},{"line_number":103,"context_line":"                                                              server_id)"},{"line_number":104,"context_line":"        except exception.InstanceMappingNotFound as e:"},{"line_number":105,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_75ddca13","line":103,"in_reply_to":"9a30ddce_31f36775","updated":"2017-03-07 18:01:45.000000000","message":"Done","commit_id":"92151b529f48733291e4f774fc754e553833b56e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d3b779327bf3d2fcb8b347183ec1293e3e7753dd","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        try:"},{"line_number":73,"context_line":"            im \u003d objects.InstanceMapping.get_by_instance_uuid(context,"},{"line_number":74,"context_line":"                                                              server_id)"},{"line_number":75,"context_line":"            with nova_context.target_cell(context, im.cell_mapping):"},{"line_number":76,"context_line":"                exists \u003d objects.Tag.exists(context, server_id, id)"},{"line_number":77,"context_line":"        except (exception.InstanceNotFound,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_6426fabb","line":74,"updated":"2017-03-07 19:24:55.000000000","message":"meh, I suppose you could have done:\n\n im \u003d _get_instance_mapping(context, server_id)\n with nova_context.target_cell(...):\n    try:\n        exists \u003d objects.Tag.exists(...)\n    except exception.InstanceNotFound:\n        ...\n\nwhich isolates the try around the exception-raising area a bit better. But, like I said, meh :)","commit_id":"0de473bd259174dba6fa17855fbecb07e922e290"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"179e4ab04abc1dbaa095dac8579c0bc86974c40c","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        try:"},{"line_number":73,"context_line":"            im \u003d objects.InstanceMapping.get_by_instance_uuid(context,"},{"line_number":74,"context_line":"                                                              server_id)"},{"line_number":75,"context_line":"            with nova_context.target_cell(context, im.cell_mapping):"},{"line_number":76,"context_line":"                exists \u003d objects.Tag.exists(context, server_id, id)"},{"line_number":77,"context_line":"        except (exception.InstanceNotFound,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_ca724de5","line":74,"in_reply_to":"9a30ddce_6426fabb","updated":"2017-03-07 20:33:47.000000000","message":"Yeah I tend to think re-use _get_instance_mapping so you don\u0027t duplicate this code, but mehs all around.","commit_id":"0de473bd259174dba6fa17855fbecb07e922e290"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"38f0e5697d8496d793f67bb717519d8678b38cf6","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        try:"},{"line_number":73,"context_line":"            im \u003d objects.InstanceMapping.get_by_instance_uuid(context,"},{"line_number":74,"context_line":"                                                              server_id)"},{"line_number":75,"context_line":"            with nova_context.target_cell(context, im.cell_mapping):"},{"line_number":76,"context_line":"                exists \u003d objects.Tag.exists(context, server_id, id)"},{"line_number":77,"context_line":"        except (exception.InstanceNotFound,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_deaf6ee1","line":74,"in_reply_to":"9a30ddce_ca724de5","updated":"2017-03-07 20:36:22.000000000","message":"I just prefer to have the not-found logic be unified. So if this needed to do anything different for instance not found, it\u0027d be in the same place as mapping not found (which is the same thing).","commit_id":"0de473bd259174dba6fa17855fbecb07e922e290"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"179e4ab04abc1dbaa095dac8579c0bc86974c40c","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        im \u003d _get_instance_mapping(context, server_id)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        with nova_context.target_cell(context, im.cell_mapping):"},{"line_number":160,"context_line":"            self._check_instance_in_valid_state(context, server_id,"},{"line_number":161,"context_line":"                                                \u0027update tags\u0027)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        try:"},{"line_number":164,"context_line":"            with nova_context.target_cell(context, im.cell_mapping):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_0a0aa526","line":161,"range":{"start_line":160,"start_character":12,"end_line":161,"end_character":62},"updated":"2017-03-07 20:33:47.000000000","message":"I think I would have preferred to avoid the double context manager and just put this in the with statement below, but again, meh. I realize it would change the flow a bit, but not really.","commit_id":"0de473bd259174dba6fa17855fbecb07e922e290"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"38f0e5697d8496d793f67bb717519d8678b38cf6","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        im \u003d _get_instance_mapping(context, server_id)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        with nova_context.target_cell(context, im.cell_mapping):"},{"line_number":160,"context_line":"            self._check_instance_in_valid_state(context, server_id,"},{"line_number":161,"context_line":"                                                \u0027update tags\u0027)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        try:"},{"line_number":164,"context_line":"            with nova_context.target_cell(context, im.cell_mapping):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_de968e93","line":161,"range":{"start_line":160,"start_character":12,"end_line":161,"end_character":62},"in_reply_to":"9a30ddce_0a0aa526","updated":"2017-03-07 20:36:22.000000000","message":"Well, it changes the behavior from today, where if this raises not found, it\u0027ll bubble up. I just didn\u0027t want to be changing behavior as part of this change.","commit_id":"0de473bd259174dba6fa17855fbecb07e922e290"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cda75480832fb6f400218dd8ac70065aeba2ed81","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        im \u003d _get_instance_mapping(context, server_id)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        with nova_context.target_cell(context, im.cell_mapping):"},{"line_number":160,"context_line":"            self._check_instance_in_valid_state(context, server_id,"},{"line_number":161,"context_line":"                                                \u0027update tags\u0027)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        try:"},{"line_number":164,"context_line":"            with nova_context.target_cell(context, im.cell_mapping):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_97f3190a","line":161,"range":{"start_line":160,"start_character":12,"end_line":161,"end_character":62},"in_reply_to":"9a30ddce_54127fb5","updated":"2017-03-07 21:45:53.000000000","message":"Sorry, I should not have used the word behavior as it implied I was talking about something specific that might be noticed from the user side.\n\nWhat I meant is: before this patch, we call _check_instance_in_valid_state outside of the InstanceNotFound try..except handler below. If I moved this into there, then we may swallow/translate something that it raises where today it doesn\u0027t. I haven\u0027t looked at what it does, I was just trying not to alter the sequencing of anything here, risking potentially changing which error gets raised for a given situation (like if we checked permissions before instance-exists or something). It\u0027s just something I was trying to (not) do with all these api changes.","commit_id":"0de473bd259174dba6fa17855fbecb07e922e290"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"15b6b4aa2e200eab464fc7b275c0b6f653c056cb","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        im \u003d _get_instance_mapping(context, server_id)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        with nova_context.target_cell(context, im.cell_mapping):"},{"line_number":160,"context_line":"            self._check_instance_in_valid_state(context, server_id,"},{"line_number":161,"context_line":"                                                \u0027update tags\u0027)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        try:"},{"line_number":164,"context_line":"            with nova_context.target_cell(context, im.cell_mapping):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_54127fb5","line":161,"range":{"start_line":160,"start_character":12,"end_line":161,"end_character":62},"in_reply_to":"9a30ddce_de968e93","updated":"2017-03-07 21:34:11.000000000","message":"I\u0027m not sure I follow. _get_instance_mapping will raise a 404, as will InstanceNotFound below. _check_instance_in_valid_state will raise 409, the thing I was talking about was just doing both _check_instance_in_valid_state and objects.TagList.create in the same with nova_context.target_cell block. Maybe I\u0027m missing some detail about how target_cell works that would result in a unique error.","commit_id":"0de473bd259174dba6fa17855fbecb07e922e290"}],"nova/tests/unit/api/openstack/compute/test_server_tags.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"563ebbeb1d6cf9b7e689cda1fef16a31ab3b1e78","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ba2be162_c880cffa","updated":"2017-03-06 16:18:23.000000000","message":"Tests for new exception paths?\n\nAssertions for new invocations of get_by_instance_uuid and target_cell?","commit_id":"47edae318d67229dbb207ea8dd48373513855fb7"}]}
