)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"423142a585d83d5c6416a245ef0410628cb57907","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When updating an image using V2 the client checks whether a property is"},{"line_number":10,"context_line":"being changed, if the property is not being changed the the client won"},{"line_number":11,"context_line":"send it to glance. Because of this when updating an image with"},{"line_number":12,"context_line":"properties that haven\u0027t been changed, the server raises incorrect"},{"line_number":13,"context_line":"error. It should be up to the server to check whether the properties"},{"line_number":14,"context_line":"from an updated image have changed."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1ae5cdf2_ca28a835","line":12,"updated":"2014-06-12 13:30:49.000000000","message":"Can you clarify what error is raised by the server? (It\u0027s not clear to me from the bug). I\u0027d like to get a better feel for how the current client behaviour is causing a problem for you.\n\nThanks.","commit_id":"235e499e1a25c8b135201cd414a9636b4ed067cd"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"c1493b1d7d0d58fc147807a488b733a829fe8804","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When updating an image using V2 the client checks whether a property is"},{"line_number":10,"context_line":"being changed, if the property is not being changed the the client won"},{"line_number":11,"context_line":"send it to glance. Because of this when updating an image with"},{"line_number":12,"context_line":"properties that haven\u0027t been changed, the server raises incorrect"},{"line_number":13,"context_line":"error. It should be up to the server to check whether the properties"},{"line_number":14,"context_line":"from an updated image have changed."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1ae5cdf2_80a761bc","line":12,"in_reply_to":"1ae5cdf2_ca28a835","updated":"2014-06-12 14:05:07.000000000","message":"I think she actually meant: \"the server won\u0027t raise reserved properties errors because it won\u0027t get the update for that property\"","commit_id":"235e499e1a25c8b135201cd414a9636b4ed067cd"},{"author":{"_account_id":9126,"name":"Chris Buccella","email":"chris@buccella.org","username":"hdd"},"change_message_id":"08035b9cd12ff83a9ef43eeeb27109607aa737d6","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Remove updated property check from V2"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When updating an image using V2 the client checks whether a property is"},{"line_number":10,"context_line":"being changed, if the property is not being changed the the client won"},{"line_number":11,"context_line":"send it to glance. The server then doesn\u0027t raise reserved properties"},{"line_number":12,"context_line":"errors because it won\u0027t get the update for that property. It should"},{"line_number":13,"context_line":"be up to the server to check whether the properties from an updated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1ae5cdf2_1dd5d4e4","line":10,"updated":"2014-06-17 19:13:28.000000000","message":"won -\u003e won\u0027t","commit_id":"daa8ca9f6244d3a86427f18287a88a55c6653e1e"}],"glanceclient/v2/images.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1579272285591de23b9e04db8b77428c632fc850","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        Update attributes of an image."},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        :param image_id: ID of the image to modify."},{"line_number":142,"context_line":"        :param remove_props: List of property names to remove"},{"line_number":143,"context_line":"        :param **kwargs: Image attribute names and their new values."},{"line_number":144,"context_line":"        \"\"\""},{"line_number":145,"context_line":"        image \u003d self.get(image_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_499679f1","line":142,"updated":"2014-06-12 01:07:06.000000000","message":"It seems we are breaking \"--remove-property\" function? (https://github.com/openstack/python-glanceclient/blob/master/glanceclient/v2/shell.py#L68 )","commit_id":"06d79e4adf81dc0afb6a66762b1a496320e19acb"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"5e269006f5ee5fb4f83dcc12a86c14d28a54d4ce","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        Update attributes of an image."},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        :param image_id: ID of the image to modify."},{"line_number":142,"context_line":"        :param remove_props: List of property names to remove"},{"line_number":143,"context_line":"        :param **kwargs: Image attribute names and their new values."},{"line_number":144,"context_line":"        \"\"\""},{"line_number":145,"context_line":"        image \u003d self.get(image_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_644352af","line":142,"in_reply_to":"1ae5cdf2_499679f1","updated":"2014-06-12 08:34:16.000000000","message":"Indeed.\n\n@Cindy, you probably just want to remove the `is None` check here: https://github.com/openstack/python-glanceclient/blob/master/glanceclient/v2/shell.py#L74","commit_id":"06d79e4adf81dc0afb6a66762b1a496320e19acb"}],"glanceclient/v2/shell.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"a975ef8c4f554127a59990f554488ec81ce7b113","unresolved":false,"context_lines":[{"line_number":39,"context_line":"@utils.arg(\u0027--property\u0027, metavar\u003d\"\u003ckey\u003dvalue\u003e\", action\u003d\u0027append\u0027,"},{"line_number":40,"context_line":"           default\u003d[], help\u003d(\u0027Arbitrary property to associate with image.\u0027"},{"line_number":41,"context_line":"                             \u0027 May be used multiple times.\u0027))"},{"line_number":42,"context_line":"def do_image_create(gc, args):"},{"line_number":43,"context_line":"    \"\"\"Create a new image.\"\"\""},{"line_number":44,"context_line":"    schema \u003d gc.schemas.get(\"image\")"},{"line_number":45,"context_line":"    _args \u003d [(x[0].replace(\u0027-\u0027, \u0027_\u0027), x[1]) for x in vars(args).items()]"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_1edf176a","line":42,"updated":"2014-06-13 05:20:46.000000000","message":"we are talking about image-update or creation?","commit_id":"7d276004d8f1cb185e3eedc33914520821b1d45c"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e19918270a61e38fa227a65160ad69bec9fcb7bd","unresolved":false,"context_lines":[{"line_number":39,"context_line":"@utils.arg(\u0027--property\u0027, metavar\u003d\"\u003ckey\u003dvalue\u003e\", action\u003d\u0027append\u0027,"},{"line_number":40,"context_line":"           default\u003d[], help\u003d(\u0027Arbitrary property to associate with image.\u0027"},{"line_number":41,"context_line":"                             \u0027 May be used multiple times.\u0027))"},{"line_number":42,"context_line":"def do_image_create(gc, args):"},{"line_number":43,"context_line":"    \"\"\"Create a new image.\"\"\""},{"line_number":44,"context_line":"    schema \u003d gc.schemas.get(\"image\")"},{"line_number":45,"context_line":"    _args \u003d [(x[0].replace(\u0027-\u0027, \u0027_\u0027), x[1]) for x in vars(args).items()]"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_69286797","line":42,"in_reply_to":"1ae5cdf2_1edf176a","updated":"2014-06-13 06:53:17.000000000","message":"Good point. I think both, TBH. The server should always choose what to do, not the client.","commit_id":"7d276004d8f1cb185e3eedc33914520821b1d45c"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"db2cfdc23478c8034a2b8d5a0dd07377e017efe5","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    \"\"\"Create a new image.\"\"\""},{"line_number":52,"context_line":"    schema \u003d gc.schemas.get(\"image\")"},{"line_number":53,"context_line":"    _args \u003d [(x[0].replace(\u0027-\u0027, \u0027_\u0027), x[1]) for x in vars(args).items()]"},{"line_number":54,"context_line":"    fields \u003d dict(filter(lambda x:"},{"line_number":55,"context_line":"                         (x[0] \u003d\u003d \u0027property\u0027 or"},{"line_number":56,"context_line":"                          schema.is_core_property(x[0])),"},{"line_number":57,"context_line":"                         _args))"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_91ac058a","line":54,"updated":"2015-02-18 23:26:48.000000000","message":"Can we move the next line up to start here, e.g.,\n\n    fields \u003d dict(filter(lambda x: (x[0] \u003d\u003d \u0027property\u0027 or\n    # ...","commit_id":"2a992e9fe23024a17e7553fa4a47ad77cf5ac7c6"},{"author":{"_account_id":13717,"name":"Inessa Vasilevskaya","email":"ivasilevskaya@mirantis.com","username":"ivasilevskaya"},"change_message_id":"6df98e2d9cb3155fdb0f7a86e2f282ee4c2c3bdf","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    \"\"\"Create a new image.\"\"\""},{"line_number":52,"context_line":"    schema \u003d gc.schemas.get(\"image\")"},{"line_number":53,"context_line":"    _args \u003d [(x[0].replace(\u0027-\u0027, \u0027_\u0027), x[1]) for x in vars(args).items()]"},{"line_number":54,"context_line":"    fields \u003d dict(filter(lambda x:"},{"line_number":55,"context_line":"                         (x[0] \u003d\u003d \u0027property\u0027 or"},{"line_number":56,"context_line":"                          schema.is_core_property(x[0])),"},{"line_number":57,"context_line":"                         _args))"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_981893ce","line":54,"in_reply_to":"da86d52c_91ac058a","updated":"2015-02-19 13:09:18.000000000","message":"Ian, let me disagree with your -1 here. That is a minor nit and it\u0027s up to the author to split lines over 80 chars long.","commit_id":"2a992e9fe23024a17e7553fa4a47ad77cf5ac7c6"},{"author":{"_account_id":13717,"name":"Inessa Vasilevskaya","email":"ivasilevskaya@mirantis.com","username":"ivasilevskaya"},"change_message_id":"6df98e2d9cb3155fdb0f7a86e2f282ee4c2c3bdf","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                         _args))"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    raw_properties \u003d fields.pop(\u0027property\u0027, [])"},{"line_number":60,"context_line":"    for datum in raw_properties:"},{"line_number":61,"context_line":"        key, value \u003d datum.split(\u0027\u003d\u0027, 1)"},{"line_number":62,"context_line":"        fields[key] \u003d value"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_38dc07e4","line":60,"updated":"2015-02-19 13:09:18.000000000","message":"Nit: you could squash lines 59 and 60 in one, as long as raw_properties isn\u0027t used anywhere else.\n\nfor datum in fields.pop(\u0027property\u0027, [])","commit_id":"2a992e9fe23024a17e7553fa4a47ad77cf5ac7c6"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"db2cfdc23478c8034a2b8d5a0dd07377e017efe5","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    _args \u003d [(x[0].replace(\u0027-\u0027, \u0027_\u0027), x[1]) for x in vars(args).items()]"},{"line_number":93,"context_line":"    fields \u003d dict(filter(lambda x:"},{"line_number":94,"context_line":"                         (x[0] in [\u0027property\u0027, \u0027remove_property\u0027] or"},{"line_number":95,"context_line":"                          schema.is_core_property(x[0])),"},{"line_number":96,"context_line":"                         _args))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    raw_properties \u003d fields.pop(\u0027property\u0027, [])"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_f1c62148","line":95,"updated":"2015-02-18 23:26:48.000000000","message":"Same here?","commit_id":"2a992e9fe23024a17e7553fa4a47ad77cf5ac7c6"},{"author":{"_account_id":13717,"name":"Inessa Vasilevskaya","email":"ivasilevskaya@mirantis.com","username":"ivasilevskaya"},"change_message_id":"6df98e2d9cb3155fdb0f7a86e2f282ee4c2c3bdf","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    _args \u003d [(x[0].replace(\u0027-\u0027, \u0027_\u0027), x[1]) for x in vars(args).items()]"},{"line_number":93,"context_line":"    fields \u003d dict(filter(lambda x:"},{"line_number":94,"context_line":"                         (x[0] in [\u0027property\u0027, \u0027remove_property\u0027] or"},{"line_number":95,"context_line":"                          schema.is_core_property(x[0])),"},{"line_number":96,"context_line":"                         _args))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    raw_properties \u003d fields.pop(\u0027property\u0027, [])"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_f880afc0","line":95,"in_reply_to":"da86d52c_f1c62148","updated":"2015-02-19 13:09:18.000000000","message":"Imho it\u0027s ok with me.","commit_id":"2a992e9fe23024a17e7553fa4a47ad77cf5ac7c6"},{"author":{"_account_id":13717,"name":"Inessa Vasilevskaya","email":"ivasilevskaya@mirantis.com","username":"ivasilevskaya"},"change_message_id":"6df98e2d9cb3155fdb0f7a86e2f282ee4c2c3bdf","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                         _args))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    raw_properties \u003d fields.pop(\u0027property\u0027, [])"},{"line_number":99,"context_line":"    for datum in raw_properties:"},{"line_number":100,"context_line":"        key, value \u003d datum.split(\u0027\u003d\u0027, 1)"},{"line_number":101,"context_line":"        fields[key] \u003d value"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_78f91f4d","line":99,"updated":"2015-02-19 13:09:18.000000000","message":"Nit: same thing here.\n\nAlthough it isn\u0027t related to the change, so may be ignored.","commit_id":"2a992e9fe23024a17e7553fa4a47ad77cf5ac7c6"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"9b7885c0a129b0439303c7cd1e543290664a554c","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    \"\"\"Update an existing image.\"\"\""},{"line_number":91,"context_line":"    schema \u003d gc.schemas.get(\"image\")"},{"line_number":92,"context_line":"    _args \u003d [(x[0].replace(\u0027-\u0027, \u0027_\u0027), x[1]) for x in vars(args).items()]"},{"line_number":93,"context_line":"    fields \u003d dict(filter(lambda x: (x[0] in [\u0027property\u0027, \u0027remove_property\u0027]"},{"line_number":94,"context_line":"                                    or schema.is_core_property(x[0])), _args))"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    raw_properties \u003d fields.pop(\u0027property\u0027, [])"}],"source_content_type":"text/x-python","patch_set":12,"id":"bab921fb_9204b315","line":93,"updated":"2015-04-23 21:53:07.000000000","message":"So as much as I legitimately love lambda\u0027s and using filter, this + the call to dict will compound to potentially cause a performance problem. What if we do something like:\n\n    def do_image_update(gc, args):\n        # ...\n        def filter_properties(value):\n            return (value in {\u0027property\u0027, \u0027remove_property\u0027} or\n                    schema.is_core_property(value))\n        field \u003d {k: v for k, v in _args if filter_properties(k)}","commit_id":"26411f00a73cdcaacc94979f788a8270af85fe89"}]}
