)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"1dca58d3650df6ca1614c4023d5b3372c9982883","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"5f201791_b8f6bef8","line":10,"updated":"2017-06-23 18:38:20.000000000","message":"Also add:\n\nPartially Implements: blueprint tempest-lib-missing-test-coverage\n\ndirectly below Change-Id. Example: https://review.openstack.org/#/c/474712/6//COMMIT_MSG\n\nThis makes it possible to track this commit against a blueprint in Launchpad that tracks all associated commits for increasing unit test coverage for service clients.","commit_id":"a32d19d2fca7725224d04bfe5d95351139f8accf"}],"tempest/tests/lib/services/volume/v2/test_scheduler_stats_client.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"d3880bf991d2d0a3244e625efbc071832d22c2af","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    FAKE_POOLS_LIST \u003d {"},{"line_number":23,"context_line":"        \"pools\": ["},{"line_number":24,"context_line":"            {"},{"line_number":25,"context_line":"                \"name\": \"pool1\","},{"line_number":26,"context_line":"                \"capabilities\": {"},{"line_number":27,"context_line":"                    \"updated\": \"2014-10-28T00:00:00-00:00\","},{"line_number":28,"context_line":"                    \"total_capacity\": 1024,"},{"line_number":29,"context_line":"                    \"free_capacity\": 100,"},{"line_number":30,"context_line":"                    \"volume_backend_name\": \"pool1\","},{"line_number":31,"context_line":"                    \"reserved_percentage\": 0,"},{"line_number":32,"context_line":"                    \"driver_version\": \"1.0.0\","},{"line_number":33,"context_line":"                    \"storage_protocol\": \"iSCSI\","},{"line_number":34,"context_line":"                    \"QoS_support\": False"},{"line_number":35,"context_line":"                }"},{"line_number":36,"context_line":"            },"},{"line_number":37,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f231b9d_3044781b","line":34,"range":{"start_line":25,"start_character":16,"end_line":34,"end_character":40},"updated":"2017-06-19 21:22:57.000000000","message":"I don\u0027t have a DevStack running right now, is this payload with detail\u003dTrue or detail\u003dFalse?","commit_id":"bd8e75dd2b6653243538f86f45f83bbfdb0d71bd"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"a46a73caa092b68d036e1708b34e01cc277cf09a","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        self.client \u003d scheduler_stats_client.SchedulerStatsClient("},{"line_number":57,"context_line":"            fake_auth, \u0027volume\u0027, \u0027regionOne\u0027)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c Updated upstream"},{"line_number":60,"context_line":"    def _test_list_pools(self, bytes_body\u003dFalse):"},{"line_number":61,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":62,"context_line":"    def _test_list_pools(self, bytes_body\u003dFalse, detail\u003dFalse):"},{"line_number":63,"context_line":"\u003e\u003e\u003e\u003e\u003e\u003e\u003e Stashed changes"},{"line_number":64,"context_line":"        self.check_service_client_function("},{"line_number":65,"context_line":"            self.client.list_pools,"},{"line_number":66,"context_line":"            \u0027tempest.lib.common.rest_client.RestClient.get\u0027,"},{"line_number":67,"context_line":"            self.FAKE_POOLS_LIST,"},{"line_number":68,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c Updated upstream"},{"line_number":69,"context_line":"            bytes_body)"},{"line_number":70,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":71,"context_line":"            bytes_body,"},{"line_number":72,"context_line":"            detail\u003ddetail)"},{"line_number":73,"context_line":"\u003e\u003e\u003e\u003e\u003e\u003e\u003e Stashed changes"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_list_pools_with_str_body(self):"},{"line_number":76,"context_line":"        self._test_list_pools()"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c Updated upstream"},{"line_number":79,"context_line":"    def test_list_pools_with_bytes_body(self):"},{"line_number":80,"context_line":"        self._test_list_pools(bytes_body\u003dTrue)"},{"line_number":81,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":82,"context_line":"    def test_list_pools_with_str_body_and_detail(self):"},{"line_number":83,"context_line":"        self._test_list_pools(detail\u003dTrue)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def test_list_pools_with_bytes_body(self):"},{"line_number":86,"context_line":"        self._test_list_pools(bytes_body\u003dTrue)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_list_pools_with_bytes_body_and_detail(self): "},{"line_number":89,"context_line":"        self._test_list_pools(bytes_body\u003dTrue, detail\u003dTrue)"},{"line_number":90,"context_line":"\u003e\u003e\u003e\u003e\u003e\u003e\u003e Stashed changes"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f201791_cf4ec1c0","line":90,"range":{"start_line":59,"start_character":0,"end_line":90,"end_character":23},"updated":"2017-06-20 15:52:34.000000000","message":"Fix merge conflicts.","commit_id":"159a517b1a639ec4b7867c5c56df8cf5bfb2224f"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"dd2925c5ae5c71494a2531711eb15dfa262cdc3b","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        self.check_service_client_function("},{"line_number":61,"context_line":"            self.client.list_pools,"},{"line_number":62,"context_line":"            \u0027tempest.lib.common.rest_client.RestClient.get\u0027,"},{"line_number":63,"context_line":"            self.FAKE_POOLS_LIST,"},{"line_number":64,"context_line":"            bytes_body,"},{"line_number":65,"context_line":"            detail\u003ddetail)"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_d8573a02","line":63,"range":{"start_line":63,"start_character":12,"end_line":63,"end_character":32},"updated":"2017-06-23 18:32:58.000000000","message":"This should depend on whether detail is True or False. Running cinder --debug get-pools \u003chost\u003e I see:\n\n{\"pools\": [{\"name\": \"osboxes@lvmdriver-1#lvmdriver-1\"}]}\n\nAnd with: cinder --debug get-pools \u003chost\u003e --detail I see FAKE_POOLS_LIST.\n\nSo, you need code like:\n\nresp_body \u003d self.FAKE_POOLS_LIST if detail else {\u0027pools\u0027: [{\u0027name\u0027: p[\u0027name\u0027]} for p in self.FAKE_POOLS_LIST[\u0027pools\u0027]}\n\nThen pass resp_body on L63 to check_service_client_function.","commit_id":"a32d19d2fca7725224d04bfe5d95351139f8accf"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"efcc327061c6225879b21903dbe4de9dae7e45f8","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        if detail:"},{"line_number":61,"context_line":"            resp_body \u003d self.FAKE_POOLS_LIST"},{"line_number":62,"context_line":"        else:"},{"line_number":63,"context_line":"            for p in self.FAKE_POOLS_LIST[\u0027pools\u0027]:"},{"line_number":64,"context_line":"                resp_body \u003d {\u0027pools\u0027: p[\u0027name\u0027]}"},{"line_number":65,"context_line":"        self.check_service_client_function("},{"line_number":66,"context_line":"            self.client.list_pools,"},{"line_number":67,"context_line":"            \u0027tempest.lib.common.rest_client.RestClient.get\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_9e9cddc0","line":64,"range":{"start_line":63,"start_character":12,"end_line":64,"end_character":48},"updated":"2017-06-26 18:39:35.000000000","message":"This isn\u0027t correct, because resp_body is being overwritten each iteration.\n\nWhat you should\u0027[ve done is:\n\nresp_body \u003d []\nfor p in self.FAKE_POOLS_LIST[\u0027pools\u0027]:\n    resp_body.append({\u0027name\u0027: p[\u0027name\u0027]})\n\nBut there\u0027s a better, shorter way to do that:\n    resp_body \u003d [{\u0027name\u0027: pool[\u0027name\u0027]} for pool in self.FAKE_POOLS_LIST]","commit_id":"048bed7eb5f811deeda8d57795b43f1beb3bcecf"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"78a42023ece634ce2414ed5cc0874fd3b0ca7f2c","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        if detail:"},{"line_number":62,"context_line":"            resp_body \u003d self.FAKE_POOLS_LIST"},{"line_number":63,"context_line":"        else:"},{"line_number":64,"context_line":"            resp_body \u003d {\u0027pools\u0027: [{\u0027name\u0027: pool[\u0027name\u0027]}]"},{"line_number":65,"context_line":"                         for pool in self.FAKE_POOLS_LIST[\u0027pools\u0027]}"},{"line_number":66,"context_line":"        self.check_service_client_function("},{"line_number":67,"context_line":"            self.client.list_pools,"},{"line_number":68,"context_line":"            \u0027tempest.lib.common.rest_client.RestClient.get\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f201791_a670ab09","line":65,"range":{"start_line":64,"start_character":24,"end_line":65,"end_character":67},"updated":"2017-06-26 22:35:44.000000000","message":"On second glance, this should be:\n\n{\u0027pools\u0027: [{\u0027name\u0027: pool[\u0027name\u0027]} for pool in self.FAKE_POOLS_LIST[\u0027pools\u0027]]}\n\nExample:\n\n    \u003e\u003e\u003e base \u003d {\u0027pools\u0027: [{\u0027name\u0027: \u0027a\u0027, \u0027thing\u0027: \u0027t\u0027}, \n    {\u0027name\u0027: \u0027b\u0027, \u0027thing\u0027: \u0027u\u0027}]} \n    \u003e\u003e\u003e correct \u003d {\u0027pools\u0027: [{\u0027name\u0027: pool[\u0027name\u0027]} for \n    pool in base[\u0027pools\u0027]]}\n    \u003e\u003e\u003e wrong \u003d {\u0027pools\u0027: [{\u0027name\u0027: pool[\u0027name\u0027]}] for pool \n    in base[\u0027pools\u0027]}\n    \u003e\u003e\u003e correct\n    {\u0027pools\u0027: [{\u0027name\u0027: \u0027a\u0027}, {\u0027name\u0027: \u0027b\u0027}]}\n    \u003e\u003e\u003e wrong\n    {\u0027pools\u0027: [{\u0027name\u0027: \u0027b\u0027}]}","commit_id":"966df9f363f0747bfdc3b36bc9bdf394c4a8f05a"}]}
