)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"024c5635f2cc231eeca0a0e561fc82947a1a0943","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"500f6a3a_4b4e1399","updated":"2023-10-06 11:12:14.000000000","message":"As with https://review.opendev.org/c/openstack/openstacksdk/+/896489, I think you should be using the `TagMixin` here. You will need to reimplement `set_tags` though since afaik no other API has the concept of the append header. Should be relatively trivial though.","commit_id":"84edbb8ecf021b1ba803174b98b2a21fb0d6152d"}],"openstack/image/v2/_proxy.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bec089e951460af816dae3d50c56ceb6ff54642a","unresolved":true,"context_lines":[{"line_number":1312,"context_line":"        )"},{"line_number":1313,"context_line":""},{"line_number":1314,"context_line":"    # \u003d\u003d\u003d\u003d\u003d\u003d METADEF TAGS \u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":1315,"context_line":"    def create_metadef_tags(self, namespace, **attrs):"},{"line_number":1316,"context_line":"        \"\"\"Create multiple new tags inside a namespace"},{"line_number":1317,"context_line":""},{"line_number":1318,"context_line":"        :param namespace: The value can be either the name of a metadef"}],"source_content_type":"text/x-python","patch_set":2,"id":"a6166a39_ad20ca21","line":1315,"updated":"2024-01-26 15:20:58.000000000","message":"I note that there\u0027s only one other \"tags\" related proxy method in openstacksdk currently, and that\u0027s a generic `set_tags` method in the network proxy API, which allows you to set the tags on any networking resource.\n\nGiven this, do we actually need this? Can\u0027t we set just tells users to set/update tags via the `create_metadef_namespace` and `update_metadef_namespace` methods?","commit_id":"622d265d9afb25f05f2f13f54ce3a763703c75c2"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"29e3eef193178c7c1da87766b2d373901c7a3e47","unresolved":true,"context_lines":[{"line_number":1312,"context_line":"        )"},{"line_number":1313,"context_line":""},{"line_number":1314,"context_line":"    # \u003d\u003d\u003d\u003d\u003d\u003d METADEF TAGS \u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":1315,"context_line":"    def create_metadef_tags(self, namespace, **attrs):"},{"line_number":1316,"context_line":"        \"\"\"Create multiple new tags inside a namespace"},{"line_number":1317,"context_line":""},{"line_number":1318,"context_line":"        :param namespace: The value can be either the name of a metadef"}],"source_content_type":"text/x-python","patch_set":2,"id":"c7505366_64aa23b8","line":1315,"in_reply_to":"a6166a39_ad20ca21","updated":"2024-01-30 10:11:53.000000000","message":"This is not an update method, it actually creates new tags using `POST` call, the `set_tags` is a `PUT` call, hence we added `add_tags` method in the `MetadefNamespace` resource file. \n\nWe would be dropping the proxy_method and directly calling add_tags , As discussed","commit_id":"622d265d9afb25f05f2f13f54ce3a763703c75c2"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bec089e951460af816dae3d50c56ceb6ff54642a","unresolved":true,"context_lines":[{"line_number":1322,"context_line":"        :param dict attrs: Keyword arguments which will be used to create tags"},{"line_number":1323,"context_line":"        :returns: The result of metadef tags creation"},{"line_number":1324,"context_line":"        \"\"\""},{"line_number":1325,"context_line":"        namespace_name \u003d self._get_resource("},{"line_number":1326,"context_line":"            _metadef_namespace.MetadefNamespace, namespace"},{"line_number":1327,"context_line":"        )"},{"line_number":1328,"context_line":"        append \u003d attrs.pop(\u0027append\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"d19c7a82_36151cd0","line":1325,"range":{"start_line":1325,"start_character":8,"end_line":1325,"end_character":22},"updated":"2024-01-26 15:20:58.000000000","message":"`namespace`","commit_id":"622d265d9afb25f05f2f13f54ce3a763703c75c2"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"29e3eef193178c7c1da87766b2d373901c7a3e47","unresolved":false,"context_lines":[{"line_number":1322,"context_line":"        :param dict attrs: Keyword arguments which will be used to create tags"},{"line_number":1323,"context_line":"        :returns: The result of metadef tags creation"},{"line_number":1324,"context_line":"        \"\"\""},{"line_number":1325,"context_line":"        namespace_name \u003d self._get_resource("},{"line_number":1326,"context_line":"            _metadef_namespace.MetadefNamespace, namespace"},{"line_number":1327,"context_line":"        )"},{"line_number":1328,"context_line":"        append \u003d attrs.pop(\u0027append\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"4363b074_fc47a4ce","line":1325,"range":{"start_line":1325,"start_character":8,"end_line":1325,"end_character":22},"in_reply_to":"d19c7a82_36151cd0","updated":"2024-01-30 10:11:53.000000000","message":"Done","commit_id":"622d265d9afb25f05f2f13f54ce3a763703c75c2"}],"openstack/image/v2/metadef_namespace.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bec089e951460af816dae3d50c56ceb6ff54642a","unresolved":true,"context_lines":[{"line_number":77,"context_line":"            retry_on_conflict\u003dNone,"},{"line_number":78,"context_line":"        )"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def add_tags(self, session, append, **tags):"},{"line_number":81,"context_line":"        \"\"\"Add all tags on the resource."},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        :param session: The session to use for making this request."}],"source_content_type":"text/x-python","patch_set":2,"id":"9e40a4f0_be41aa66","line":80,"updated":"2024-01-26 15:20:58.000000000","message":"What is the expected format of `tag`? You\u0027ve described it as a list but this suggests a mapping? Perhaps you meant `*args` rather than `**kwargs`.\n\nCould we provide a default value for `append`? Either True or False? Also, can we make it a kwarg-only argument (i.e. `..., *, append\u003dTrue, ...`)\n\nLater: Looking at the code, it seems Glance expects a body like so:\n\n```\n{\n    \"tags\": [\"tag_a\", \"tag_b\"]\n}\n```\n\nWe should produce this body ourselves, so yes, I\u0027d expect `tags` to be a `list`, not a `dict`.","commit_id":"622d265d9afb25f05f2f13f54ce3a763703c75c2"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"29e3eef193178c7c1da87766b2d373901c7a3e47","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            retry_on_conflict\u003dNone,"},{"line_number":78,"context_line":"        )"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def add_tags(self, session, append, **tags):"},{"line_number":81,"context_line":"        \"\"\"Add all tags on the resource."},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        :param session: The session to use for making this request."}],"source_content_type":"text/x-python","patch_set":2,"id":"4d2d3ae1_4103db72","line":80,"in_reply_to":"9e40a4f0_be41aa66","updated":"2024-01-30 10:11:53.000000000","message":"Acknowledged","commit_id":"622d265d9afb25f05f2f13f54ce3a763703c75c2"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bec089e951460af816dae3d50c56ceb6ff54642a","unresolved":true,"context_lines":[{"line_number":90,"context_line":"            headers[\u0027X-Openstack-Append\u0027] \u003d \u0027True\u0027"},{"line_number":91,"context_line":"        response \u003d session.post(url, headers\u003dheaders, data\u003djson.dumps(tags))"},{"line_number":92,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":93,"context_line":"        return response.json()"}],"source_content_type":"text/x-python","patch_set":2,"id":"048952fb_36cf6d0e","line":93,"updated":"2024-01-26 15:20:58.000000000","message":"Note that the `add_tag` method in the `TagMixin` updates `self` to set the `tag` attribute and then returns `self`. Could/should we do the same?","commit_id":"622d265d9afb25f05f2f13f54ce3a763703c75c2"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"29e3eef193178c7c1da87766b2d373901c7a3e47","unresolved":true,"context_lines":[{"line_number":90,"context_line":"            headers[\u0027X-Openstack-Append\u0027] \u003d \u0027True\u0027"},{"line_number":91,"context_line":"        response \u003d session.post(url, headers\u003dheaders, data\u003djson.dumps(tags))"},{"line_number":92,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":93,"context_line":"        return response.json()"}],"source_content_type":"text/x-python","patch_set":2,"id":"e079df26_ee38c1af","line":93,"in_reply_to":"048952fb_36cf6d0e","updated":"2024-01-30 10:11:53.000000000","message":"This call returns the newly created tags name in response, \nAs stated above it creates tags using `POST` call","commit_id":"622d265d9afb25f05f2f13f54ce3a763703c75c2"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"43f2e6dbc79c3b75213aa5aab60cfe4599ed3449","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            headers[\u0027X-Openstack-Append\u0027] \u003d \u0027True\u0027"},{"line_number":91,"context_line":"        response \u003d session.post(url, headers\u003dheaders, data\u003djson.dumps(tags))"},{"line_number":92,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":93,"context_line":"        return response.json()"}],"source_content_type":"text/x-python","patch_set":2,"id":"f9f02f78_4439ab1c","line":93,"in_reply_to":"2a5067a2_beff0708","updated":"2024-01-30 15:46:29.000000000","message":"Done","commit_id":"622d265d9afb25f05f2f13f54ce3a763703c75c2"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"48725ab2f0c6b26ddc965c79388e3dbb0d1aa614","unresolved":true,"context_lines":[{"line_number":90,"context_line":"            headers[\u0027X-Openstack-Append\u0027] \u003d \u0027True\u0027"},{"line_number":91,"context_line":"        response \u003d session.post(url, headers\u003dheaders, data\u003djson.dumps(tags))"},{"line_number":92,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":93,"context_line":"        return response.json()"}],"source_content_type":"text/x-python","patch_set":2,"id":"2a5067a2_beff0708","line":93,"in_reply_to":"3cdcd168_785b595d","updated":"2024-01-30 10:36:27.000000000","message":"Look for the `self._body.attributes.update` call","commit_id":"622d265d9afb25f05f2f13f54ce3a763703c75c2"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"75bbed3eb65853f6de3622ee4590324946348b69","unresolved":true,"context_lines":[{"line_number":90,"context_line":"            headers[\u0027X-Openstack-Append\u0027] \u003d \u0027True\u0027"},{"line_number":91,"context_line":"        response \u003d session.post(url, headers\u003dheaders, data\u003djson.dumps(tags))"},{"line_number":92,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":93,"context_line":"        return response.json()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3cdcd168_785b595d","line":93,"in_reply_to":"e079df26_ee38c1af","updated":"2024-01-30 10:35:48.000000000","message":"Okay. So can we update `self` to add those tags and then return `self`? Take a look at what we do in `add_tag`.","commit_id":"622d265d9afb25f05f2f13f54ce3a763703c75c2"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"75bbed3eb65853f6de3622ee4590324946348b69","unresolved":true,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    # NOTE(mrjoshi): Added this method instead of using set_tags, as this"},{"line_number":81,"context_line":"    # requires a ``POST`` call whereas set_tags does a ``PUT`` call."},{"line_number":82,"context_line":"    def add_tags(self, session, *, append\u003dFalse, **tags):"},{"line_number":83,"context_line":"        \"\"\"Add all tags on the resource."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        :param session: The session to use for making this request."}],"source_content_type":"text/x-python","patch_set":3,"id":"773c6294_ccdf7d88","line":82,"updated":"2024-01-30 10:35:48.000000000","message":"Do we need to redefine `add_tag` so? It we don\u0027t, we\u0027ll get the existing behavior which uses `PUT`. It sounds like that won\u0027t work?","commit_id":"722834e1d2d4b93af58f46b76d364a71782702c1"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"43f2e6dbc79c3b75213aa5aab60cfe4599ed3449","unresolved":true,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    # NOTE(mrjoshi): Added this method instead of using set_tags, as this"},{"line_number":81,"context_line":"    # requires a ``POST`` call whereas set_tags does a ``PUT`` call."},{"line_number":82,"context_line":"    def add_tags(self, session, *, append\u003dFalse, **tags):"},{"line_number":83,"context_line":"        \"\"\"Add all tags on the resource."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        :param session: The session to use for making this request."}],"source_content_type":"text/x-python","patch_set":3,"id":"32ccad56_d6dc24f2","line":82,"in_reply_to":"773c6294_ccdf7d88","updated":"2024-01-30 15:46:29.000000000","message":"yes","commit_id":"722834e1d2d4b93af58f46b76d364a71782702c1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"75bbed3eb65853f6de3622ee4590324946348b69","unresolved":true,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        :param session: The session to use for making this request."},{"line_number":86,"context_line":"        :param bool append: If set to true it adds new tags to existing"},{"line_number":87,"context_line":"        else overwrites the existing tags with new ones."},{"line_number":88,"context_line":"        :param list tags: List with tags to be set on the resource"},{"line_number":89,"context_line":"        \"\"\""},{"line_number":90,"context_line":"        url \u003d utils.urljoin(self.base_path, self.id, \u0027tags\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"0e9484d5_324b6bd9","line":87,"updated":"2024-01-30 10:35:48.000000000","message":"This needs to be indented to render correctly.","commit_id":"722834e1d2d4b93af58f46b76d364a71782702c1"},{"author":{"_account_id":33765,"name":"Mridula Joshi","email":"mrjoshi@redhat.com","username":"mrjoshi"},"change_message_id":"43f2e6dbc79c3b75213aa5aab60cfe4599ed3449","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        :param session: The session to use for making this request."},{"line_number":86,"context_line":"        :param bool append: If set to true it adds new tags to existing"},{"line_number":87,"context_line":"        else overwrites the existing tags with new ones."},{"line_number":88,"context_line":"        :param list tags: List with tags to be set on the resource"},{"line_number":89,"context_line":"        \"\"\""},{"line_number":90,"context_line":"        url \u003d utils.urljoin(self.base_path, self.id, \u0027tags\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"aefcf0fd_b0d38ab6","line":87,"in_reply_to":"0e9484d5_324b6bd9","updated":"2024-01-30 15:46:29.000000000","message":"Done","commit_id":"722834e1d2d4b93af58f46b76d364a71782702c1"}]}
