)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58e744b422cec38d7b69c5c56b441423a4614fb2","unresolved":false,"context_lines":[{"line_number":15,"context_line":"Also we should check source_type here"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch adds a check for source_type and"},{"line_number":18,"context_line":"destination_type, source_type shoud be within"},{"line_number":19,"context_line":"\u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027 or \u0027blank\u0027;"},{"line_number":20,"context_line":"When empty destination_type is provided, it"},{"line_number":21,"context_line":"will be assigned to an default value according"},{"line_number":22,"context_line":"to source_type, if it is provided with a wrong"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1a430d35_9271f146","line":19,"range":{"start_line":18,"start_character":18,"end_line":19,"end_character":41},"updated":"2017-02-08 01:52:28.000000000","message":"The json schema validation in the API already handles this...","commit_id":"a58959dd9ec3962cbb6d273f136286809678b0c4"}],"novaclient/v2/shell.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"d4c3f6fb988b1b99864829921dbb2f59b7145d8e","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        if bdm_dict.get(\u0027destination_type\u0027) not in [\u0027local\u0027, \u0027volume\u0027]:"},{"line_number":161,"context_line":"            raise exceptions.CommandError("},{"line_number":162,"context_line":"                _(\"The value of destination_type key of --block-device \""},{"line_number":163,"context_line":"                  \"shall be either \u0027local\u0027 or \u0027volume\u0027 but it \""},{"line_number":164,"context_line":"                  \"was \u0027%(action)s\u0027\")"},{"line_number":165,"context_line":"                % {\u0027action\u0027: bdm_dict.get(\u0027destination_type\u0027)})"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a74a57a_f0cce68a","line":163,"range":{"start_line":163,"start_character":19,"end_line":163,"end_character":24},"updated":"2016-11-28 14:40:40.000000000","message":"Suggestion: s/shall/should/","commit_id":"a53c58ae6144bffe76f7ddf2fc800b48730174ea"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"d0121d4d004e4aaeaac2ad37944605d75658522b","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        for key, value in six.iteritems(spec_dict):"},{"line_number":158,"context_line":"            bdm_dict[CLIENT_BDM2_KEYS[key]] \u003d value"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        if bdm_dict.get(\u0027destination_type\u0027) not in [\u0027local\u0027, \u0027volume\u0027]:"},{"line_number":161,"context_line":"            raise exceptions.CommandError("},{"line_number":162,"context_line":"                _(\"The value of destination_type key of --block-device \""},{"line_number":163,"context_line":"                  \"should be either \u0027local\u0027 or \u0027volume\u0027 but it \""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_ff227800","line":160,"updated":"2016-11-30 16:27:19.000000000","message":"so, should we have a reasonable default for destination_type?","commit_id":"7f9ce3253fb527fca919e5bae27881d5404cf8c2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"87b738bd72433070325a434ae41425eec309f858","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        for key, value in six.iteritems(spec_dict):"},{"line_number":158,"context_line":"            bdm_dict[CLIENT_BDM2_KEYS[key]] \u003d value"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        if bdm_dict.get(\u0027destination_type\u0027) not in [\u0027local\u0027, \u0027volume\u0027]:"},{"line_number":161,"context_line":"            raise exceptions.CommandError("},{"line_number":162,"context_line":"                _(\"The value of destination_type key of --block-device \""},{"line_number":163,"context_line":"                  \"should be either \u0027local\u0027 or \u0027volume\u0027 but it \""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_9f25edaf","line":160,"in_reply_to":"5a74a57a_ff227800","updated":"2016-12-01 01:39:41.000000000","message":"I guess it will not be too problemastic","commit_id":"7f9ce3253fb527fca919e5bae27881d5404cf8c2"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"707b7225a27f11d21bb5b84d15cd0d59975d22c9","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            bdm_dict[CLIENT_BDM2_KEYS[key]] \u003d value"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        if bdm_dict.get(\u0027source_type\u0027) not in \\"},{"line_number":161,"context_line":"                (\u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027, \u0027blank\u0027):"},{"line_number":162,"context_line":"            raise exceptions.CommandError("},{"line_number":163,"context_line":"                _(\"The value of source_type key of --block-device \""},{"line_number":164,"context_line":"                  \"should be either \u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027 \""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_d7c5c15b","line":161,"updated":"2016-12-01 16:33:49.000000000","message":"femtonit: I\u0027d prefer if the condition could be enclosed in parentheses to eliminate the backslash continuation.","commit_id":"5be5428f03d44916c5f61924d7ae75d58b16f57b"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"a6e8cd2ae54b4206199c6e6a178254d2ad4f09bc","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            bdm_dict[CLIENT_BDM2_KEYS[key]] \u003d value"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        if bdm_dict.get(\u0027source_type\u0027) not in \\"},{"line_number":161,"context_line":"                (\u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027, \u0027blank\u0027):"},{"line_number":162,"context_line":"            raise exceptions.CommandError("},{"line_number":163,"context_line":"                _(\"The value of source_type key of --block-device \""},{"line_number":164,"context_line":"                  \"should be either \u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027 \""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_265b89f7","line":161,"in_reply_to":"3a71b18c_d7c5c15b","updated":"2016-12-06 07:41:52.000000000","message":"Done","commit_id":"5be5428f03d44916c5f61924d7ae75d58b16f57b"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"707b7225a27f11d21bb5b84d15cd0d59975d22c9","unresolved":false,"context_lines":[{"line_number":161,"context_line":"                (\u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027, \u0027blank\u0027):"},{"line_number":162,"context_line":"            raise exceptions.CommandError("},{"line_number":163,"context_line":"                _(\"The value of source_type key of --block-device \""},{"line_number":164,"context_line":"                  \"should be either \u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027 \""},{"line_number":165,"context_line":"                  \"or \u0027blank\u0027 but it was \u0027%(action)s\u0027\")"},{"line_number":166,"context_line":"                % {\u0027action\u0027: bdm_dict.get(\u0027destination_type\u0027)})"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_b74925d3","line":164,"range":{"start_line":164,"start_character":29,"end_line":164,"end_character":35},"updated":"2016-12-01 16:33:49.000000000","message":"femtonit: Strictly speaking, \u0027either\u0027 should be used only in cases where there are two options to choose between.  However, many English speakers do use \u0027either\u0027 this way.  So, while I\u0027ll suggest s/either/one of/, I won\u0027t require it.","commit_id":"5be5428f03d44916c5f61924d7ae75d58b16f57b"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"a6e8cd2ae54b4206199c6e6a178254d2ad4f09bc","unresolved":false,"context_lines":[{"line_number":161,"context_line":"                (\u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027, \u0027blank\u0027):"},{"line_number":162,"context_line":"            raise exceptions.CommandError("},{"line_number":163,"context_line":"                _(\"The value of source_type key of --block-device \""},{"line_number":164,"context_line":"                  \"should be either \u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027 \""},{"line_number":165,"context_line":"                  \"or \u0027blank\u0027 but it was \u0027%(action)s\u0027\")"},{"line_number":166,"context_line":"                % {\u0027action\u0027: bdm_dict.get(\u0027destination_type\u0027)})"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_46740567","line":164,"range":{"start_line":164,"start_character":29,"end_line":164,"end_character":35},"in_reply_to":"3a71b18c_b74925d3","updated":"2016-12-06 07:41:52.000000000","message":"Done","commit_id":"5be5428f03d44916c5f61924d7ae75d58b16f57b"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"707b7225a27f11d21bb5b84d15cd0d59975d22c9","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                _(\"The value of source_type key of --block-device \""},{"line_number":164,"context_line":"                  \"should be either \u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027 \""},{"line_number":165,"context_line":"                  \"or \u0027blank\u0027 but it was \u0027%(action)s\u0027\")"},{"line_number":166,"context_line":"                % {\u0027action\u0027: bdm_dict.get(\u0027destination_type\u0027)})"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        destination_type \u003d bdm_dict.get(\u0027destination_type\u0027)"},{"line_number":169,"context_line":"        if not destination_type:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_b7aa0518","line":166,"range":{"start_line":166,"start_character":43,"end_line":166,"end_character":59},"updated":"2016-12-01 16:33:49.000000000","message":"s/destination_type/source_type/\n\nI don\u0027t suppose we could make a reasonable default for source_type, now?  Maybe \"blank\" would be reasonable?","commit_id":"5be5428f03d44916c5f61924d7ae75d58b16f57b"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"a6e8cd2ae54b4206199c6e6a178254d2ad4f09bc","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                _(\"The value of source_type key of --block-device \""},{"line_number":164,"context_line":"                  \"should be either \u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027 \""},{"line_number":165,"context_line":"                  \"or \u0027blank\u0027 but it was \u0027%(action)s\u0027\")"},{"line_number":166,"context_line":"                % {\u0027action\u0027: bdm_dict.get(\u0027destination_type\u0027)})"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        destination_type \u003d bdm_dict.get(\u0027destination_type\u0027)"},{"line_number":169,"context_line":"        if not destination_type:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_e66431ba","line":166,"range":{"start_line":166,"start_character":43,"end_line":166,"end_character":59},"in_reply_to":"3a71b18c_b7aa0518","updated":"2016-12-06 07:41:52.000000000","message":"I think maybe too much default values causes errors?","commit_id":"5be5428f03d44916c5f61924d7ae75d58b16f57b"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"df708e05d6a41c54f3876053d9abc201bc387f89","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                _(\"The value of source_type key of --block-device \""},{"line_number":164,"context_line":"                  \"should be either \u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027 \""},{"line_number":165,"context_line":"                  \"or \u0027blank\u0027 but it was \u0027%(action)s\u0027\")"},{"line_number":166,"context_line":"                % {\u0027action\u0027: bdm_dict.get(\u0027destination_type\u0027)})"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        destination_type \u003d bdm_dict.get(\u0027destination_type\u0027)"},{"line_number":169,"context_line":"        if not destination_type:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_e6d99158","line":166,"range":{"start_line":166,"start_character":43,"end_line":166,"end_character":59},"in_reply_to":"3a71b18c_e66431ba","updated":"2016-12-06 07:45:40.000000000","message":"hmm, I mean too much default walues may lead to errors some how.","commit_id":"5be5428f03d44916c5f61924d7ae75d58b16f57b"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"707b7225a27f11d21bb5b84d15cd0d59975d22c9","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        destination_type \u003d bdm_dict.get(\u0027destination_type\u0027)"},{"line_number":169,"context_line":"        if not destination_type:"},{"line_number":170,"context_line":"            source_type \u003d bdm_dict.get(\u0027source_type\u0027)"},{"line_number":171,"context_line":"            if source_type in (\u0027image\u0027, \u0027blank\u0027):"},{"line_number":172,"context_line":"                bdm_dict[\u0027destination_type\u0027] \u003d \u0027local\u0027"},{"line_number":173,"context_line":"            if source_type in (\u0027snapshot\u0027, \u0027volume\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_17365903","line":170,"range":{"start_line":170,"start_character":26,"end_line":170,"end_character":53},"updated":"2016-12-01 16:33:49.000000000","message":"With the logic as it is now, we\u0027ve established that \u0027source_type\u0027 exists in the bdm_dict, so this could be simplified to \"bdm_dict[\u0027source_type\u0027]\".","commit_id":"5be5428f03d44916c5f61924d7ae75d58b16f57b"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"a6e8cd2ae54b4206199c6e6a178254d2ad4f09bc","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        destination_type \u003d bdm_dict.get(\u0027destination_type\u0027)"},{"line_number":169,"context_line":"        if not destination_type:"},{"line_number":170,"context_line":"            source_type \u003d bdm_dict.get(\u0027source_type\u0027)"},{"line_number":171,"context_line":"            if source_type in (\u0027image\u0027, \u0027blank\u0027):"},{"line_number":172,"context_line":"                bdm_dict[\u0027destination_type\u0027] \u003d \u0027local\u0027"},{"line_number":173,"context_line":"            if source_type in (\u0027snapshot\u0027, \u0027volume\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_86bc5d07","line":170,"range":{"start_line":170,"start_character":26,"end_line":170,"end_character":53},"in_reply_to":"3a71b18c_17365903","updated":"2016-12-06 07:41:52.000000000","message":"Done","commit_id":"5be5428f03d44916c5f61924d7ae75d58b16f57b"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"e8256758f11ffeaca1cdd30864fbf0a68e3b2464","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                _(\"The value of source_type key of --block-device \""},{"line_number":164,"context_line":"                  \"should be one of \u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027 \""},{"line_number":165,"context_line":"                  \"or \u0027blank\u0027 but it was \u0027%(action)s\u0027\")"},{"line_number":166,"context_line":"                % {\u0027action\u0027: bdm_dict.get(\u0027source_type\u0027)})"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        destination_type \u003d bdm_dict.get(\u0027destination_type\u0027)"},{"line_number":169,"context_line":"        if not destination_type:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_18e093cc","line":166,"updated":"2016-12-06 16:06:11.000000000","message":"You have a good point about too many defaults leading to errors.  On the other hand, good user interface design calls for using reasonable defaults where possible.  If we aren\u0027t going to use a default here, like \u0027blank\u0027, then I\u0027d like to see a comment justifying why we\u0027re not providing that default.","commit_id":"4b8dcc2f27ecd4355e73efaa0d9a602c0a4666ec"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"3ee0919b57fc9016ec88b6d618796b20e99aa4ec","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                _(\"The value of source_type key of --block-device \""},{"line_number":164,"context_line":"                  \"should be one of \u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027 \""},{"line_number":165,"context_line":"                  \"or \u0027blank\u0027 but it was \u0027%(action)s\u0027\")"},{"line_number":166,"context_line":"                % {\u0027action\u0027: bdm_dict.get(\u0027source_type\u0027)})"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        destination_type \u003d bdm_dict.get(\u0027destination_type\u0027)"},{"line_number":169,"context_line":"        if not destination_type:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_70526968","line":166,"in_reply_to":"3a71b18c_18e093cc","updated":"2016-12-07 01:31:08.000000000","message":"Hmm, maybe I was overthinking.","commit_id":"4b8dcc2f27ecd4355e73efaa0d9a602c0a4666ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c516640cbca1e0c19c64a778a7f356a1662d3bec","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        if not destination_type:"},{"line_number":173,"context_line":"            source_type \u003d bdm_dict[\u0027source_type\u0027]"},{"line_number":174,"context_line":"            if source_type in (\u0027image\u0027, \u0027blank\u0027):"},{"line_number":175,"context_line":"                bdm_dict[\u0027destination_type\u0027] \u003d \u0027local\u0027"},{"line_number":176,"context_line":"            if source_type in (\u0027snapshot\u0027, \u0027volume\u0027):"},{"line_number":177,"context_line":"                bdm_dict[\u0027destination_type\u0027] \u003d \u0027volume\u0027"},{"line_number":178,"context_line":"        elif destination_type not in (\u0027local\u0027, \u0027volume\u0027):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a430d35_d28e192d","line":175,"updated":"2017-02-08 01:51:34.000000000","message":"See my comment in the same change proposed in nova:\n\nhttps://review.openstack.org/#/c/402372/14/nova/block_device.py\n\nI don\u0027t think this is a good idea. We should just make destination_type required rather than guess, at least in my opinion.","commit_id":"a58959dd9ec3962cbb6d273f136286809678b0c4"}]}
