)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ba460f46db5ccb3da2e2c5f174884b5ef8f2f175","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Allow passing negative values for the locked search_opt in server list"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds support for novaclient to pass the \"locked\" search_opts"},{"line_number":10,"context_line":"with a \"False\" value upto the server side. This is required for the OSC"},{"line_number":11,"context_line":"change to support the \"unlocked\" filter parameter."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Related to blueprint add-locked-reason"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bfb3d3c7_d955341f","line":10,"range":{"start_line":10,"start_character":43,"end_line":10,"end_character":71},"updated":"2019-05-17 13:51:17.000000000","message":"Guh and we just released novaclient for OSC :) Oh well, releases are cheap and easy.","commit_id":"3aec7b685079d5a1a5e2b3376ee29fd7e4bd9348"}],"novaclient/tests/unit/v2/test_servers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"055f7f734d8fe3e775d459a7797bf0ce5a1a5f23","unresolved":false,"context_lines":[{"line_number":1737,"context_line":"        self.assertIn(\"unexpected keyword argument \u0027reason\u0027\", six.text_type(e))"},{"line_number":1738,"context_line":""},{"line_number":1739,"context_line":"    def test_filter_servers_unlocked(self):"},{"line_number":1740,"context_line":"        # support locked\u003dFalse coming from OSC"},{"line_number":1741,"context_line":"        sl \u003d self.cs.servers.list(search_opts\u003d{\u0027locked\u0027: False})"},{"line_number":1742,"context_line":"        self.assert_request_id(sl, fakes.FAKE_REQUEST_ID_LIST)"},{"line_number":1743,"context_line":"        self.assert_called(\u0027GET\u0027, \u0027/servers/detail?locked\u003dFalse\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bfb3d3c7_0c0ee23a","line":1740,"range":{"start_line":1740,"start_character":31,"end_line":1740,"end_character":46},"updated":"2019-05-22 14:27:23.000000000","message":"nix or replace with \"starting from 2.73\"","commit_id":"c21cb322553ba510291ae2ee9719cb3d91424e75"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3bd3885c6767aa508278596afeec163d23176e2e","unresolved":false,"context_lines":[{"line_number":1737,"context_line":"        self.assertIn(\"unexpected keyword argument \u0027reason\u0027\", six.text_type(e))"},{"line_number":1738,"context_line":""},{"line_number":1739,"context_line":"    def test_filter_servers_unlocked(self):"},{"line_number":1740,"context_line":"        # support locked\u003dFalse coming from OSC"},{"line_number":1741,"context_line":"        sl \u003d self.cs.servers.list(search_opts\u003d{\u0027locked\u0027: False})"},{"line_number":1742,"context_line":"        self.assert_request_id(sl, fakes.FAKE_REQUEST_ID_LIST)"},{"line_number":1743,"context_line":"        self.assert_called(\u0027GET\u0027, \u0027/servers/detail?locked\u003dFalse\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bfb3d3c7_422261a6","line":1740,"range":{"start_line":1740,"start_character":31,"end_line":1740,"end_character":46},"in_reply_to":"bfb3d3c7_0c0ee23a","updated":"2019-05-22 15:07:14.000000000","message":"Done","commit_id":"c21cb322553ba510291ae2ee9719cb3d91424e75"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a4ef8df9d79e99585493914c6b37d3196c8a45bd","unresolved":false,"context_lines":[{"line_number":1724,"context_line":"        self.assert_request_id(ret, fakes.FAKE_REQUEST_ID_LIST)"},{"line_number":1725,"context_line":"        self.assert_called(\u0027POST\u0027, \u0027/servers/1234/action\u0027,"},{"line_number":1726,"context_line":"                           {\u0027lock\u0027: None})"},{"line_number":1727,"context_line":"        ret \u003d s.lock(reason\u003d\u0027zombie-apocalypse\u0027)"},{"line_number":1728,"context_line":"        self.assert_request_id(ret, fakes.FAKE_REQUEST_ID_LIST)"},{"line_number":1729,"context_line":"        self.assert_called(\u0027POST\u0027, \u0027/servers/1234/action\u0027,"},{"line_number":1730,"context_line":"                           {\u0027lock\u0027: {\u0027locked_reason\u0027: \u0027zombie-apocalypse\u0027}})"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_527a2888","line":1727,"range":{"start_line":1727,"start_character":29,"end_line":1727,"end_character":46},"updated":"2019-05-22 20:25:34.000000000","message":"Hah, awesome.","commit_id":"f78a4706d3522e64fd45daaf5e68c017c55c5240"}],"novaclient/v2/servers.py":[{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"91dde5229d4ba1dd7d3c7d8fc2d6a6e9fecd0149","unresolved":false,"context_lines":[{"line_number":864,"context_line":"        qparams \u003d {}"},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"        for opt, val in search_opts.items():"},{"line_number":867,"context_line":"            # support locked\u003dFalse coming from OSC"},{"line_number":868,"context_line":"            if val or (opt \u003d\u003d \u0027locked\u0027 and val is False):"},{"line_number":869,"context_line":"                if isinstance(val, six.text_type):"},{"line_number":870,"context_line":"                    val \u003d val.encode(\u0027utf-8\u0027)"},{"line_number":871,"context_line":"                qparams[opt] \u003d val"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_fe6b3e1c","line":868,"range":{"start_line":867,"start_character":12,"end_line":868,"end_character":56},"updated":"2019-05-17 12:50:08.000000000","message":"honestly I would be happier with doing a more generic thing than this dirty hack, but I am out of ideas because I don\u0027t want to fix 30 tests for all_tenants and deleted flags.","commit_id":"3aec7b685079d5a1a5e2b3376ee29fd7e4bd9348"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"4b48f2c6e612e9d8f7f97b50f9b9ae84d91b370d","unresolved":false,"context_lines":[{"line_number":864,"context_line":"        qparams \u003d {}"},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"        for opt, val in search_opts.items():"},{"line_number":867,"context_line":"            # support locked\u003dFalse coming from OSC"},{"line_number":868,"context_line":"            if val or (opt \u003d\u003d \u0027locked\u0027 and val is False):"},{"line_number":869,"context_line":"                if isinstance(val, six.text_type):"},{"line_number":870,"context_line":"                    val \u003d val.encode(\u0027utf-8\u0027)"},{"line_number":871,"context_line":"                qparams[opt] \u003d val"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_d469798b","line":868,"range":{"start_line":867,"start_character":12,"end_line":868,"end_character":56},"in_reply_to":"bfb3d3c7_19ae6c2e","updated":"2019-05-17 14:07:00.000000000","message":"\u003e Hmm, how are all_tenants and deleted handled?\n\nWell apparently if they are at their default False value they are ignored in the query from the client and then just re-inserted at the server end. (https://github.com/openstack/nova/blob/ed5b7c7fc311c2af8c8be09044bb2723141f6f0d/nova/api/openstack/compute/servers.py#L254)\n\n \u003e \n \u003e Also, filtering on the locked parameter isn\u0027t supported until 2.73\n \u003e right? Why not check the version used and fail if not at least\n \u003e 2.73? I realize the API would silently ignore it before that, but\n \u003e that seems like bad UX if we know the server isn\u0027t going to support\n \u003e it and just ignore the users filter request.\n\nhuh ? I am not sure I understand, we already check for the version to be at least 2.73 in both the clients, so by the time we reach here we should be sure to have locked only from \u003e\u003d2.73.","commit_id":"3aec7b685079d5a1a5e2b3376ee29fd7e4bd9348"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"e00f2837b58d73b3280cc6c051d9637456a9fac9","unresolved":false,"context_lines":[{"line_number":864,"context_line":"        qparams \u003d {}"},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"        for opt, val in search_opts.items():"},{"line_number":867,"context_line":"            # support locked\u003dFalse coming from OSC"},{"line_number":868,"context_line":"            if val or (opt \u003d\u003d \u0027locked\u0027 and val is False):"},{"line_number":869,"context_line":"                if isinstance(val, six.text_type):"},{"line_number":870,"context_line":"                    val \u003d val.encode(\u0027utf-8\u0027)"},{"line_number":871,"context_line":"                qparams[opt] \u003d val"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_59090f2a","line":868,"range":{"start_line":867,"start_character":12,"end_line":868,"end_character":56},"in_reply_to":"bfb3d3c7_3d66b9ef","updated":"2019-05-21 15:14:42.000000000","message":"okay I get you now.","commit_id":"3aec7b685079d5a1a5e2b3376ee29fd7e4bd9348"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9bbae2f79eaf6da0590e2328531f4c9fb9f8e90b","unresolved":false,"context_lines":[{"line_number":864,"context_line":"        qparams \u003d {}"},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"        for opt, val in search_opts.items():"},{"line_number":867,"context_line":"            # support locked\u003dFalse coming from OSC"},{"line_number":868,"context_line":"            if val or (opt \u003d\u003d \u0027locked\u0027 and val is False):"},{"line_number":869,"context_line":"                if isinstance(val, six.text_type):"},{"line_number":870,"context_line":"                    val \u003d val.encode(\u0027utf-8\u0027)"},{"line_number":871,"context_line":"                qparams[opt] \u003d val"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_3d66b9ef","line":868,"range":{"start_line":867,"start_character":12,"end_line":868,"end_character":56},"in_reply_to":"bfb3d3c7_d469798b","updated":"2019-05-17 15:20:54.000000000","message":"\u003e huh ? I am not sure I understand, we already check for the version to be at least 2.73 in both the clients, so by the time we reach here we should be sure to have locked only from \u003e\u003d2.73.\n\nYou\u0027re talking about the shell (CLI) right? What you\u0027re modifying here is the python binding API, which doesn\u0027t need to be called through a shell, e.g. watcher users the python binding API directly, so if I were trying to filter out locked servers in watcher and passing this with 2.56 (their current nova api version to use when constructing the client) you\u0027d get back locked servers b/c the filter would be silently ignored.","commit_id":"3aec7b685079d5a1a5e2b3376ee29fd7e4bd9348"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ba460f46db5ccb3da2e2c5f174884b5ef8f2f175","unresolved":false,"context_lines":[{"line_number":864,"context_line":"        qparams \u003d {}"},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"        for opt, val in search_opts.items():"},{"line_number":867,"context_line":"            # support locked\u003dFalse coming from OSC"},{"line_number":868,"context_line":"            if val or (opt \u003d\u003d \u0027locked\u0027 and val is False):"},{"line_number":869,"context_line":"                if isinstance(val, six.text_type):"},{"line_number":870,"context_line":"                    val \u003d val.encode(\u0027utf-8\u0027)"},{"line_number":871,"context_line":"                qparams[opt] \u003d val"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_19ae6c2e","line":868,"range":{"start_line":867,"start_character":12,"end_line":868,"end_character":56},"in_reply_to":"bfb3d3c7_fe6b3e1c","updated":"2019-05-17 13:51:17.000000000","message":"Hmm, how are all_tenants and deleted handled?\n\nAlso, filtering on the locked parameter isn\u0027t supported until 2.73 right? Why not check the version used and fail if not at least 2.73? I realize the API would silently ignore it before that, but that seems like bad UX if we know the server isn\u0027t going to support it and just ignore the users filter request.","commit_id":"3aec7b685079d5a1a5e2b3376ee29fd7e4bd9348"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"055f7f734d8fe3e775d459a7797bf0ce5a1a5f23","unresolved":false,"context_lines":[{"line_number":864,"context_line":"        qparams \u003d {}"},{"line_number":865,"context_line":"        # In microversion 2.73 we added ``locked`` filtering option"},{"line_number":866,"context_line":"        # for listing server details."},{"line_number":867,"context_line":"        support_locked \u003d self.api_version \u003e\u003d api_versions.APIVersion(\u00272.73\u0027)"},{"line_number":868,"context_line":"        if not support_locked and \u0027locked\u0027 in search_opts:"},{"line_number":869,"context_line":"            raise exceptions.UnsupportedAttribute(\"locked\", \"2.73\")"},{"line_number":870,"context_line":"        for opt, val in search_opts.items():"},{"line_number":871,"context_line":"            # support locked\u003dFalse coming from OSC from 2.73 microversion"}],"source_content_type":"text/x-python","patch_set":2,"id":"bfb3d3c7_6c499e89","line":868,"range":{"start_line":867,"start_character":8,"end_line":868,"end_character":58},"updated":"2019-05-22 14:27:23.000000000","message":"nit: you could avoid always doing the version check if you reversed the order of the condition:\n\nif (\u0027locked\u0027 in search_opts and\n        self.api_version \u003c api_versions.APIVersion(\u00272.73\u0027)):\n    raise exceptions.UnsupportedAttribute(\"locked\", \"2.73\")","commit_id":"c21cb322553ba510291ae2ee9719cb3d91424e75"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3bd3885c6767aa508278596afeec163d23176e2e","unresolved":false,"context_lines":[{"line_number":864,"context_line":"        qparams \u003d {}"},{"line_number":865,"context_line":"        # In microversion 2.73 we added ``locked`` filtering option"},{"line_number":866,"context_line":"        # for listing server details."},{"line_number":867,"context_line":"        support_locked \u003d self.api_version \u003e\u003d api_versions.APIVersion(\u00272.73\u0027)"},{"line_number":868,"context_line":"        if not support_locked and \u0027locked\u0027 in search_opts:"},{"line_number":869,"context_line":"            raise exceptions.UnsupportedAttribute(\"locked\", \"2.73\")"},{"line_number":870,"context_line":"        for opt, val in search_opts.items():"},{"line_number":871,"context_line":"            # support locked\u003dFalse coming from OSC from 2.73 microversion"}],"source_content_type":"text/x-python","patch_set":2,"id":"bfb3d3c7_4257c103","line":868,"range":{"start_line":867,"start_character":8,"end_line":868,"end_character":58},"in_reply_to":"bfb3d3c7_6c499e89","updated":"2019-05-22 15:07:14.000000000","message":"Done","commit_id":"c21cb322553ba510291ae2ee9719cb3d91424e75"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"055f7f734d8fe3e775d459a7797bf0ce5a1a5f23","unresolved":false,"context_lines":[{"line_number":868,"context_line":"        if not support_locked and \u0027locked\u0027 in search_opts:"},{"line_number":869,"context_line":"            raise exceptions.UnsupportedAttribute(\"locked\", \"2.73\")"},{"line_number":870,"context_line":"        for opt, val in search_opts.items():"},{"line_number":871,"context_line":"            # support locked\u003dFalse coming from OSC from 2.73 microversion"},{"line_number":872,"context_line":"            if val or (opt \u003d\u003d \u0027locked\u0027 and val is False):"},{"line_number":873,"context_line":"                if isinstance(val, six.text_type):"},{"line_number":874,"context_line":"                    val \u003d val.encode(\u0027utf-8\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bfb3d3c7_ec290e9b","line":871,"range":{"start_line":871,"start_character":35,"end_line":871,"end_character":50},"updated":"2019-05-22 14:27:23.000000000","message":"nix this - it\u0027s not only OSC that uses novaclient","commit_id":"c21cb322553ba510291ae2ee9719cb3d91424e75"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3bd3885c6767aa508278596afeec163d23176e2e","unresolved":false,"context_lines":[{"line_number":868,"context_line":"        if not support_locked and \u0027locked\u0027 in search_opts:"},{"line_number":869,"context_line":"            raise exceptions.UnsupportedAttribute(\"locked\", \"2.73\")"},{"line_number":870,"context_line":"        for opt, val in search_opts.items():"},{"line_number":871,"context_line":"            # support locked\u003dFalse coming from OSC from 2.73 microversion"},{"line_number":872,"context_line":"            if val or (opt \u003d\u003d \u0027locked\u0027 and val is False):"},{"line_number":873,"context_line":"                if isinstance(val, six.text_type):"},{"line_number":874,"context_line":"                    val \u003d val.encode(\u0027utf-8\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bfb3d3c7_a250fd0b","line":871,"range":{"start_line":871,"start_character":35,"end_line":871,"end_character":50},"in_reply_to":"bfb3d3c7_ec290e9b","updated":"2019-05-22 15:07:14.000000000","message":"Done","commit_id":"c21cb322553ba510291ae2ee9719cb3d91424e75"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"8eb9732a4ce631703e56a0b387034d7b54782e52","unresolved":false,"context_lines":[{"line_number":869,"context_line":"            raise exceptions.UnsupportedAttribute(\"locked\", \"2.73\")"},{"line_number":870,"context_line":"        for opt, val in search_opts.items():"},{"line_number":871,"context_line":"            # support locked\u003dFalse from 2.73 microversion"},{"line_number":872,"context_line":"            if val or (opt \u003d\u003d \u0027locked\u0027 and val is False):"},{"line_number":873,"context_line":"                if isinstance(val, six.text_type):"},{"line_number":874,"context_line":"                    val \u003d val.encode(\u0027utf-8\u0027)"},{"line_number":875,"context_line":"                qparams[opt] \u003d val"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_4246e17e","line":872,"updated":"2019-05-22 15:34:42.000000000","message":"I\u0027m wondering, when do we also need a version check in novaclient/v2/shell.py as well and when do we not? I noticed for some microversion changes in the past, for example, volume_type in version 2.67, we have checks in both shell.py and servers.py.","commit_id":"f78a4706d3522e64fd45daaf5e68c017c55c5240"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a4ef8df9d79e99585493914c6b37d3196c8a45bd","unresolved":false,"context_lines":[{"line_number":869,"context_line":"            raise exceptions.UnsupportedAttribute(\"locked\", \"2.73\")"},{"line_number":870,"context_line":"        for opt, val in search_opts.items():"},{"line_number":871,"context_line":"            # support locked\u003dFalse from 2.73 microversion"},{"line_number":872,"context_line":"            if val or (opt \u003d\u003d \u0027locked\u0027 and val is False):"},{"line_number":873,"context_line":"                if isinstance(val, six.text_type):"},{"line_number":874,"context_line":"                    val \u003d val.encode(\u0027utf-8\u0027)"},{"line_number":875,"context_line":"                qparams[opt] \u003d val"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_923180ef","line":872,"in_reply_to":"bfb3d3c7_120d9036","updated":"2019-05-22 20:25:34.000000000","message":"Ah, thank you.","commit_id":"f78a4706d3522e64fd45daaf5e68c017c55c5240"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ddafbcb71d0f0314d0de2dbe3f520f391163583b","unresolved":false,"context_lines":[{"line_number":869,"context_line":"            raise exceptions.UnsupportedAttribute(\"locked\", \"2.73\")"},{"line_number":870,"context_line":"        for opt, val in search_opts.items():"},{"line_number":871,"context_line":"            # support locked\u003dFalse from 2.73 microversion"},{"line_number":872,"context_line":"            if val or (opt \u003d\u003d \u0027locked\u0027 and val is False):"},{"line_number":873,"context_line":"                if isinstance(val, six.text_type):"},{"line_number":874,"context_line":"                    val \u003d val.encode(\u0027utf-8\u0027)"},{"line_number":875,"context_line":"                qparams[opt] \u003d val"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_120d9036","line":872,"in_reply_to":"bfb3d3c7_4246e17e","updated":"2019-05-22 20:20:52.000000000","message":"There is a version constraint on using --locked as a filter option in \u0027nova list\u0027 in the shell:\n\nhttps://review.opendev.org/#/c/648659/3/novaclient/v2/shell.py\n\nSo we\u0027ve already got the version check for --locked on the CLI, the original change (above) just didn\u0027t have the python API binding checking in here.\n\nIn general we should be checking on the CLI and python API bindings since you don\u0027t have to be using the CLI to be using this code. The python API bindings should cover the CLI usage as well, but the start_version kwarg on the CLI options is nice since it toggles the help for the command.","commit_id":"f78a4706d3522e64fd45daaf5e68c017c55c5240"}]}
