)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8ccd14c1f11fe39d2a7c0272232db66eb8297f9a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4a24dd23_bf235b42","updated":"2023-05-18 14:14:04.000000000","message":"The reason you\u0027re not seeing that locally is likely because we aren\u0027t deleting the old doctrees and they contain a cached copy of that method","commit_id":"72b32b8f5e3604e609792b24ca09b13c1127493a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d692ace7dce7ed1160f5560bd3b0b8ff2c88938e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"bd63484c_573a3a05","updated":"2023-05-18 14:13:17.000000000","message":"The test failures are real:\n\n    /home/zuul/src/opendev.org/openstack/openstacksdk/doc/source/user/guides/image.rst:30: WARNING: Object named \u0027upload_image\u0027 not found in include file \u0027/home/zuul/src/opendev.org/openstack/openstacksdk/doc/source/user/examples/image/create.py\u0027\n\nYou need to update the \u0027doc/source/user/guides/image.rst\u0027 to replace the reference to \u0027upload_image\u0027 with \u0027create_image\u0027","commit_id":"72b32b8f5e3604e609792b24ca09b13c1127493a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7264467aeae7c880bf885aabe0dcf316ef53c107","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"dbd60a21_281a4a55","updated":"2023-05-22 10:32:28.000000000","message":"recheck looks like we ran out of space on CI","commit_id":"5985124f4f91e405b34b2e804fc200789de54a25"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7ac79ffd7c9fbecc24bda35957a83293dcb31519","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"d94fb43d_c9b57d41","updated":"2023-08-10 17:09:41.000000000","message":"We need to think about compatibility","commit_id":"31a8a6225061ea8d0b912f9c5e13f0ac4aab08cb"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"ca50f21a5c7502f14fd08b1a6b87d8479e6ed9eb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"a0d9a65c_cc931c3d","updated":"2023-09-18 09:48:23.000000000","message":"Thanks for the review !","commit_id":"46ff69e718fd683fd1047c2ba0ec5ab10af562ba"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"ba111583349e0d73b8007d4736cdde07095a9500","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"635490dd_13e63c24","updated":"2023-09-27 06:32:28.000000000","message":"I think ToDo is missing here as suggested by stephenfin","commit_id":"0fbd700c7489a118d5d2f2cee2c8ff22bb872108"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"84bc2f82af59bfe8d151c0c3e173e5675378b911","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"4fc00df9_da8b9988","updated":"2023-10-06 10:33:17.000000000","message":"Looks like you\u0027ve some open questions here. -1 to highlight those (I agree with them fwiw)","commit_id":"0fbd700c7489a118d5d2f2cee2c8ff22bb872108"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"1d2b99721ae6e3478e6d4228e80dc834668c1004","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"10be99ea_e32a640d","updated":"2023-09-28 00:15:49.000000000","message":"The parameter reordering is tricky but I think it should work :) Only a single question about a potential resource leak.","commit_id":"0fbd700c7489a118d5d2f2cee2c8ff22bb872108"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"6203bd8555c11256b4ef402095c3c7695ea6e143","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"89f92ac0_5a3cd9d0","updated":"2023-10-10 09:58:35.000000000","message":"recheck","commit_id":"052fa61b7159c853831fdbe652bbca797e5b61ac"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"14c9945271330c16f06a86a13b3488ab60ba4ef7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"a07c6a1b_fe507e85","updated":"2023-11-06 07:45:16.000000000","message":"recheck","commit_id":"5662609bd8db4d170abd1d065fa99e2a64d364ff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"59403f0d4191401ad037d584b5256f15e022d80e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"d1315837_ebf8ff1c","updated":"2023-11-01 09:31:01.000000000","message":"recheck","commit_id":"5662609bd8db4d170abd1d065fa99e2a64d364ff"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"aa05f8d10f612b6ffd9db07321498fbc4489188f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"3c6b4097_3b212bb8","updated":"2025-02-20 05:24:11.000000000","message":"recheck","commit_id":"ae2fcfdb384da6850178b03d3de73ddb61372893"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"9c52fd5e9c4a3bc14668e8497cfe69af842b1e87","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"13b5b9bd_93584bd7","updated":"2025-05-16 05:13:52.000000000","message":"recheck","commit_id":"757284506535bfc697dea907c6f7579598dee67e"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"9e0603e02834335e19a5f77247e66cef0bfc010b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"236acb57_f8cab23d","updated":"2025-05-14 13:08:10.000000000","message":"recheck","commit_id":"757284506535bfc697dea907c6f7579598dee67e"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"98dbbb9df6f444b6ec6f451caa42fdead63318b6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"e061bb07_2c0f8a30","updated":"2025-05-08 08:24:28.000000000","message":"recheck","commit_id":"757284506535bfc697dea907c6f7579598dee67e"}],"openstack/image/v2/_proxy.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7b9f325ced50b8c19c5200d916de7b56e8e3090a","unresolved":true,"context_lines":[{"line_number":507,"context_line":"            \"upload_image is deprecated. Use create_image instead.\","},{"line_number":508,"context_line":"            os_warnings.OpenStackDeprecationWarning,"},{"line_number":509,"context_line":"        )"},{"line_number":510,"context_line":"        # container_format and disk_format are required to be set"},{"line_number":511,"context_line":"        # on the image by the time upload_image is called, but they\u0027re not"},{"line_number":512,"context_line":"        # required by the _create call. Enforce them here so that we don\u0027t"},{"line_number":513,"context_line":"        # need to handle a failure in _create, as upload_image will"},{"line_number":514,"context_line":"        # return a 400 with a message about disk_format and container_format"},{"line_number":515,"context_line":"        # not being set."},{"line_number":516,"context_line":"        if not all([container_format, disk_format]):"},{"line_number":517,"context_line":"            raise exceptions.InvalidRequest("},{"line_number":518,"context_line":"                \"Both container_format and disk_format are required\""},{"line_number":519,"context_line":"            )"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        img \u003d self._create("},{"line_number":522,"context_line":"            _image.Image,"}],"source_content_type":"text/x-python","patch_set":6,"id":"025fd005_040ff242","side":"PARENT","line":519,"range":{"start_line":510,"start_character":8,"end_line":519,"end_character":13},"updated":"2023-08-10 14:45:41.000000000","message":"So are you assuming container and disk format are set while creating the image?\nAFAIK those are not compulsory while creating the image.\n\nThis check should remain here as it is but after line 506","commit_id":"ef680f022e2a9db7106b904e885790e9be22c333"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7ac79ffd7c9fbecc24bda35957a83293dcb31519","unresolved":true,"context_lines":[{"line_number":507,"context_line":"            \"upload_image is deprecated. Use create_image instead.\","},{"line_number":508,"context_line":"            os_warnings.OpenStackDeprecationWarning,"},{"line_number":509,"context_line":"        )"},{"line_number":510,"context_line":"        # container_format and disk_format are required to be set"},{"line_number":511,"context_line":"        # on the image by the time upload_image is called, but they\u0027re not"},{"line_number":512,"context_line":"        # required by the _create call. Enforce them here so that we don\u0027t"},{"line_number":513,"context_line":"        # need to handle a failure in _create, as upload_image will"},{"line_number":514,"context_line":"        # return a 400 with a message about disk_format and container_format"},{"line_number":515,"context_line":"        # not being set."},{"line_number":516,"context_line":"        if not all([container_format, disk_format]):"},{"line_number":517,"context_line":"            raise exceptions.InvalidRequest("},{"line_number":518,"context_line":"                \"Both container_format and disk_format are required\""},{"line_number":519,"context_line":"            )"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        img \u003d self._create("},{"line_number":522,"context_line":"            _image.Image,"}],"source_content_type":"text/x-python","patch_set":6,"id":"aa5f0c83_284088b5","side":"PARENT","line":519,"range":{"start_line":510,"start_character":8,"end_line":519,"end_character":13},"in_reply_to":"025fd005_040ff242","updated":"2023-08-10 17:09:41.000000000","message":"Are you looking at the correct part of the diff? This code is being removed\n\n(fwiw, I use side-by-side view for this reason among others 😅)","commit_id":"ef680f022e2a9db7106b904e885790e9be22c333"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"84bc2f82af59bfe8d151c0c3e173e5675378b911","unresolved":false,"context_lines":[{"line_number":507,"context_line":"            \"upload_image is deprecated. Use create_image instead.\","},{"line_number":508,"context_line":"            os_warnings.OpenStackDeprecationWarning,"},{"line_number":509,"context_line":"        )"},{"line_number":510,"context_line":"        # container_format and disk_format are required to be set"},{"line_number":511,"context_line":"        # on the image by the time upload_image is called, but they\u0027re not"},{"line_number":512,"context_line":"        # required by the _create call. Enforce them here so that we don\u0027t"},{"line_number":513,"context_line":"        # need to handle a failure in _create, as upload_image will"},{"line_number":514,"context_line":"        # return a 400 with a message about disk_format and container_format"},{"line_number":515,"context_line":"        # not being set."},{"line_number":516,"context_line":"        if not all([container_format, disk_format]):"},{"line_number":517,"context_line":"            raise exceptions.InvalidRequest("},{"line_number":518,"context_line":"                \"Both container_format and disk_format are required\""},{"line_number":519,"context_line":"            )"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        img \u003d self._create("},{"line_number":522,"context_line":"            _image.Image,"}],"source_content_type":"text/x-python","patch_set":6,"id":"beb8785a_8cec6849","side":"PARENT","line":519,"range":{"start_line":510,"start_character":8,"end_line":519,"end_character":13},"in_reply_to":"aa5f0c83_284088b5","updated":"2023-10-06 10:33:17.000000000","message":"Done","commit_id":"ef680f022e2a9db7106b904e885790e9be22c333"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7ac79ffd7c9fbecc24bda35957a83293dcb31519","unresolved":true,"context_lines":[{"line_number":479,"context_line":"        self,"},{"line_number":480,"context_line":"        image,"},{"line_number":481,"context_line":"        store\u003dNone,"},{"line_number":482,"context_line":"        filename\u003dNone,"},{"line_number":483,"context_line":"        data\u003dNone,"},{"line_number":484,"context_line":"        **attrs,"},{"line_number":485,"context_line":"    ):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3140af2c_18a11d86","line":482,"updated":"2023-08-10 17:09:41.000000000","message":"You can\u0027t do this. At least, not like this. There are likely callers of this API and this would be a breaking change. For example, [this code](https://opendev.org/openstack/openstack-ansible-ops/src/branch/master/bowling_ball/rolling_tests.py#L142-L150). Unfortunately we need to provide a transition layer. It\u0027s going to be complicated too, since we\u0027re moving things around. I _think_ we can have a bit of hack though: if `image` is set to an image ID or an Image object, then we can assume that folks are using the \"modern\" method signature. If they are not, we can assume they are using the old format? Something like the following pseudocode:\n\n```\nif image is not a UUID and is not an Image instance:\n    print deprecation warning\n    treat image as container_format\n    treat store as disk_format\n```\n\nNote that I attempt to check if this is a UUID rather than checking if the image exists since we don\u0027t want to erroneously fall into this logic if the user makes a typo in an image ID.\n\nAlternatively, and probably better, we could flip this on its head and check if `image` matches one of the known values for `container_format`. Essentially:\n\n```\nif image in (\u0027ami\u0027, \u0027ari\u0027, ...):\n    print deprecation warning\n    treat image as container_format\n    treat store as disk_format\n```\n\nthis might actually be a better check since it\u0027s less fragile. wdyt?","commit_id":"31a8a6225061ea8d0b912f9c5e13f0ac4aab08cb"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2336c6eb684d38ffad7e7f36489810bea4f4a58a","unresolved":false,"context_lines":[{"line_number":479,"context_line":"        self,"},{"line_number":480,"context_line":"        image,"},{"line_number":481,"context_line":"        store\u003dNone,"},{"line_number":482,"context_line":"        filename\u003dNone,"},{"line_number":483,"context_line":"        data\u003dNone,"},{"line_number":484,"context_line":"        **attrs,"},{"line_number":485,"context_line":"    ):"}],"source_content_type":"text/x-python","patch_set":6,"id":"8494fd1a_ab2f4812","line":482,"in_reply_to":"080f5d0d_2b0fc812","updated":"2023-09-14 09:03:24.000000000","message":"See my comment below.","commit_id":"31a8a6225061ea8d0b912f9c5e13f0ac4aab08cb"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"486c69ceaa9df7f5f00c97b52754ae208929ecf1","unresolved":true,"context_lines":[{"line_number":479,"context_line":"        self,"},{"line_number":480,"context_line":"        image,"},{"line_number":481,"context_line":"        store\u003dNone,"},{"line_number":482,"context_line":"        filename\u003dNone,"},{"line_number":483,"context_line":"        data\u003dNone,"},{"line_number":484,"context_line":"        **attrs,"},{"line_number":485,"context_line":"    ):"}],"source_content_type":"text/x-python","patch_set":6,"id":"a498f498_6508cbeb","line":482,"in_reply_to":"3140af2c_18a11d86","updated":"2023-08-10 18:29:43.000000000","message":"I think the code you referred here passes kwrgs to upload call so will it fail to recognize positional argument?\n\nlike;\ndef tesst(a\u003dNone, b\u003dNone, c\u003dNone, **attrs):\n    print(\"Hi\")\n\ntesst(123, a\u003d1234, b\u003d\u0027abcd\u0027)\n\nTypeError: tesst() got multiple values for argument \u0027a\u0027\n\n\nI think better way is to make image as kwargs as well and keep the old code as it is if image is None until we complete the transition?","commit_id":"31a8a6225061ea8d0b912f9c5e13f0ac4aab08cb"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"19c547fdfbebfc95d33dfb9895ac53e202b3d9f6","unresolved":true,"context_lines":[{"line_number":479,"context_line":"        self,"},{"line_number":480,"context_line":"        image,"},{"line_number":481,"context_line":"        store\u003dNone,"},{"line_number":482,"context_line":"        filename\u003dNone,"},{"line_number":483,"context_line":"        data\u003dNone,"},{"line_number":484,"context_line":"        **attrs,"},{"line_number":485,"context_line":"    ):"}],"source_content_type":"text/x-python","patch_set":6,"id":"080f5d0d_2b0fc812","line":482,"in_reply_to":"a498f498_6508cbeb","updated":"2023-08-14 08:09:01.000000000","message":"Ack, @stephenfin could you please suggest reference on how I can proceed with it","commit_id":"31a8a6225061ea8d0b912f9c5e13f0ac4aab08cb"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"486c69ceaa9df7f5f00c97b52754ae208929ecf1","unresolved":true,"context_lines":[{"line_number":503,"context_line":"                \u0027filename and data are mutually exclusive\u0027"},{"line_number":504,"context_line":"            )"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"        image \u003d self._get_resource(_image.Image, image)"},{"line_number":507,"context_line":"        if store:"},{"line_number":508,"context_line":"            store \u003d self._get_resource(_si.Store, store)"},{"line_number":509,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"8c4d56bc_048a88f6","line":506,"updated":"2023-08-10 18:29:43.000000000","message":"I added the comment at wrong side, so let me rephrase my comment here again.\n\nWhat happens if image fetched at line 506 doesn\u0027t have container_format and disk_format set?","commit_id":"31a8a6225061ea8d0b912f9c5e13f0ac4aab08cb"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"5f882c8f4b94cc5b39d19805df754d4289c403ef","unresolved":false,"context_lines":[{"line_number":503,"context_line":"                \u0027filename and data are mutually exclusive\u0027"},{"line_number":504,"context_line":"            )"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"        image \u003d self._get_resource(_image.Image, image)"},{"line_number":507,"context_line":"        if store:"},{"line_number":508,"context_line":"            store \u003d self._get_resource(_si.Store, store)"},{"line_number":509,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"4312350e_631bac84","line":506,"in_reply_to":"8c4d56bc_048a88f6","updated":"2023-08-28 08:07:33.000000000","message":"Ack","commit_id":"31a8a6225061ea8d0b912f9c5e13f0ac4aab08cb"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8ede89affaf21983f5b822587aaac9a4cfc8051e","unresolved":true,"context_lines":[{"line_number":480,"context_line":"    def upload_image("},{"line_number":481,"context_line":"        self,"},{"line_number":482,"context_line":"        image\u003dNone,"},{"line_number":483,"context_line":"        store\u003dNone,"},{"line_number":484,"context_line":"        filename\u003dNone,"},{"line_number":485,"context_line":"        data\u003dNone,"},{"line_number":486,"context_line":"        container_format\u003dNone,"}],"source_content_type":"text/x-python","patch_set":7,"id":"4d0214b3_de8d7f8e","line":483,"updated":"2023-09-14 09:05:26.000000000","message":"Can you make everything after `store` a kwarg-only argument? So\n\n```\ndef upload_image(\n    self,\n    image\u003dNone,\n    store\u003dNone,\n    *,\n    filename\u003dNone,\n    ...\n):\n    ...\n```\n\nI\u0027d like to make `store` a kwarg-only argument too, but that will break users of the legacy API too quickly.","commit_id":"46ff69e718fd683fd1047c2ba0ec5ab10af562ba"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"ca50f21a5c7502f14fd08b1a6b87d8479e6ed9eb","unresolved":false,"context_lines":[{"line_number":480,"context_line":"    def upload_image("},{"line_number":481,"context_line":"        self,"},{"line_number":482,"context_line":"        image\u003dNone,"},{"line_number":483,"context_line":"        store\u003dNone,"},{"line_number":484,"context_line":"        filename\u003dNone,"},{"line_number":485,"context_line":"        data\u003dNone,"},{"line_number":486,"context_line":"        container_format\u003dNone,"}],"source_content_type":"text/x-python","patch_set":7,"id":"6a80cb21_e7635f79","line":483,"in_reply_to":"4d0214b3_de8d7f8e","updated":"2023-09-18 09:48:23.000000000","message":"Ack","commit_id":"46ff69e718fd683fd1047c2ba0ec5ab10af562ba"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2336c6eb684d38ffad7e7f36489810bea4f4a58a","unresolved":true,"context_lines":[{"line_number":506,"context_line":"            warnings.warn("},{"line_number":507,"context_line":"                \"Image ID or object is required for uploading image \","},{"line_number":508,"context_line":"                os_warnings.OpenStackDeprecationWarning,"},{"line_number":509,"context_line":"            )"},{"line_number":510,"context_line":"            # container_format and disk_format are required to be set"},{"line_number":511,"context_line":"            # on the image by the time upload_image is called, but they\u0027re not"},{"line_number":512,"context_line":"            # required by the _create call. Enforce them here so that we don\u0027t"}],"source_content_type":"text/x-python","patch_set":7,"id":"fc092b80_dbbfdae2","line":509,"updated":"2023-09-14 09:03:24.000000000","message":"How about we change this to:\n\n```\nif image is None or image in (\n    \u0027ami\u0027, \u0027ari\u0027, \u0027aki\u0027, \u0027bare\u0027, \u0027ovf\u0027, \u0027ova\u0027, \u0027docker\u0027, \u0027compressed\u0027\n):\n    warnings.warn(\n        \"The signature for \u0027upload_image\u0027 has changed. You must now pass an \"\n        \"existing image as the first argument. This will be a failure in the \"\n        \"next major version.\"\n    )\n    \n    if image is not None:\n        # remap the arguments\n        container_format \u003d image\n        disk_format \u003d store\n        \n    # container_format and disk_format ...\n```\n\nSo that will handle people calling `upload_image` like so:\n\n```\nupload_image(\u0027bare\u0027, \u0027qcow2\u0027)\n```\n\nWe will remap \"`image`\" to `container_format` and \"`store`\" to `disk_format`.\n\nWe should also add a TODO above to remove this in version 2.0.","commit_id":"46ff69e718fd683fd1047c2ba0ec5ab10af562ba"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"ca50f21a5c7502f14fd08b1a6b87d8479e6ed9eb","unresolved":false,"context_lines":[{"line_number":506,"context_line":"            warnings.warn("},{"line_number":507,"context_line":"                \"Image ID or object is required for uploading image \","},{"line_number":508,"context_line":"                os_warnings.OpenStackDeprecationWarning,"},{"line_number":509,"context_line":"            )"},{"line_number":510,"context_line":"            # container_format and disk_format are required to be set"},{"line_number":511,"context_line":"            # on the image by the time upload_image is called, but they\u0027re not"},{"line_number":512,"context_line":"            # required by the _create call. Enforce them here so that we don\u0027t"}],"source_content_type":"text/x-python","patch_set":7,"id":"e06ad0d7_18a6eb3f","line":509,"in_reply_to":"fc092b80_dbbfdae2","updated":"2023-09-18 09:48:23.000000000","message":"Done","commit_id":"46ff69e718fd683fd1047c2ba0ec5ab10af562ba"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5b3410c828829fb1ee34f5ed5be1dba0aa39d6fa","unresolved":true,"context_lines":[{"line_number":517,"context_line":"                raise exceptions.InvalidRequest("},{"line_number":518,"context_line":"                    \"Both container_format and disk_format are required\""},{"line_number":519,"context_line":"                )"},{"line_number":520,"context_line":"            image \u003d self._create("},{"line_number":521,"context_line":"                _image.Image,"},{"line_number":522,"context_line":"                disk_format\u003ddisk_format,"},{"line_number":523,"context_line":"                container_format\u003dcontainer_format,"},{"line_number":524,"context_line":"                **attrs,"},{"line_number":525,"context_line":"            )"},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"        image \u003d self._get_resource(_image.Image, image)"},{"line_number":528,"context_line":"        if not all([image.container_format, image.disk_format]):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1f144426_ee8944dc","line":525,"range":{"start_line":520,"start_character":12,"end_line":525,"end_character":13},"updated":"2023-09-11 06:33:59.000000000","message":"So if image is None then you are creating a image here before uploading the data to it, right?\n\nIn this case your warning at line 507 should say that Image not exist, Creating new image before uploading the data.\n\nOr reject the call with error.","commit_id":"46ff69e718fd683fd1047c2ba0ec5ab10af562ba"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"ca50f21a5c7502f14fd08b1a6b87d8479e6ed9eb","unresolved":true,"context_lines":[{"line_number":517,"context_line":"                raise exceptions.InvalidRequest("},{"line_number":518,"context_line":"                    \"Both container_format and disk_format are required\""},{"line_number":519,"context_line":"                )"},{"line_number":520,"context_line":"            image \u003d self._create("},{"line_number":521,"context_line":"                _image.Image,"},{"line_number":522,"context_line":"                disk_format\u003ddisk_format,"},{"line_number":523,"context_line":"                container_format\u003dcontainer_format,"},{"line_number":524,"context_line":"                **attrs,"},{"line_number":525,"context_line":"            )"},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"        image \u003d self._get_resource(_image.Image, image)"},{"line_number":528,"context_line":"        if not all([image.container_format, image.disk_format]):"}],"source_content_type":"text/x-python","patch_set":7,"id":"a94b0be2_34075fe8","line":525,"range":{"start_line":520,"start_character":12,"end_line":525,"end_character":13},"in_reply_to":"1f144426_ee8944dc","updated":"2023-09-18 09:48:23.000000000","message":"Updated the warning","commit_id":"46ff69e718fd683fd1047c2ba0ec5ab10af562ba"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"de39e0e3a597993085f4e4ffeb89eaee823ee527","unresolved":false,"context_lines":[{"line_number":517,"context_line":"                raise exceptions.InvalidRequest("},{"line_number":518,"context_line":"                    \"Both container_format and disk_format are required\""},{"line_number":519,"context_line":"                )"},{"line_number":520,"context_line":"            image \u003d self._create("},{"line_number":521,"context_line":"                _image.Image,"},{"line_number":522,"context_line":"                disk_format\u003ddisk_format,"},{"line_number":523,"context_line":"                container_format\u003dcontainer_format,"},{"line_number":524,"context_line":"                **attrs,"},{"line_number":525,"context_line":"            )"},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"        image \u003d self._get_resource(_image.Image, image)"},{"line_number":528,"context_line":"        if not all([image.container_format, image.disk_format]):"}],"source_content_type":"text/x-python","patch_set":7,"id":"6948cfd9_6b65d2fb","line":525,"range":{"start_line":520,"start_character":12,"end_line":525,"end_character":13},"in_reply_to":"a94b0be2_34075fe8","updated":"2023-11-08 15:59:29.000000000","message":"Done","commit_id":"46ff69e718fd683fd1047c2ba0ec5ab10af562ba"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5b3410c828829fb1ee34f5ed5be1dba0aa39d6fa","unresolved":true,"context_lines":[{"line_number":524,"context_line":"                **attrs,"},{"line_number":525,"context_line":"            )"},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"        image \u003d self._get_resource(_image.Image, image)"},{"line_number":528,"context_line":"        if not all([image.container_format, image.disk_format]):"},{"line_number":529,"context_line":"            raise exceptions.InvalidRequest("},{"line_number":530,"context_line":"                \"Both container_format and disk_format are required for \""},{"line_number":531,"context_line":"                \"uploading an image\""},{"line_number":532,"context_line":"            )"},{"line_number":533,"context_line":"        if filename and data:"},{"line_number":534,"context_line":"            raise exceptions.SDKException("},{"line_number":535,"context_line":"                \u0027filename and data are mutually exclusive\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"cdbf14c0_f952cc3d","line":532,"range":{"start_line":527,"start_character":7,"end_line":532,"end_character":13},"updated":"2023-09-11 06:33:59.000000000","message":"this should be else part if  you decided not to exit in if condition of line 505","commit_id":"46ff69e718fd683fd1047c2ba0ec5ab10af562ba"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"de39e0e3a597993085f4e4ffeb89eaee823ee527","unresolved":true,"context_lines":[{"line_number":524,"context_line":"                **attrs,"},{"line_number":525,"context_line":"            )"},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"        image \u003d self._get_resource(_image.Image, image)"},{"line_number":528,"context_line":"        if not all([image.container_format, image.disk_format]):"},{"line_number":529,"context_line":"            raise exceptions.InvalidRequest("},{"line_number":530,"context_line":"                \"Both container_format and disk_format are required for \""},{"line_number":531,"context_line":"                \"uploading an image\""},{"line_number":532,"context_line":"            )"},{"line_number":533,"context_line":"        if filename and data:"},{"line_number":534,"context_line":"            raise exceptions.SDKException("},{"line_number":535,"context_line":"                \u0027filename and data are mutually exclusive\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa44a6a9_c60c0382","line":532,"range":{"start_line":527,"start_character":7,"end_line":532,"end_character":13},"in_reply_to":"cdbf14c0_f952cc3d","updated":"2023-11-08 15:59:29.000000000","message":"I mean this works, but it would definitely be more efficient to avoid fetching after creating.","commit_id":"46ff69e718fd683fd1047c2ba0ec5ab10af562ba"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"f47fb74e5bf1c2437ca3e595a43d3424a13ccf8d","unresolved":false,"context_lines":[{"line_number":524,"context_line":"                **attrs,"},{"line_number":525,"context_line":"            )"},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"        image \u003d self._get_resource(_image.Image, image)"},{"line_number":528,"context_line":"        if not all([image.container_format, image.disk_format]):"},{"line_number":529,"context_line":"            raise exceptions.InvalidRequest("},{"line_number":530,"context_line":"                \"Both container_format and disk_format are required for \""},{"line_number":531,"context_line":"                \"uploading an image\""},{"line_number":532,"context_line":"            )"},{"line_number":533,"context_line":"        if filename and data:"},{"line_number":534,"context_line":"            raise exceptions.SDKException("},{"line_number":535,"context_line":"                \u0027filename and data are mutually exclusive\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"e5b3b96b_aea9d8ad","line":532,"range":{"start_line":527,"start_character":7,"end_line":532,"end_character":13},"in_reply_to":"fa44a6a9_c60c0382","updated":"2023-11-21 06:06:15.000000000","message":"Acknowledged","commit_id":"46ff69e718fd683fd1047c2ba0ec5ab10af562ba"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"1d2b99721ae6e3478e6d4228e80dc834668c1004","unresolved":true,"context_lines":[{"line_number":571,"context_line":"            store \u003d self._get_resource(_si.Store, store)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        if filename:"},{"line_number":574,"context_line":"            image.data \u003d open(filename, \u0027rb\u0027)"},{"line_number":575,"context_line":"        elif data:"},{"line_number":576,"context_line":"            image.data \u003d data"},{"line_number":577,"context_line":"        image.upload(self, store\u003dstore)"}],"source_content_type":"text/x-python","patch_set":10,"id":"f348d53d_81d01398","line":574,"range":{"start_line":574,"start_character":39,"end_line":574,"end_character":40},"updated":"2023-09-28 00:15:49.000000000","message":"Whose responsability is it to close this?","commit_id":"0fbd700c7489a118d5d2f2cee2c8ff22bb872108"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"c204aefdc3d6fc82aa1178ba1fbab80725455d6a","unresolved":false,"context_lines":[{"line_number":571,"context_line":"            store \u003d self._get_resource(_si.Store, store)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        if filename:"},{"line_number":574,"context_line":"            image.data \u003d open(filename, \u0027rb\u0027)"},{"line_number":575,"context_line":"        elif data:"},{"line_number":576,"context_line":"            image.data \u003d data"},{"line_number":577,"context_line":"        image.upload(self, store\u003dstore)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7ca10aa3_db8839b7","line":574,"range":{"start_line":574,"start_character":39,"end_line":574,"end_character":40},"in_reply_to":"2d83feb5_68f3c29c","updated":"2023-10-09 06:30:37.000000000","message":"Done","commit_id":"0fbd700c7489a118d5d2f2cee2c8ff22bb872108"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"feb78de0b3602ebdcddfd63536bf6e00ce6d2461","unresolved":true,"context_lines":[{"line_number":571,"context_line":"            store \u003d self._get_resource(_si.Store, store)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        if filename:"},{"line_number":574,"context_line":"            image.data \u003d open(filename, \u0027rb\u0027)"},{"line_number":575,"context_line":"        elif data:"},{"line_number":576,"context_line":"            image.data \u003d data"},{"line_number":577,"context_line":"        image.upload(self, store\u003dstore)"}],"source_content_type":"text/x-python","patch_set":10,"id":"2d83feb5_68f3c29c","line":574,"range":{"start_line":574,"start_character":39,"end_line":574,"end_character":40},"in_reply_to":"f348d53d_81d01398","updated":"2023-10-06 10:34:00.000000000","message":"I think this should be us. We can close it after the `image.upload` call below, right?","commit_id":"0fbd700c7489a118d5d2f2cee2c8ff22bb872108"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4c852954e6d30239ee4a423ef720f1953cb35277","unresolved":true,"context_lines":[{"line_number":481,"context_line":"        self,"},{"line_number":482,"context_line":"        image\u003dNone,"},{"line_number":483,"context_line":"        store\u003dNone,"},{"line_number":484,"context_line":"        *,"},{"line_number":485,"context_line":"        filename\u003dNone,"},{"line_number":486,"context_line":"        data\u003dNone,"},{"line_number":487,"context_line":"        container_format\u003dNone,"}],"source_content_type":"text/x-python","patch_set":13,"id":"283f2c8e_53ef7c1f","line":484,"updated":"2023-11-07 07:02:42.000000000","message":"what does this * signifies here?","commit_id":"5662609bd8db4d170abd1d065fa99e2a64d364ff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"de39e0e3a597993085f4e4ffeb89eaee823ee527","unresolved":true,"context_lines":[{"line_number":481,"context_line":"        self,"},{"line_number":482,"context_line":"        image\u003dNone,"},{"line_number":483,"context_line":"        store\u003dNone,"},{"line_number":484,"context_line":"        *,"},{"line_number":485,"context_line":"        filename\u003dNone,"},{"line_number":486,"context_line":"        data\u003dNone,"},{"line_number":487,"context_line":"        container_format\u003dNone,"}],"source_content_type":"text/x-python","patch_set":13,"id":"6d9ff6a6_88bd9341","line":484,"in_reply_to":"283f2c8e_53ef7c1f","updated":"2023-11-08 15:59:29.000000000","message":"It means everything after this is a kwarg-only argument. https://peps.python.org/pep-3102/ This allows us to change the order of arguments over time without breaking users. We\u0027re doing this so that we can avoid having to check things for users that call us like e.g. `upload_image(container_format\u003dxxx, disk_format\u003dxxx)`.","commit_id":"5662609bd8db4d170abd1d065fa99e2a64d364ff"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"3d03eb907d4860479df8dea844d67f30d97aeaac","unresolved":false,"context_lines":[{"line_number":481,"context_line":"        self,"},{"line_number":482,"context_line":"        image\u003dNone,"},{"line_number":483,"context_line":"        store\u003dNone,"},{"line_number":484,"context_line":"        *,"},{"line_number":485,"context_line":"        filename\u003dNone,"},{"line_number":486,"context_line":"        data\u003dNone,"},{"line_number":487,"context_line":"        container_format\u003dNone,"}],"source_content_type":"text/x-python","patch_set":13,"id":"201f704a_f043cbfd","line":484,"in_reply_to":"6d9ff6a6_88bd9341","updated":"2024-03-04 06:48:34.000000000","message":"Acknowledged","commit_id":"5662609bd8db4d170abd1d065fa99e2a64d364ff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ddc0adb23f67fb79afbdd08968918f3737f5cd20","unresolved":true,"context_lines":[{"line_number":499,"context_line":"        :param data: The data to be uploaded as an image."},{"line_number":500,"context_line":"        :param dict attrs: Keyword arguments which will be used to create"},{"line_number":501,"context_line":"            a :class:`~openstack.image.v2.image.Image`, comprised of the"},{"line_number":502,"context_line":"            properties on the Image class."},{"line_number":503,"context_line":"        :returns: The results of image creation"},{"line_number":504,"context_line":"        :rtype: :class:`~openstack.image.v2.image.Image`"},{"line_number":505,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"a338b629_050922ae","line":502,"updated":"2023-11-08 16:01:33.000000000","message":"Could you put a `versionchanged` admonition in here highlighting the fact this changed argument order but that we\u0027re handling order change? Use the next minor version as the version and we\u0027ll try get it merged before is released.\n\n```\n.. versionchanged:: 2.1.0\n\n   \u003cnote here\u003e\n```","commit_id":"5662609bd8db4d170abd1d065fa99e2a64d364ff"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"f47fb74e5bf1c2437ca3e595a43d3424a13ccf8d","unresolved":false,"context_lines":[{"line_number":499,"context_line":"        :param data: The data to be uploaded as an image."},{"line_number":500,"context_line":"        :param dict attrs: Keyword arguments which will be used to create"},{"line_number":501,"context_line":"            a :class:`~openstack.image.v2.image.Image`, comprised of the"},{"line_number":502,"context_line":"            properties on the Image class."},{"line_number":503,"context_line":"        :returns: The results of image creation"},{"line_number":504,"context_line":"        :rtype: :class:`~openstack.image.v2.image.Image`"},{"line_number":505,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"d94ec596_8683133b","line":502,"in_reply_to":"a338b629_050922ae","updated":"2023-11-21 06:06:15.000000000","message":"Done","commit_id":"5662609bd8db4d170abd1d065fa99e2a64d364ff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"de39e0e3a597993085f4e4ffeb89eaee823ee527","unresolved":true,"context_lines":[{"line_number":519,"context_line":"                \"next major version.\","},{"line_number":520,"context_line":"                os_warnings.OpenStackDeprecationWarning,"},{"line_number":521,"context_line":"            )"},{"line_number":522,"context_line":"            # TODO(mrjoshi) remove this in version 2.0."},{"line_number":523,"context_line":"            if image is not None:"},{"line_number":524,"context_line":"                # remap the arguments"},{"line_number":525,"context_line":"                container_format \u003d image"}],"source_content_type":"text/x-python","patch_set":13,"id":"e22eb9a0_a99297a4","line":522,"range":{"start_line":522,"start_character":51,"end_line":522,"end_character":54},"updated":"2023-11-08 15:59:29.000000000","message":"3.0","commit_id":"5662609bd8db4d170abd1d065fa99e2a64d364ff"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"f47fb74e5bf1c2437ca3e595a43d3424a13ccf8d","unresolved":false,"context_lines":[{"line_number":519,"context_line":"                \"next major version.\","},{"line_number":520,"context_line":"                os_warnings.OpenStackDeprecationWarning,"},{"line_number":521,"context_line":"            )"},{"line_number":522,"context_line":"            # TODO(mrjoshi) remove this in version 2.0."},{"line_number":523,"context_line":"            if image is not None:"},{"line_number":524,"context_line":"                # remap the arguments"},{"line_number":525,"context_line":"                container_format \u003d image"}],"source_content_type":"text/x-python","patch_set":13,"id":"eaaed566_31c91733","line":522,"range":{"start_line":522,"start_character":51,"end_line":522,"end_character":54},"in_reply_to":"e22eb9a0_a99297a4","updated":"2023-11-21 06:06:15.000000000","message":"Done","commit_id":"5662609bd8db4d170abd1d065fa99e2a64d364ff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"de39e0e3a597993085f4e4ffeb89eaee823ee527","unresolved":true,"context_lines":[{"line_number":565,"context_line":"        if filename and data:"},{"line_number":566,"context_line":"            raise exceptions.SDKException("},{"line_number":567,"context_line":"                \u0027filename and data are mutually exclusive\u0027"},{"line_number":568,"context_line":"            )"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"        if store:"},{"line_number":571,"context_line":"            store \u003d self._get_resource(_si.Store, store)"}],"source_content_type":"text/x-python","patch_set":13,"id":"8fc38b02_307c4f19","line":568,"updated":"2023-11-08 15:59:29.000000000","message":"Can this go at the top of the method, otherwise we can create an image but do nothing with it.\n\nLater: Actually, we also want to check for store earlier. I\u0027d suggest that rather than create the image in the if block above, we instead set a marker saying we need to do so, then do our validation, before *actually* creating the image. Something like:\n\n```\ncreate_image \u003d False  # whether to create an image first, deprecated!\nif image is None or image in (...):\n    ...\n    create_image \u003d True\n\nif filename and data:\n    ....\n\nif store:\n    ...\n\nif create_image:\n    if not all([container_format, disk_format]):\n        ...\n    image \u003d self._create(...)\nelse:\n    image \u003d self._get_resource(...)\n    if not all([image.container_format, image.disk_format]):\n        ...\n    ...\n```\n\nHopefully that makes sense.","commit_id":"5662609bd8db4d170abd1d065fa99e2a64d364ff"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"f47fb74e5bf1c2437ca3e595a43d3424a13ccf8d","unresolved":false,"context_lines":[{"line_number":565,"context_line":"        if filename and data:"},{"line_number":566,"context_line":"            raise exceptions.SDKException("},{"line_number":567,"context_line":"                \u0027filename and data are mutually exclusive\u0027"},{"line_number":568,"context_line":"            )"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"        if store:"},{"line_number":571,"context_line":"            store \u003d self._get_resource(_si.Store, store)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f37f8a1_4ccce0bc","line":568,"in_reply_to":"8fc38b02_307c4f19","updated":"2023-11-21 06:06:15.000000000","message":"Acknowledged","commit_id":"5662609bd8db4d170abd1d065fa99e2a64d364ff"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"a2f0c0bee318f65c1fafa7b5f6462e5710cb51f4","unresolved":true,"context_lines":[{"line_number":580,"context_line":"            image.data \u003d fp"},{"line_number":581,"context_line":"        elif data:"},{"line_number":582,"context_line":"            image.data \u003d data"},{"line_number":583,"context_line":"        image.upload(self, store\u003dstore)"},{"line_number":584,"context_line":"        if filename:"},{"line_number":585,"context_line":"            fp.close()"},{"line_number":586,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a2d4502_37a5295a","line":583,"updated":"2023-11-22 09:49:22.000000000","message":"exception handling is missing (https://opendev.org/openstack/openstacksdk/src/branch/master/openstack/image/v2/_proxy.py#L662 is how it is implemented in the \"create\" flow.\n\nWhat if you just invoke the _upload_image_put method directly?","commit_id":"f181d925171a54237f0c3b84744e40159685e1a5"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"ac9059e91ed3abb353a6e77255761e822c2478f8","unresolved":true,"context_lines":[{"line_number":580,"context_line":"            image.data \u003d fp"},{"line_number":581,"context_line":"        elif data:"},{"line_number":582,"context_line":"            image.data \u003d data"},{"line_number":583,"context_line":"        image.upload(self, store\u003dstore)"},{"line_number":584,"context_line":"        if filename:"},{"line_number":585,"context_line":"            fp.close()"},{"line_number":586,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"a71fc4e7_777e11ff","line":583,"in_reply_to":"9a2d4502_37a5295a","updated":"2023-12-07 12:14:04.000000000","message":"Exception handling ,yes would work on it.\n\nInvoking the _upload_image_put method again first will create a new image and then upload the data into it,which is not what we desire,as this method(upload_image) was already deprecated and we have create_image to carry out the create workflow(create+upload).\n\non the other hand we were not having a separate command to just upload data to an existing image , Hence we modified this function accordingly and to preserve backward compatibility we kept the create part of the code and issued a deprecation warning.","commit_id":"f181d925171a54237f0c3b84744e40159685e1a5"},{"author":{"_account_id":34510,"name":"Maxim Sava","email":"msava@redhat.com","username":"msava@redhat.com"},"change_message_id":"e85c37dc0a8c22367e0a0bb51f6462c0e9512831","unresolved":true,"context_lines":[{"line_number":504,"context_line":""},{"line_number":505,"context_line":"        .. versionchanged:: 2.1.0"},{"line_number":506,"context_line":"        \"\"\""},{"line_number":507,"context_line":"        create_image \u003d False  # whether to create an image first, deprecated!"},{"line_number":508,"context_line":"        if image is None or image in ("},{"line_number":509,"context_line":"            \u0027ami\u0027,"},{"line_number":510,"context_line":"            \u0027ari\u0027,"}],"source_content_type":"text/x-python","patch_set":18,"id":"7fb352b6_a03681ed","line":507,"updated":"2025-05-04 14:54:47.000000000","message":"```suggestion\n        image \u003d self._get_resource(_image.Image, image)\n\n        if \u0027queued\u0027 !\u003d image.status:\n            raise exceptions.SDKException(\n                \u0027Upload data is only possible for images in the queued state. \u0027\n                \u0027Current state is {status}\u0027.format(status\u003dimage.status)\n            )\n\n        create_image \u003d False  # whether to create an image first, deprecated!\n```","commit_id":"ae2fcfdb384da6850178b03d3de73ddb61372893"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"cf27be4502ed373f10a23bbe847ec61465cf328e","unresolved":true,"context_lines":[{"line_number":504,"context_line":""},{"line_number":505,"context_line":"        .. versionchanged:: 2.1.0"},{"line_number":506,"context_line":"        \"\"\""},{"line_number":507,"context_line":"        create_image \u003d False  # whether to create an image first, deprecated!"},{"line_number":508,"context_line":"        if image is None or image in ("},{"line_number":509,"context_line":"            \u0027ami\u0027,"},{"line_number":510,"context_line":"            \u0027ari\u0027,"}],"source_content_type":"text/x-python","patch_set":18,"id":"bbc24e1f_41035441","line":507,"updated":"2025-03-20 14:52:52.000000000","message":"nit: May be add a note here saying supported container_formats in glance","commit_id":"ae2fcfdb384da6850178b03d3de73ddb61372893"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"d61b388a0633b348f4bf1aae95b19f5277665d19","unresolved":true,"context_lines":[{"line_number":504,"context_line":""},{"line_number":505,"context_line":"        .. versionchanged:: 2.1.0"},{"line_number":506,"context_line":"        \"\"\""},{"line_number":507,"context_line":"        create_image \u003d False  # whether to create an image first, deprecated!"},{"line_number":508,"context_line":"        if image is None or image in ("},{"line_number":509,"context_line":"            \u0027ami\u0027,"},{"line_number":510,"context_line":"            \u0027ari\u0027,"}],"source_content_type":"text/x-python","patch_set":18,"id":"98fc133d_28df66ea","line":507,"in_reply_to":"7fb352b6_a03681ed","updated":"2025-05-06 16:07:53.000000000","message":"we can add this check at line 569","commit_id":"ae2fcfdb384da6850178b03d3de73ddb61372893"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"d61b388a0633b348f4bf1aae95b19f5277665d19","unresolved":false,"context_lines":[{"line_number":504,"context_line":""},{"line_number":505,"context_line":"        .. versionchanged:: 2.1.0"},{"line_number":506,"context_line":"        \"\"\""},{"line_number":507,"context_line":"        create_image \u003d False  # whether to create an image first, deprecated!"},{"line_number":508,"context_line":"        if image is None or image in ("},{"line_number":509,"context_line":"            \u0027ami\u0027,"},{"line_number":510,"context_line":"            \u0027ari\u0027,"}],"source_content_type":"text/x-python","patch_set":18,"id":"63b20608_d7904c88","line":507,"in_reply_to":"bbc24e1f_41035441","updated":"2025-05-06 16:07:53.000000000","message":"Done","commit_id":"ae2fcfdb384da6850178b03d3de73ddb61372893"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"cf27be4502ed373f10a23bbe847ec61465cf328e","unresolved":true,"context_lines":[{"line_number":521,"context_line":"                \"next major version.\","},{"line_number":522,"context_line":"                os_warnings.OpenStackDeprecationWarning,"},{"line_number":523,"context_line":"            )"},{"line_number":524,"context_line":"            # TODO(mrjoshi) remove this in version 3.0."},{"line_number":525,"context_line":"            if image is not None:"},{"line_number":526,"context_line":"                # remap the arguments"},{"line_number":527,"context_line":"                container_format \u003d image"}],"source_content_type":"text/x-python","patch_set":18,"id":"0af92b74_72ee1d5e","line":524,"updated":"2025-03-20 14:52:52.000000000","message":"ditto, supported disk-formats in glance","commit_id":"ae2fcfdb384da6850178b03d3de73ddb61372893"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"d61b388a0633b348f4bf1aae95b19f5277665d19","unresolved":false,"context_lines":[{"line_number":521,"context_line":"                \"next major version.\","},{"line_number":522,"context_line":"                os_warnings.OpenStackDeprecationWarning,"},{"line_number":523,"context_line":"            )"},{"line_number":524,"context_line":"            # TODO(mrjoshi) remove this in version 3.0."},{"line_number":525,"context_line":"            if image is not None:"},{"line_number":526,"context_line":"                # remap the arguments"},{"line_number":527,"context_line":"                container_format \u003d image"}],"source_content_type":"text/x-python","patch_set":18,"id":"1b6fdf47_37582b8a","line":524,"in_reply_to":"0af92b74_72ee1d5e","updated":"2025-05-06 16:07:53.000000000","message":"Done","commit_id":"ae2fcfdb384da6850178b03d3de73ddb61372893"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"cf27be4502ed373f10a23bbe847ec61465cf328e","unresolved":true,"context_lines":[{"line_number":564,"context_line":"            image \u003d self._get_resource(_image.Image, image)"},{"line_number":565,"context_line":"            if not all([image.container_format, image.disk_format]):"},{"line_number":566,"context_line":"                raise exceptions.InvalidRequest("},{"line_number":567,"context_line":"                    \"Both container_format and disk_format are required for \""},{"line_number":568,"context_line":"                    \"uploading an image\""},{"line_number":569,"context_line":"                )"},{"line_number":570,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"0b85cb69_d967ef67","line":567,"range":{"start_line":567,"start_character":72,"end_line":567,"end_character":75},"updated":"2025-03-20 14:52:52.000000000","message":"before uploading data to image?","commit_id":"ae2fcfdb384da6850178b03d3de73ddb61372893"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"d61b388a0633b348f4bf1aae95b19f5277665d19","unresolved":false,"context_lines":[{"line_number":564,"context_line":"            image \u003d self._get_resource(_image.Image, image)"},{"line_number":565,"context_line":"            if not all([image.container_format, image.disk_format]):"},{"line_number":566,"context_line":"                raise exceptions.InvalidRequest("},{"line_number":567,"context_line":"                    \"Both container_format and disk_format are required for \""},{"line_number":568,"context_line":"                    \"uploading an image\""},{"line_number":569,"context_line":"                )"},{"line_number":570,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"24fd4577_2c8842fc","line":567,"range":{"start_line":567,"start_character":72,"end_line":567,"end_character":75},"in_reply_to":"0b85cb69_d967ef67","updated":"2025-05-06 16:07:53.000000000","message":"Done","commit_id":"ae2fcfdb384da6850178b03d3de73ddb61372893"},{"author":{"_account_id":34510,"name":"Maxim Sava","email":"msava@redhat.com","username":"msava@redhat.com"},"change_message_id":"e85c37dc0a8c22367e0a0bb51f6462c0e9512831","unresolved":true,"context_lines":[{"line_number":568,"context_line":"                    \"uploading an image\""},{"line_number":569,"context_line":"                )"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"        if filename and data:"},{"line_number":572,"context_line":"            raise exceptions.SDKException("},{"line_number":573,"context_line":"                \u0027filename and data are mutually exclusive\u0027"},{"line_number":574,"context_line":"            )"},{"line_number":575,"context_line":""},{"line_number":576,"context_line":"        if store:"},{"line_number":577,"context_line":"            store \u003d self._get_resource(_si.Store, store)"}],"source_content_type":"text/x-python","patch_set":18,"id":"f8a0971b_eceb3d45","line":574,"range":{"start_line":571,"start_character":8,"end_line":574,"end_character":13},"updated":"2025-05-04 14:54:47.000000000","message":"Should we move exception code to line 507?","commit_id":"ae2fcfdb384da6850178b03d3de73ddb61372893"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"d61b388a0633b348f4bf1aae95b19f5277665d19","unresolved":true,"context_lines":[{"line_number":568,"context_line":"                    \"uploading an image\""},{"line_number":569,"context_line":"                )"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"        if filename and data:"},{"line_number":572,"context_line":"            raise exceptions.SDKException("},{"line_number":573,"context_line":"                \u0027filename and data are mutually exclusive\u0027"},{"line_number":574,"context_line":"            )"},{"line_number":575,"context_line":""},{"line_number":576,"context_line":"        if store:"},{"line_number":577,"context_line":"            store \u003d self._get_resource(_si.Store, store)"}],"source_content_type":"text/x-python","patch_set":18,"id":"240e4350_204cfa35","line":574,"range":{"start_line":571,"start_character":8,"end_line":574,"end_character":13},"in_reply_to":"f8a0971b_eceb3d45","updated":"2025-05-06 16:07:53.000000000","message":"This is a different kind of exception which is done on the data or file passed","commit_id":"ae2fcfdb384da6850178b03d3de73ddb61372893"}],"openstack/image/v2/image.py":[{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"a2f0c0bee318f65c1fafa7b5f6462e5710cb51f4","unresolved":true,"context_lines":[{"line_number":268,"context_line":"        \"\"\""},{"line_number":269,"context_line":"        self._action(session, \"reactivate\")"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def upload(self, session, *, store\u003dNone, data\u003dNone):"},{"line_number":272,"context_line":"        \"\"\"Upload data into an existing image"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        :param session: The session to use for making this request"}],"source_content_type":"text/x-python","patch_set":14,"id":"40bf8464_d6ac207c","line":271,"updated":"2023-11-22 09:49:22.000000000","message":"it would be nice if you can store handling also into the normal \"create\" flow. Otherwise amount of differences in the flows is going to grow","commit_id":"f181d925171a54237f0c3b84744e40159685e1a5"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"67d842ea1429f6209c3974e94e31bbdd6449172a","unresolved":true,"context_lines":[{"line_number":268,"context_line":"        \"\"\""},{"line_number":269,"context_line":"        self._action(session, \"reactivate\")"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def upload(self, session, *, store\u003dNone, data\u003dNone):"},{"line_number":272,"context_line":"        \"\"\"Upload data into an existing image"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        :param session: The session to use for making this request"}],"source_content_type":"text/x-python","patch_set":14,"id":"d7bd58a8_30dc272e","line":271,"in_reply_to":"40bf8464_d6ac207c","updated":"2024-03-07 06:32:07.000000000","message":"Ditto","commit_id":"f181d925171a54237f0c3b84744e40159685e1a5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d1ac68a71eaed47a0390bb9180f9109c3834549a","unresolved":true,"context_lines":[{"line_number":291,"context_line":"            headers\u003dheaders,"},{"line_number":292,"context_line":"        )"},{"line_number":293,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":294,"context_line":"        return response"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    def stage(self, session, *, data\u003dNone):"},{"line_number":297,"context_line":"        \"\"\"Stage binary image data into an existing image"}],"source_content_type":"text/x-python","patch_set":14,"id":"2b86cb78_5a1af7f3","line":294,"updated":"2024-01-29 12:46:08.000000000","message":"We generally don\u0027t return raw responses. Is it possible to update `self` with the response?","commit_id":"f181d925171a54237f0c3b84744e40159685e1a5"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"3d6206d99f2efcd518badafecd23a002d33b1d4c","unresolved":false,"context_lines":[{"line_number":291,"context_line":"            headers\u003dheaders,"},{"line_number":292,"context_line":"        )"},{"line_number":293,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":294,"context_line":"        return response"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    def stage(self, session, *, data\u003dNone):"},{"line_number":297,"context_line":"        \"\"\"Stage binary image data into an existing image"}],"source_content_type":"text/x-python","patch_set":14,"id":"f17c086b_7b0648d7","line":294,"in_reply_to":"2b86cb78_5a1af7f3","updated":"2024-02-13 08:05:19.000000000","message":"Acknowledged","commit_id":"f181d925171a54237f0c3b84744e40159685e1a5"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"14e32e188d3622df0b6227d9229beeaf6004a380","unresolved":true,"context_lines":[{"line_number":291,"context_line":"            headers\u003dheaders,"},{"line_number":292,"context_line":"        )"},{"line_number":293,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":294,"context_line":"        return response"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    def stage(self, session, *, data\u003dNone):"},{"line_number":297,"context_line":"        \"\"\"Stage binary image data into an existing image"}],"source_content_type":"text/x-python","patch_set":14,"id":"44cb2b50_843ab3f0","line":294,"in_reply_to":"f17c086b_7b0648d7","updated":"2024-02-13 14:54:55.000000000","message":"The response is been used by some of the test cases , updating self with the response is resulting in failure .","commit_id":"f181d925171a54237f0c3b84744e40159685e1a5"}],"openstack/tests/unit/image/v2/test_proxy.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"3d03eb907d4860479df8dea844d67f30d97aeaac","unresolved":true,"context_lines":[{"line_number":321,"context_line":"        self.proxy.upload_image(image\u003dimage, data\u003d\"data\", store\u003dstore)"},{"line_number":322,"context_line":"        image.upload.assert_called_with(self.proxy, store\u003dstore)"},{"line_number":323,"context_line":"        self.assertEqual(image.data, \"data\")"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def test_image_download(self):"},{"line_number":326,"context_line":"        original_image \u003d _image.Image(**EXAMPLE)"},{"line_number":327,"context_line":"        self._verify("}],"source_content_type":"text/x-python","patch_set":15,"id":"e47d3338_81079d54","line":324,"updated":"2024-03-04 06:48:34.000000000","message":"I think you should have test for\nimage with data and filename\nimage with container_format but no disk format\nimage with disk format but no container format","commit_id":"75f20c40761359fa7cd6b2c9abf7ae63f0ba701d"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"67d842ea1429f6209c3974e94e31bbdd6449172a","unresolved":false,"context_lines":[{"line_number":321,"context_line":"        self.proxy.upload_image(image\u003dimage, data\u003d\"data\", store\u003dstore)"},{"line_number":322,"context_line":"        image.upload.assert_called_with(self.proxy, store\u003dstore)"},{"line_number":323,"context_line":"        self.assertEqual(image.data, \"data\")"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def test_image_download(self):"},{"line_number":326,"context_line":"        original_image \u003d _image.Image(**EXAMPLE)"},{"line_number":327,"context_line":"        self._verify("}],"source_content_type":"text/x-python","patch_set":15,"id":"548154a0_8d9cebce","line":324,"in_reply_to":"e47d3338_81079d54","updated":"2024-03-07 06:32:07.000000000","message":"Done","commit_id":"75f20c40761359fa7cd6b2c9abf7ae63f0ba701d"}]}
