)]}'
{"tacker/common/csar_utils.py":[{"author":{"_account_id":25701,"name":"Yasufumi Ogawa","email":"yasufum.o@gmail.com","username":"yasufum"},"change_message_id":"1c919b22f2f9d2745cd118aa6dcd979154639750","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import os"},{"line_number":17,"context_line":"import shutil"},{"line_number":18,"context_line":"import six"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from oslo_log import log as logging"},{"line_number":21,"context_line":"from oslo_utils import encodeutils"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_27ae192e","line":18,"updated":"2020-05-12 11:04:35.000000000","message":"Is python2 support required for \"string_types\"?","commit_id":"33b8d79463f4cd7e8862b8871696f084a971e5d0"},{"author":{"_account_id":26222,"name":"Cong Phuoc Hoang","email":"hoangphuocbk2.07@gmail.com","username":"hoangphuoc"},"change_message_id":"432a655430ec56a5ddf76f4e5169dc7da9141c01","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        if isinstance(artifact_value, dict):"},{"line_number":50,"context_line":"            if artifact_value.get(\u0027type\u0027) \u003d\u003d \u0027tosca.artifacts.nfv.SwImage\u0027:"},{"line_number":51,"context_line":"                return artifact_value"},{"line_number":52,"context_line":"        elif isinstance(artifact_value, str):"},{"line_number":53,"context_line":"            return {\u0027file\u0027: artifact_value}"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_5fe1ff29","line":52,"range":{"start_line":52,"start_character":40,"end_line":52,"end_character":43},"updated":"2020-05-15 16:59:29.000000000","message":"I prefer validating uri to checking str here","commit_id":"89f1b15033281cdc31cf1d60e7437d5b12fe4f94"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"cc311ce96b7d86fe2d56eee60c15c7e318b1acf7","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        if isinstance(artifact_value, dict):"},{"line_number":50,"context_line":"            if artifact_value.get(\u0027type\u0027) \u003d\u003d \u0027tosca.artifacts.nfv.SwImage\u0027:"},{"line_number":51,"context_line":"                return artifact_value"},{"line_number":52,"context_line":"        elif isinstance(artifact_value, str):"},{"line_number":53,"context_line":"            return {\u0027file\u0027: artifact_value}"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_4679ecc5","line":52,"range":{"start_line":52,"start_character":40,"end_line":52,"end_character":43},"in_reply_to":"ff570b3c_5fe1ff29","updated":"2020-05-20 03:14:07.000000000","message":"Existence of artifacts are already validated by tosca-parser[1]. So, I don\u0027t think there is any need to validate it again.\n\n[1] : https://github.com/openstack/tosca-parser/blob/master/toscaparser/prereq/csar.py#L222","commit_id":"89f1b15033281cdc31cf1d60e7437d5b12fe4f94"}],"tacker/tests/unit/common/test_csar_utils.py":[{"author":{"_account_id":26588,"name":"Hiroyuki Jo","email":"joxyuki@gmail.com","username":"joxyuki"},"change_message_id":"439ba80c954cdf420da914b928f273ccb4d63645","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        self.assertEqual(vnf_data[\u0027descriptor_version\u0027], \u00271.0\u0027)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    @mock.patch(\u0027tacker.common.csar_utils._extract_csar_zip_file\u0027)"},{"line_number":178,"context_line":"    def test_load_csar_with_artifacts_short_notation_without_sw_image_data("},{"line_number":179,"context_line":"            self, mock_extract_csar_zip_file):"},{"line_number":180,"context_line":"        file_path \u003d os.path.join("},{"line_number":181,"context_line":"            self.base_path,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_d377499f","line":178,"range":{"start_line":178,"start_character":4,"end_line":178,"end_character":9},"updated":"2019-11-07 07:16:03.000000000","message":"Is this test really needed even we already have test_load_csar_data_with_artifacts_and_without_sw_image_data?","commit_id":"18f45c87c28407035ce3021cfcd8a30d117ce663"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"5c134a0f77c81afcdc2b4fc9a96b01a512c48e04","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        self.assertEqual(vnf_data[\u0027descriptor_version\u0027], \u00271.0\u0027)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    @mock.patch(\u0027tacker.common.csar_utils._extract_csar_zip_file\u0027)"},{"line_number":178,"context_line":"    def test_load_csar_with_artifacts_short_notation_without_sw_image_data("},{"line_number":179,"context_line":"            self, mock_extract_csar_zip_file):"},{"line_number":180,"context_line":"        file_path \u003d os.path.join("},{"line_number":181,"context_line":"            self.base_path,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_f35045d8","line":178,"range":{"start_line":178,"start_character":4,"end_line":178,"end_character":9},"in_reply_to":"3fa7e38b_d377499f","updated":"2019-11-07 08:52:06.000000000","message":"This test is needed because depending on the type of artifact (short or extended) it\u0027s checking whether sw_image_data properties exists in VDU.\n\nIn test_load_csar_data_with_artifacts_and_without_sw_image_data test, artifact is defined in extended notation format whereas in this test, it is defined in short notation format.","commit_id":"18f45c87c28407035ce3021cfcd8a30d117ce663"},{"author":{"_account_id":26588,"name":"Hiroyuki Jo","email":"joxyuki@gmail.com","username":"joxyuki"},"change_message_id":"43debe491f827fbd3cf2bd56aa1b9fdb9650d8b4","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        self.assertEqual(vnf_data[\u0027descriptor_version\u0027], \u00271.0\u0027)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    @mock.patch(\u0027tacker.common.csar_utils._extract_csar_zip_file\u0027)"},{"line_number":178,"context_line":"    def test_load_csar_with_artifacts_short_notation_without_sw_image_data("},{"line_number":179,"context_line":"            self, mock_extract_csar_zip_file):"},{"line_number":180,"context_line":"        file_path \u003d os.path.join("},{"line_number":181,"context_line":"            self.base_path,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_dca68355","line":178,"range":{"start_line":178,"start_character":4,"end_line":178,"end_character":9},"in_reply_to":"3fa7e38b_f35045d8","updated":"2019-11-27 08:16:53.000000000","message":"make sense.","commit_id":"18f45c87c28407035ce3021cfcd8a30d117ce663"},{"author":{"_account_id":26588,"name":"Hiroyuki Jo","email":"joxyuki@gmail.com","username":"joxyuki"},"change_message_id":"439ba80c954cdf420da914b928f273ccb4d63645","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        self.assertIsNotNone(flavours[0][\u0027sw_images\u0027])"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    @mock.patch(\u0027tacker.common.csar_utils._extract_csar_zip_file\u0027)"},{"line_number":205,"context_line":"    def test_load_csar_data_with_multiple_sw_image_data_with_short_notation("},{"line_number":206,"context_line":"            self, mock_extract_csar_zip_file):"},{"line_number":207,"context_line":"        file_path \u003d os.path.join("},{"line_number":208,"context_line":"            self.base_path,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_73a1b5f7","line":205,"range":{"start_line":205,"start_character":4,"end_line":205,"end_character":9},"updated":"2019-11-07 07:16:03.000000000","message":"I prefer modifying csar_with_multiple_sw_image_data.zip instead of adding this test. tosca_with_vdus.yaml in csar_with_multiple_sw_image_data.zip should include both short notation and extended notation of sw_image.","commit_id":"18f45c87c28407035ce3021cfcd8a30d117ce663"},{"author":{"_account_id":26588,"name":"Hiroyuki Jo","email":"joxyuki@gmail.com","username":"joxyuki"},"change_message_id":"43debe491f827fbd3cf2bd56aa1b9fdb9650d8b4","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        self.assertIsNotNone(flavours[0][\u0027sw_images\u0027])"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    @mock.patch(\u0027tacker.common.csar_utils._extract_csar_zip_file\u0027)"},{"line_number":205,"context_line":"    def test_load_csar_data_with_multiple_sw_image_data_with_short_notation("},{"line_number":206,"context_line":"            self, mock_extract_csar_zip_file):"},{"line_number":207,"context_line":"        file_path \u003d os.path.join("},{"line_number":208,"context_line":"            self.base_path,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_5fa045f4","line":205,"range":{"start_line":205,"start_character":4,"end_line":205,"end_character":9},"in_reply_to":"3fa7e38b_13fc01b4","updated":"2019-11-27 08:16:53.000000000","message":"I cannot image a probable case of future development we should have these 2 tests. One possibility is someone wrongly deletes csar_utils.py line 218. In this case, this test fails but test_csar_with_multiple_sw_image_data passes. However, test_load_csar_with_artifacts_short_notation_without_sw_image_data also fails and we can detects the wrong change.\n\nWDYT?","commit_id":"18f45c87c28407035ce3021cfcd8a30d117ce663"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"76b81a2cd56ebeb02ca280088d58fb578895cf08","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        self.assertIsNotNone(flavours[0][\u0027sw_images\u0027])"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    @mock.patch(\u0027tacker.common.csar_utils._extract_csar_zip_file\u0027)"},{"line_number":205,"context_line":"    def test_load_csar_data_with_multiple_sw_image_data_with_short_notation("},{"line_number":206,"context_line":"            self, mock_extract_csar_zip_file):"},{"line_number":207,"context_line":"        file_path \u003d os.path.join("},{"line_number":208,"context_line":"            self.base_path,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_d17d786f","line":205,"range":{"start_line":205,"start_character":4,"end_line":205,"end_character":9},"in_reply_to":"3fa7e38b_5fa045f4","updated":"2020-05-11 10:25:44.000000000","message":"If there are any changes to csar_utils.py in future like you have mentioned at line 218, this test should fail and someone will need to fix it.\n\nIMO, this tests has specific purpose so it should be retained.","commit_id":"18f45c87c28407035ce3021cfcd8a30d117ce663"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"5c134a0f77c81afcdc2b4fc9a96b01a512c48e04","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        self.assertIsNotNone(flavours[0][\u0027sw_images\u0027])"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    @mock.patch(\u0027tacker.common.csar_utils._extract_csar_zip_file\u0027)"},{"line_number":205,"context_line":"    def test_load_csar_data_with_multiple_sw_image_data_with_short_notation("},{"line_number":206,"context_line":"            self, mock_extract_csar_zip_file):"},{"line_number":207,"context_line":"        file_path \u003d os.path.join("},{"line_number":208,"context_line":"            self.base_path,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_13fc01b4","line":205,"range":{"start_line":205,"start_character":4,"end_line":205,"end_character":9},"in_reply_to":"3fa7e38b_73a1b5f7","updated":"2019-11-07 08:52:06.000000000","message":"I think you want to keep the test csar.zip files to as minimum as possible.\n\nIn csar_with_multiple_sw_image_data.zip, it\u0027s checking if there are two artifacts  of type \"tosca.artifacts.nfv.SwImage\" defined in extended notation format whereas in this test, it\u0027s checking one is defined in short notation and another in extended notation. So test data wise I think it\u0027s ok to keep the test as is.\n\nIn fact, there is one test missing where multiple artifacts are specified in short notation format in which case it will also raise the same error.","commit_id":"18f45c87c28407035ce3021cfcd8a30d117ce663"}]}
