)]}'
{"tempest/api/image/v2/test_images_tasks.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"d2169c4c4f60d62b8218d922372aa6925cb3305a","unresolved":false,"context_lines":[{"line_number":24,"context_line":"class ImagesTasksTest(base.BaseV2ImageTest):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    @testtools.skipUnless(CONF.image_feature_enabled.task_import_image,"},{"line_number":27,"context_line":"                          \u0027task-import-image is not available.\u0027)"},{"line_number":28,"context_line":"    @test.idempotent_id(\u002752b64e40-e34e-4a00-a31c-b48c986c0205\u0027)"},{"line_number":29,"context_line":"    def test_import_from_qcow2_to_raw_format_image(self):"},{"line_number":30,"context_line":"        action_type \u003d \"import\""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_a9a545a2","line":27,"updated":"2015-06-25 08:41:30.000000000","message":"this skip should go in skip_checks() to avoid resources creation when this feature is not available.","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"},{"author":{"_account_id":11075,"name":"Benny Kopilov","email":"bkopilov@redhat.com","username":"bkopilov"},"change_message_id":"569305b9486d90670d656283fdbd8f6eecf62d19","unresolved":false,"context_lines":[{"line_number":24,"context_line":"class ImagesTasksTest(base.BaseV2ImageTest):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    @testtools.skipUnless(CONF.image_feature_enabled.task_import_image,"},{"line_number":27,"context_line":"                          \u0027task-import-image is not available.\u0027)"},{"line_number":28,"context_line":"    @test.idempotent_id(\u002752b64e40-e34e-4a00-a31c-b48c986c0205\u0027)"},{"line_number":29,"context_line":"    def test_import_from_qcow2_to_raw_format_image(self):"},{"line_number":30,"context_line":"        action_type \u003d \"import\""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_5c4c6ec7","line":27,"in_reply_to":"fa32b979_a9a545a2","updated":"2015-06-25 15:24:34.000000000","message":"Done","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"},{"author":{"_account_id":7020,"name":"Joe Hakim Rahme","email":"jhakimra@redhat.com","username":"rahmu"},"change_message_id":"e5213f2ea78917c409ff9f99935db8826baaae40","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    def test_import_from_qcow2_to_raw_format_image(self):"},{"line_number":30,"context_line":"        action_type \u003d \"import\""},{"line_number":31,"context_line":"        import_format \u003d \"qcow2\""},{"line_number":32,"context_line":"        # a dummy image ,import_from supports http"},{"line_number":33,"context_line":"        import_image_url \u003d CONF.image.http_image"},{"line_number":34,"context_line":"        image_name \u003d data_utils.rand_name(\u0027image\u0027)"},{"line_number":35,"context_line":"        container_format \u003d \"bare\""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_12656d1c","line":32,"range":{"start_line":32,"start_character":24,"end_line":32,"end_character":25},"updated":"2015-06-25 12:59:02.000000000","message":"small typo, the space should come after the comma","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"d2169c4c4f60d62b8218d922372aa6925cb3305a","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                        \"import_from\": import_image_url})"},{"line_number":45,"context_line":"        body \u003d self.client.task_create(data)"},{"line_number":46,"context_line":"        task_id \u003d body[\u0027id\u0027]"},{"line_number":47,"context_line":"        self.client.wait_for_image_task_status(task_id, \"success\")"},{"line_number":48,"context_line":"        # check task status - in success state."},{"line_number":49,"context_line":"        body_task \u003d self.client.task_image_show(task_id)"},{"line_number":50,"context_line":"        self.assertEqual(action_type, body_task[\u0027type\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_4c65a742","line":47,"updated":"2015-06-25 08:41:30.000000000","message":"Do not we need to delete the created task?","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"},{"author":{"_account_id":11075,"name":"Benny Kopilov","email":"bkopilov@redhat.com","username":"bkopilov"},"change_message_id":"569305b9486d90670d656283fdbd8f6eecf62d19","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                        \"import_from\": import_image_url})"},{"line_number":45,"context_line":"        body \u003d self.client.task_create(data)"},{"line_number":46,"context_line":"        task_id \u003d body[\u0027id\u0027]"},{"line_number":47,"context_line":"        self.client.wait_for_image_task_status(task_id, \"success\")"},{"line_number":48,"context_line":"        # check task status - in success state."},{"line_number":49,"context_line":"        body_task \u003d self.client.task_image_show(task_id)"},{"line_number":50,"context_line":"        self.assertEqual(action_type, body_task[\u0027type\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_81ffed00","line":47,"in_reply_to":"fa32b979_4c65a742","updated":"2015-06-25 15:24:34.000000000","message":"There is not api command for task delete at all , it is timebased command.\nfor each task there is expiration time and a state of a task.\nI am checking with dev guys how to delete it.","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"d2169c4c4f60d62b8218d922372aa6925cb3305a","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.assertEqual(action_type, body_task[\u0027type\u0027])"},{"line_number":51,"context_line":"        params \u003d {\u0027name\u0027: image_name}"},{"line_number":52,"context_line":"        images \u003d self.client.list_images(params)"},{"line_number":53,"context_line":"        self.addCleanup(self.client.delete_image, images[0][\u0027id\u0027])"},{"line_number":54,"context_line":"        # calling to a wait for glance v2"},{"line_number":55,"context_line":"        self.client.wait_for_image_status(images[0][\u0027id\u0027], \u0027active\u0027)"},{"line_number":56,"context_line":"        self.assertEqual(image_name, images[0][\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_8cd40fe9","line":53,"updated":"2015-06-25 08:41:30.000000000","message":"how about adding this cleanup after L45","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"},{"author":{"_account_id":11075,"name":"Benny Kopilov","email":"bkopilov@redhat.com","username":"bkopilov"},"change_message_id":"569305b9486d90670d656283fdbd8f6eecf62d19","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.assertEqual(action_type, body_task[\u0027type\u0027])"},{"line_number":51,"context_line":"        params \u003d {\u0027name\u0027: image_name}"},{"line_number":52,"context_line":"        images \u003d self.client.list_images(params)"},{"line_number":53,"context_line":"        self.addCleanup(self.client.delete_image, images[0][\u0027id\u0027])"},{"line_number":54,"context_line":"        # calling to a wait for glance v2"},{"line_number":55,"context_line":"        self.client.wait_for_image_status(images[0][\u0027id\u0027], \u0027active\u0027)"},{"line_number":56,"context_line":"        self.assertEqual(image_name, images[0][\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_bcf6dad4","line":53,"in_reply_to":"fa32b979_8cd40fe9","updated":"2015-06-25 15:24:34.000000000","message":"it might be a problem , when we create a taks , the task happens in background  (copy  \u0026\u0026 create image ) , at this point , when task is running we dont have the image id . when task complete we have all info.\nAssume this case:\ntask-create \n  - do some background work -  image copy , create\n  -  at this point we dont know if image already created or status.\n     if task fails - we catch it.\nWhen task is completed we know that image is created.\nWe search image_id based on image name in the task,  we dont know the image_id when task is running.\nBenny","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"}],"tempest/services/image/v2/json/image_client.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"d2169c4c4f60d62b8218d922372aa6925cb3305a","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        body \u003d json.loads(body)"},{"line_number":220,"context_line":"        return service_client.ResponseBody(resp, body)"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def task_create(self, data):"},{"line_number":223,"context_line":"        url \u003d \u0027v2/tasks\u0027"},{"line_number":224,"context_line":"        data \u003d json.dumps(data)"},{"line_number":225,"context_line":"        resp, body \u003d self.post(url, data)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_4cbfe7cf","line":222,"updated":"2015-06-25 08:41:30.000000000","message":"task_create -\u003e create_task for name consistency in service clients.","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"d2169c4c4f60d62b8218d922372aa6925cb3305a","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        body \u003d json.loads(body)"},{"line_number":228,"context_line":"        return service_client.ResponseBody(resp, body)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def task_image_list(self, params\u003dNone):"},{"line_number":231,"context_line":"        url \u003d \u0027v2/tasks\u0027"},{"line_number":232,"context_line":"        if params:"},{"line_number":233,"context_line":"            url +\u003d \u0027?%s\u0027 % urllib.urlencode(params)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_cccbf770","line":230,"updated":"2015-06-25 08:41:30.000000000","message":"task_image_list -\u003e list_tasks\n\nAlso there is no test covering this. This will be dead code.","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"d2169c4c4f60d62b8218d922372aa6925cb3305a","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        self._validate_schema(body, type\u003d\u0027tasks\u0027)"},{"line_number":238,"context_line":"        return service_client.ResponseBodyList(resp, body[\u0027tasks\u0027])"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def task_image_delete(self, task_id):"},{"line_number":241,"context_line":"        url \u003d \u0027v2/tasks/%s\u0027 % task_id"},{"line_number":242,"context_line":"        resp, _ \u003d self.delete(url)"},{"line_number":243,"context_line":"        self.expected_success(204, resp.status)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_cc921757","line":240,"updated":"2015-06-25 08:41:30.000000000","message":"task_image_delete -\u003e delete_task\n\nAlso there is no test covering this. This will be dead code.","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"},{"author":{"_account_id":11075,"name":"Benny Kopilov","email":"bkopilov@redhat.com","username":"bkopilov"},"change_message_id":"569305b9486d90670d656283fdbd8f6eecf62d19","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        self._validate_schema(body, type\u003d\u0027tasks\u0027)"},{"line_number":238,"context_line":"        return service_client.ResponseBodyList(resp, body[\u0027tasks\u0027])"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def task_image_delete(self, task_id):"},{"line_number":241,"context_line":"        url \u003d \u0027v2/tasks/%s\u0027 % task_id"},{"line_number":242,"context_line":"        resp, _ \u003d self.delete(url)"},{"line_number":243,"context_line":"        self.expected_success(204, resp.status)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_a9b1af02","line":240,"in_reply_to":"fa32b979_b2092133","updated":"2015-06-25 15:24:34.000000000","message":"When task is created there is a created time and expired time which is 2 days hardcoded now - probably a bug.\nWhen task is ended the image is copied and created , and task status set to success.\nI can\u0027t delete the task entry status today , there is not task deleted.\nI can delete the created image from task , and this is done in the code","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"},{"author":{"_account_id":7020,"name":"Joe Hakim Rahme","email":"jhakimra@redhat.com","username":"rahmu"},"change_message_id":"e5213f2ea78917c409ff9f99935db8826baaae40","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        self._validate_schema(body, type\u003d\u0027tasks\u0027)"},{"line_number":238,"context_line":"        return service_client.ResponseBodyList(resp, body[\u0027tasks\u0027])"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def task_image_delete(self, task_id):"},{"line_number":241,"context_line":"        url \u003d \u0027v2/tasks/%s\u0027 % task_id"},{"line_number":242,"context_line":"        resp, _ \u003d self.delete(url)"},{"line_number":243,"context_line":"        self.expected_success(204, resp.status)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_b2092133","line":240,"in_reply_to":"fa32b979_cc921757","updated":"2015-06-25 12:59:02.000000000","message":"Honest question: \n\nWhat if it\u0027s added as a cleanup to the test test_import_from_qcow2_to_raw_format_image? Is it still considered dead code? Do you require a specific test for the delete_task method, or a cleanup in the create_task test is enough?","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"},{"author":{"_account_id":11075,"name":"Benny Kopilov","email":"bkopilov@redhat.com","username":"bkopilov"},"change_message_id":"569305b9486d90670d656283fdbd8f6eecf62d19","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        self._validate_schema(body, type\u003d\u0027tasks\u0027)"},{"line_number":238,"context_line":"        return service_client.ResponseBodyList(resp, body[\u0027tasks\u0027])"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def task_image_delete(self, task_id):"},{"line_number":241,"context_line":"        url \u003d \u0027v2/tasks/%s\u0027 % task_id"},{"line_number":242,"context_line":"        resp, _ \u003d self.delete(url)"},{"line_number":243,"context_line":"        self.expected_success(204, resp.status)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_c90f53de","line":240,"in_reply_to":"fa32b979_cc921757","updated":"2015-06-25 15:24:34.000000000","message":"This is my mistake , this code should be removed. there is not task delete command.\nThanks for catching it.\nBenny","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"d2169c4c4f60d62b8218d922372aa6925cb3305a","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        self.expected_success(204, resp.status)"},{"line_number":244,"context_line":"        return service_client.ResponseBody(resp)"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    def task_image_show(self, task_id):"},{"line_number":247,"context_line":"        url \u003d \u0027v2/tasks/%s\u0027 % task_id"},{"line_number":248,"context_line":"        resp, body \u003d self.get(url)"},{"line_number":249,"context_line":"        self.expected_success(200, resp.status)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_ec7fdb14","line":246,"updated":"2015-06-25 08:41:30.000000000","message":"task_image_show -\u003e show_task","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"d2169c4c4f60d62b8218d922372aa6925cb3305a","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        body \u003d json.loads(body)"},{"line_number":251,"context_line":"        return service_client.ResponseBody(resp, body)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def wait_for_image_status(self, image_id, status):"},{"line_number":254,"context_line":"        \"\"\"Waits for a Image to reach a given status.\"\"\""},{"line_number":255,"context_line":"        start_time \u003d time.time()"},{"line_number":256,"context_line":"        body \u003d self.show_image(image_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_4cd5a740","line":253,"updated":"2015-06-25 08:41:30.000000000","message":"can we use waiter method here?\n\nIf needed we can add if \"value \u003d\u003d \u0027killed\u0027:\" condition in waiter common method.","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"},{"author":{"_account_id":7020,"name":"Joe Hakim Rahme","email":"jhakimra@redhat.com","username":"rahmu"},"change_message_id":"e5213f2ea78917c409ff9f99935db8826baaae40","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        body \u003d json.loads(body)"},{"line_number":251,"context_line":"        return service_client.ResponseBody(resp, body)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def wait_for_image_status(self, image_id, status):"},{"line_number":254,"context_line":"        \"\"\"Waits for a Image to reach a given status.\"\"\""},{"line_number":255,"context_line":"        start_time \u003d time.time()"},{"line_number":256,"context_line":"        body \u003d self.show_image(image_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_94108a4f","line":253,"in_reply_to":"fa32b979_4cd5a740","updated":"2015-06-25 12:59:02.000000000","message":"+1 for using the common method.","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"},{"author":{"_account_id":11075,"name":"Benny Kopilov","email":"bkopilov@redhat.com","username":"bkopilov"},"change_message_id":"569305b9486d90670d656283fdbd8f6eecf62d19","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        body \u003d json.loads(body)"},{"line_number":251,"context_line":"        return service_client.ResponseBody(resp, body)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def wait_for_image_status(self, image_id, status):"},{"line_number":254,"context_line":"        \"\"\"Waits for a Image to reach a given status.\"\"\""},{"line_number":255,"context_line":"        start_time \u003d time.time()"},{"line_number":256,"context_line":"        body \u003d self.show_image(image_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_69fac776","line":253,"in_reply_to":"fa32b979_94108a4f","updated":"2015-06-25 15:24:34.000000000","message":"The problem is that i tried to be aligned to glance v1 code and not add something that breaks the concept .  i prefer that glance code will be same as version 2 .\nSame as we want that other services code will be same for version x and y.\n\nI really prefer to keep glance version 1 same as version 2 in terms of wait image and task.\n\nSee tempets/services/image/v1/json/image_client.py .\n\nWe may have a seperate path for moving the wait commands to common from services .\n\nThanks,\nBenny","commit_id":"d1df90375eae75ac06b886fc5ecf5436e47fcdd0"}]}
