)]}'
{"cinderclient/tests/unit/v3/test_shell.py":[{"author":{"_account_id":30555,"name":"Fernando Ferraz","display_name":"Fernando Ferraz","email":"fesilva@redhat.com","username":"fernandoperches"},"change_message_id":"6b8afb0d3c0789b297f4f0d2c48eeaf86641fe95","unresolved":true,"context_lines":[{"line_number":918,"context_line":"                         f\u0027snapshot-create --force {force_value} 123456\u0027)"},{"line_number":919,"context_line":"        self.assert_called_anytime(\u0027POST\u0027, \u0027/snapshots\u0027, body\u003dsnap_body_3_65)"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"    SNAP_BODY_3_66 \u003d {"},{"line_number":922,"context_line":"        \u0027snapshot\u0027: {"},{"line_number":923,"context_line":"            \u0027volume_id\u0027: \u0027123456\u0027,"},{"line_number":924,"context_line":"            \u0027name\u0027: None,"}],"source_content_type":"text/x-python","patch_set":2,"id":"0d081be8_656c8935","line":921,"updated":"2021-09-02 21:13:00.000000000","message":"nit: Should this be placed in a fakes module?","commit_id":"ab68606b8403b961e1c23596cd49f18e16ebed91"},{"author":{"_account_id":20813,"name":"Sofia Enriquez","email":"lsofia.enriquez@gmail.com","username":"enriquetaso"},"change_message_id":"d2532092bc3384a4e794f39cda1b187b913bb7e4","unresolved":true,"context_lines":[{"line_number":918,"context_line":"                         f\u0027snapshot-create --force {force_value} 123456\u0027)"},{"line_number":919,"context_line":"        self.assert_called_anytime(\u0027POST\u0027, \u0027/snapshots\u0027, body\u003dsnap_body_3_65)"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"    SNAP_BODY_3_66 \u003d {"},{"line_number":922,"context_line":"        \u0027snapshot\u0027: {"},{"line_number":923,"context_line":"            \u0027volume_id\u0027: \u0027123456\u0027,"},{"line_number":924,"context_line":"            \u0027name\u0027: None,"}],"source_content_type":"text/x-python","patch_set":2,"id":"0bf41ebe_b9052715","line":921,"in_reply_to":"0d081be8_656c8935","updated":"2021-09-02 22:00:00.000000000","message":"could be nice for a follow up, what about L908?","commit_id":"ab68606b8403b961e1c23596cd49f18e16ebed91"}],"cinderclient/v3/shell.py":[{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"799615a69415918a9fe4ab66631ea8f973e6a1ab","unresolved":true,"context_lines":[{"line_number":2220,"context_line":"           metavar\u003d\u0027\u003cname\u003e\u0027,"},{"line_number":2221,"context_line":"           default\u003dNone,"},{"line_number":2222,"context_line":"           help\u003d\u0027Snapshot name. Default\u003dNone.\u0027)"},{"line_number":2223,"context_line":"@utils.arg(\u0027--display-name\u0027,"},{"line_number":2224,"context_line":"           help\u003dargparse.SUPPRESS)"},{"line_number":2225,"context_line":"@utils.arg(\u0027--display_name\u0027,"},{"line_number":2226,"context_line":"           help\u003dargparse.SUPPRESS)"},{"line_number":2227,"context_line":"@utils.arg(\u0027--description\u0027,"},{"line_number":2228,"context_line":"           metavar\u003d\u0027\u003cdescription\u003e\u0027,"},{"line_number":2229,"context_line":"           default\u003dNone,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ee2d75aa_f96cd0d9","line":2226,"range":{"start_line":2223,"start_character":0,"end_line":2226,"end_character":34},"updated":"2021-09-02 08:05:11.000000000","message":"i don\u0027t see it mentioned anywhere that we\u0027re removing support for these parameters in 3.66","commit_id":"ab68606b8403b961e1c23596cd49f18e16ebed91"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"0916141a45e7ed32f4b59cb75dcfa133e44a650a","unresolved":true,"context_lines":[{"line_number":2220,"context_line":"           metavar\u003d\u0027\u003cname\u003e\u0027,"},{"line_number":2221,"context_line":"           default\u003dNone,"},{"line_number":2222,"context_line":"           help\u003d\u0027Snapshot name. Default\u003dNone.\u0027)"},{"line_number":2223,"context_line":"@utils.arg(\u0027--display-name\u0027,"},{"line_number":2224,"context_line":"           help\u003dargparse.SUPPRESS)"},{"line_number":2225,"context_line":"@utils.arg(\u0027--display_name\u0027,"},{"line_number":2226,"context_line":"           help\u003dargparse.SUPPRESS)"},{"line_number":2227,"context_line":"@utils.arg(\u0027--description\u0027,"},{"line_number":2228,"context_line":"           metavar\u003d\u0027\u003cdescription\u003e\u0027,"},{"line_number":2229,"context_line":"           default\u003dNone,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5bcff2c9_99d32f20","line":2226,"range":{"start_line":2223,"start_character":0,"end_line":2226,"end_character":34},"in_reply_to":"6c50a83b_f1f8d7a4","updated":"2021-09-02 12:35:05.000000000","message":"Actually, these are left-overs for v1 compatibility, so I don\u0027t see any reason to include them for 3.66.","commit_id":"ab68606b8403b961e1c23596cd49f18e16ebed91"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"3a28c26d55bc9987f89cae2927f6ac3cf3a5e0d6","unresolved":true,"context_lines":[{"line_number":2220,"context_line":"           metavar\u003d\u0027\u003cname\u003e\u0027,"},{"line_number":2221,"context_line":"           default\u003dNone,"},{"line_number":2222,"context_line":"           help\u003d\u0027Snapshot name. Default\u003dNone.\u0027)"},{"line_number":2223,"context_line":"@utils.arg(\u0027--display-name\u0027,"},{"line_number":2224,"context_line":"           help\u003dargparse.SUPPRESS)"},{"line_number":2225,"context_line":"@utils.arg(\u0027--display_name\u0027,"},{"line_number":2226,"context_line":"           help\u003dargparse.SUPPRESS)"},{"line_number":2227,"context_line":"@utils.arg(\u0027--description\u0027,"},{"line_number":2228,"context_line":"           metavar\u003d\u0027\u003cdescription\u003e\u0027,"},{"line_number":2229,"context_line":"           default\u003dNone,"}],"source_content_type":"text/x-python","patch_set":2,"id":"6c50a83b_f1f8d7a4","line":2226,"range":{"start_line":2223,"start_character":0,"end_line":2226,"end_character":34},"in_reply_to":"ee2d75aa_f96cd0d9","updated":"2021-09-02 12:12:43.000000000","message":"I just figured that anyone using 3.66 or greater wouldn\u0027t be using hidden legacy parameters, but you are correct, I shouldn\u0027t remove them as part of this patch.","commit_id":"ab68606b8403b961e1c23596cd49f18e16ebed91"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"799615a69415918a9fe4ab66631ea8f973e6a1ab","unresolved":true,"context_lines":[{"line_number":2228,"context_line":"           metavar\u003d\u0027\u003cdescription\u003e\u0027,"},{"line_number":2229,"context_line":"           default\u003dNone,"},{"line_number":2230,"context_line":"           help\u003d\u0027Snapshot description. Default\u003dNone.\u0027)"},{"line_number":2231,"context_line":"@utils.arg(\u0027--display-description\u0027,"},{"line_number":2232,"context_line":"           help\u003dargparse.SUPPRESS)"},{"line_number":2233,"context_line":"@utils.arg(\u0027--display_description\u0027,"},{"line_number":2234,"context_line":"           help\u003dargparse.SUPPRESS)"},{"line_number":2235,"context_line":"@utils.arg(\u0027--metadata\u0027,"},{"line_number":2236,"context_line":"           nargs\u003d\u0027*\u0027,"},{"line_number":2237,"context_line":"           metavar\u003d\u0027\u003ckey\u003dvalue\u003e\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"bdcc7e4c_a064abd5","line":2234,"range":{"start_line":2231,"start_character":0,"end_line":2234,"end_character":34},"updated":"2021-09-02 08:05:11.000000000","message":"same","commit_id":"ab68606b8403b961e1c23596cd49f18e16ebed91"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"7a959cc6c09e6f0577b668c4d1446ee9b50810c3","unresolved":true,"context_lines":[{"line_number":2319,"context_line":"                                              metadata\u003dsnapshot_metadata)"},{"line_number":2320,"context_line":"    except ValueError as ve:"},{"line_number":2321,"context_line":"        # make sure it\u0027s the exception we expect"},{"line_number":2322,"context_line":"        em \u003d cinderclient.v3.volume_snapshots.MV_3_66_FORCE_FLAG_ERROR"},{"line_number":2323,"context_line":"        if em \u003d\u003d str(ve):"},{"line_number":2324,"context_line":"            raise exceptions.UnsupportedAttribute("},{"line_number":2325,"context_line":"                \u0027force\u0027,"},{"line_number":2326,"context_line":"                start_version\u003dNone,"}],"source_content_type":"text/x-python","patch_set":9,"id":"2826d16c_59515887","line":2323,"range":{"start_line":2322,"start_character":8,"end_line":2323,"end_character":25},"updated":"2021-09-03 06:05:27.000000000","message":"will we have any other case than this? See my comments in cinderclient/v3/volume_snapshots.py file","commit_id":"c3c15f6cb2f50ec5bb2ae561d8fc61f27fae80d2"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"ee9c93ea47d6e93bcdb4cc71f94d6d73690241f7","unresolved":true,"context_lines":[{"line_number":2319,"context_line":"                                              metadata\u003dsnapshot_metadata)"},{"line_number":2320,"context_line":"    except ValueError as ve:"},{"line_number":2321,"context_line":"        # make sure it\u0027s the exception we expect"},{"line_number":2322,"context_line":"        em \u003d cinderclient.v3.volume_snapshots.MV_3_66_FORCE_FLAG_ERROR"},{"line_number":2323,"context_line":"        if em \u003d\u003d str(ve):"},{"line_number":2324,"context_line":"            raise exceptions.UnsupportedAttribute("},{"line_number":2325,"context_line":"                \u0027force\u0027,"},{"line_number":2326,"context_line":"                start_version\u003dNone,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a0ed69e_0a6f009d","line":2323,"range":{"start_line":2322,"start_character":8,"end_line":2323,"end_character":25},"in_reply_to":"2826d16c_59515887","updated":"2021-09-03 11:35:02.000000000","message":"Probably not now, but if the create() function is refactored, some other code might raise a ValueError.  So I figure it\u0027s better to make sure we have the correct exception before we turn it into an UnsupportedAttribute exception.","commit_id":"c3c15f6cb2f50ec5bb2ae561d8fc61f27fae80d2"}],"cinderclient/v3/volume_snapshots.py":[{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"799615a69415918a9fe4ab66631ea8f973e6a1ab","unresolved":true,"context_lines":[{"line_number":93,"context_line":"        :param metadata: Metadata of the snapshot"},{"line_number":94,"context_line":"        :rtype: :class:`Snapshot`"},{"line_number":95,"context_line":"        \"\"\""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        if metadata is None:"},{"line_number":98,"context_line":"            snapshot_metadata \u003d {}"},{"line_number":99,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"dc795752_953b15d1","side":"PARENT","line":96,"updated":"2021-09-02 08:05:11.000000000","message":"unrelated change?","commit_id":"4bad5ff2bff0cec883ceae0044af755669b7f2b5"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"3a28c26d55bc9987f89cae2927f6ac3cf3a5e0d6","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        :param metadata: Metadata of the snapshot"},{"line_number":94,"context_line":"        :rtype: :class:`Snapshot`"},{"line_number":95,"context_line":"        \"\"\""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        if metadata is None:"},{"line_number":98,"context_line":"            snapshot_metadata \u003d {}"},{"line_number":99,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"cc8b114b_e6960c53","side":"PARENT","line":96,"in_reply_to":"dc795752_953b15d1","updated":"2021-09-02 12:12:43.000000000","message":"Done","commit_id":"4bad5ff2bff0cec883ceae0044af755669b7f2b5"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"799615a69415918a9fe4ab66631ea8f973e6a1ab","unresolved":true,"context_lines":[{"line_number":119,"context_line":"        :param volume_id: The ID of the volume to snapshot."},{"line_number":120,"context_line":"        :param force: This is technically not valid after mv 3.66, but the"},{"line_number":121,"context_line":"        API silently accepts force\u003dTrue for backward compatibility, so I"},{"line_number":122,"context_line":"        guess we should, too"},{"line_number":123,"context_line":"        :param name: Name of the snapshot"},{"line_number":124,"context_line":"        :param description: Description of the snapshot"},{"line_number":125,"context_line":"        :param metadata: Metadata of the snapshot"}],"source_content_type":"text/x-python","patch_set":2,"id":"ebf0cbdf_05d19bc2","line":122,"range":{"start_line":122,"start_character":14,"end_line":122,"end_character":16},"updated":"2021-09-02 08:05:11.000000000","message":"client","commit_id":"ab68606b8403b961e1c23596cd49f18e16ebed91"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"3a28c26d55bc9987f89cae2927f6ac3cf3a5e0d6","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        :param volume_id: The ID of the volume to snapshot."},{"line_number":120,"context_line":"        :param force: This is technically not valid after mv 3.66, but the"},{"line_number":121,"context_line":"        API silently accepts force\u003dTrue for backward compatibility, so I"},{"line_number":122,"context_line":"        guess we should, too"},{"line_number":123,"context_line":"        :param name: Name of the snapshot"},{"line_number":124,"context_line":"        :param description: Description of the snapshot"},{"line_number":125,"context_line":"        :param metadata: Metadata of the snapshot"}],"source_content_type":"text/x-python","patch_set":2,"id":"106277c3_ad7b867a","line":122,"range":{"start_line":122,"start_character":14,"end_line":122,"end_character":16},"in_reply_to":"ebf0cbdf_05d19bc2","updated":"2021-09-02 12:12:43.000000000","message":"Done","commit_id":"ab68606b8403b961e1c23596cd49f18e16ebed91"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"799615a69415918a9fe4ab66631ea8f973e6a1ab","unresolved":true,"context_lines":[{"line_number":137,"context_line":"                             \u0027metadata\u0027: snapshot_metadata}}"},{"line_number":138,"context_line":"        if force is not None:"},{"line_number":139,"context_line":"            try:"},{"line_number":140,"context_line":"                force \u003d strutils.bool_from_string(force, strict\u003dTrue)"},{"line_number":141,"context_line":"                if not force:"},{"line_number":142,"context_line":"                    raise ValueError()"},{"line_number":143,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"85c46f94_9a84a900","line":140,"range":{"start_line":140,"start_character":16,"end_line":140,"end_character":21},"updated":"2021-09-02 08:05:11.000000000","message":"if force evaluates to False, should we fail this request on client side? Since we know it is going to fail on API","commit_id":"ab68606b8403b961e1c23596cd49f18e16ebed91"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"3a28c26d55bc9987f89cae2927f6ac3cf3a5e0d6","unresolved":true,"context_lines":[{"line_number":137,"context_line":"                             \u0027metadata\u0027: snapshot_metadata}}"},{"line_number":138,"context_line":"        if force is not None:"},{"line_number":139,"context_line":"            try:"},{"line_number":140,"context_line":"                force \u003d strutils.bool_from_string(force, strict\u003dTrue)"},{"line_number":141,"context_line":"                if not force:"},{"line_number":142,"context_line":"                    raise ValueError()"},{"line_number":143,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"a809711e_036e2d74","line":140,"range":{"start_line":140,"start_character":16,"end_line":140,"end_character":21},"in_reply_to":"85c46f94_9a84a900","updated":"2021-09-02 12:12:43.000000000","message":"if the value isn\u0027t boolean-ish, this call will raise the ValueError that we catch at line 143.  If it can be converted to boolean and is False, we raise at line 142 and get handled by the same except block.\n\nI\u0027ve been thinking about this, though, and I think I am raising the wrong exception at line 144, which is what the shell raises when you try to give a command an undefined option.  I think what I should do is raise a different ValueError here (one that has language similar to what the corresponding error on the cinder side says), and then call this from the shell function in a try block, and if I get a ValueError, convert it over there into an UnsupportedAttribute and then raise.\n\nSo I will definitely be revising this.","commit_id":"ab68606b8403b961e1c23596cd49f18e16ebed91"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"7a959cc6c09e6f0577b668c4d1446ee9b50810c3","unresolved":true,"context_lines":[{"line_number":144,"context_line":"                             \u0027metadata\u0027: snapshot_metadata}}"},{"line_number":145,"context_line":"        if force is not None:"},{"line_number":146,"context_line":"            try:"},{"line_number":147,"context_line":"                force \u003d strutils.bool_from_string(force, strict\u003dTrue)"},{"line_number":148,"context_line":"                if not force:"},{"line_number":149,"context_line":"                    raise ValueError()"},{"line_number":150,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":9,"id":"170f1ac3_38b1f2a3","line":147,"range":{"start_line":147,"start_character":16,"end_line":147,"end_character":69},"updated":"2021-09-03 06:05:27.000000000","message":"if force\u003dtest-foo, we reach the second case mentioned below","commit_id":"c3c15f6cb2f50ec5bb2ae561d8fc61f27fae80d2"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"7a959cc6c09e6f0577b668c4d1446ee9b50810c3","unresolved":true,"context_lines":[{"line_number":145,"context_line":"        if force is not None:"},{"line_number":146,"context_line":"            try:"},{"line_number":147,"context_line":"                force \u003d strutils.bool_from_string(force, strict\u003dTrue)"},{"line_number":148,"context_line":"                if not force:"},{"line_number":149,"context_line":"                    raise ValueError()"},{"line_number":150,"context_line":"            except ValueError:"},{"line_number":151,"context_line":"                raise ValueError(MV_3_66_FORCE_FLAG_ERROR)"},{"line_number":152,"context_line":"        return self._create(\u0027/snapshots\u0027, body, \u0027snapshot\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"67455077_0553f0b4","line":149,"range":{"start_line":148,"start_character":16,"end_line":149,"end_character":38},"updated":"2021-09-03 06:05:27.000000000","message":"if force\u003dFalse, we reach the first case mentioned below","commit_id":"c3c15f6cb2f50ec5bb2ae561d8fc61f27fae80d2"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"7a959cc6c09e6f0577b668c4d1446ee9b50810c3","unresolved":true,"context_lines":[{"line_number":147,"context_line":"                force \u003d strutils.bool_from_string(force, strict\u003dTrue)"},{"line_number":148,"context_line":"                if not force:"},{"line_number":149,"context_line":"                    raise ValueError()"},{"line_number":150,"context_line":"            except ValueError:"},{"line_number":151,"context_line":"                raise ValueError(MV_3_66_FORCE_FLAG_ERROR)"},{"line_number":152,"context_line":"        return self._create(\u0027/snapshots\u0027, body, \u0027snapshot\u0027)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def get(self, snapshot_id):"}],"source_content_type":"text/x-python","patch_set":9,"id":"78382c88_be9e373b","line":151,"range":{"start_line":150,"start_character":12,"end_line":151,"end_character":58},"updated":"2021-09-03 06:05:27.000000000","message":"IIUC this will be executed in 2 cases\n1) if force\u003dFalse, which is desired\n2) force\u003d\u003cinvalid value\u003e, the message says that we are ignoring everything except force\u003dTrue so that makes sense but again is it ok to have same error raised for force\u003dFalse (which was a valid value before) and any arbitrary value like force\u003dtest-foo","commit_id":"c3c15f6cb2f50ec5bb2ae561d8fc61f27fae80d2"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"14c54775d69a1d332d35e21af075da9ea85695be","unresolved":true,"context_lines":[{"line_number":147,"context_line":"                force \u003d strutils.bool_from_string(force, strict\u003dTrue)"},{"line_number":148,"context_line":"                if not force:"},{"line_number":149,"context_line":"                    raise ValueError()"},{"line_number":150,"context_line":"            except ValueError:"},{"line_number":151,"context_line":"                raise ValueError(MV_3_66_FORCE_FLAG_ERROR)"},{"line_number":152,"context_line":"        return self._create(\u0027/snapshots\u0027, body, \u0027snapshot\u0027)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def get(self, snapshot_id):"}],"source_content_type":"text/x-python","patch_set":9,"id":"08ec53f3_454ce9d5","line":151,"range":{"start_line":150,"start_character":12,"end_line":151,"end_character":58},"in_reply_to":"5534f0c3_897c1268","updated":"2021-09-03 12:09:49.000000000","message":"Makes sense, Thanks for the explanation.","commit_id":"c3c15f6cb2f50ec5bb2ae561d8fc61f27fae80d2"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"ee9c93ea47d6e93bcdb4cc71f94d6d73690241f7","unresolved":true,"context_lines":[{"line_number":147,"context_line":"                force \u003d strutils.bool_from_string(force, strict\u003dTrue)"},{"line_number":148,"context_line":"                if not force:"},{"line_number":149,"context_line":"                    raise ValueError()"},{"line_number":150,"context_line":"            except ValueError:"},{"line_number":151,"context_line":"                raise ValueError(MV_3_66_FORCE_FLAG_ERROR)"},{"line_number":152,"context_line":"        return self._create(\u0027/snapshots\u0027, body, \u0027snapshot\u0027)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def get(self, snapshot_id):"}],"source_content_type":"text/x-python","patch_set":9,"id":"5534f0c3_897c1268","line":151,"range":{"start_line":150,"start_character":12,"end_line":151,"end_character":58},"in_reply_to":"78382c88_be9e373b","updated":"2021-09-03 11:35:02.000000000","message":"Here\u0027s the strategy in change I6d45aeab0651, that introduces mv 3.66 in cinder:\n- we will silently ignore force\u003dTrue to accommodate scripts that already include \u0027force\u003dtrue\u0027 in the request\n- if the error message says \"force\" is not allowed, that\u0027s going to be confusing because if you try force\u003dTrue, the call succeeds, so we explain the \"silent ignore\" in the error message so it\u0027s clear it\u0027s designed behavior and not a bug\n- we don\u0027t accept force\u003dFalse because that would seem to imply that if a volume is in-use, the snapshot request should fail, whereas the whole point of mv 3.66 is that there is no such thing as a \"forced\" snapshot anymore\n\nSo here on the client side, officially \u0027force\u0027 is not a valid option to the snapshot-create call after mv 3.66.  However, we want to silently accept it (for backward compatibility, just as we did in the API).  So the point of the error message is to say that the *option* is bad, not that the *value* you supplied is bad.  Hence, I don\u0027t think we need to distinguish between a really bad value (\u0027test-foo\u0027) vs. a formerly-good-but-now-bad-value (\u0027false\u0027).\n\nFinally, the error message defined as MV_3_66_FORCE_FLAG_ERROR would only be seen by someone who uses this class directly.  From the shell, the user will see:\n\n  $ cinder --os-volume-api-version 3.66 snapshot-create --force false volume-name\n  ERROR: \u0027force\u0027 argument is not allowed after microversion 3.65\n\nwhich is the same thing you\u0027d see if we had not defined --force as a suppressed option for the new do_create_snapshot() function, and had simply added an \"end_version\" to the definition of that option on the old do_create_snapshot().  The difference is that if the user uses --force\u003dTrue with mv 3.66, the call will succeed.\n\nSo I think this really is the correct approach (or to be precise, this approach is the most consistent with what we decided to do on the cinder side).","commit_id":"c3c15f6cb2f50ec5bb2ae561d8fc61f27fae80d2"}]}
