)]}'
{"cyborg/db/api.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"8a1824a7835dbc2997e860cdcf807265412b033a","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        \"\"\"Get requested deployable by filters.\"\"\""},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    @abc.abstractmethod"},{"line_number":138,"context_line":"    def deployable_get_by_filters_with_attributes(self, context,"},{"line_number":139,"context_line":"                                                  filters):"},{"line_number":140,"context_line":"        \"\"\"Get requested deployable by filters with attributes.\"\"\""},{"line_number":141,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_8f1cd614","side":"PARENT","line":138,"range":{"start_line":138,"start_character":8,"end_line":138,"end_character":49},"updated":"2020-02-08 05:45:33.000000000","message":"Why we remove this function? In the message I was not saw the reason, this change is big, I think you should add a releasenote for this, and said why we remove this db api, and instead of \"deployable_get_by_filters()\".\n\nAdd a new releasenote refer: https://docs.openstack.org/reno/latest/user/usage.html#creating-new-release-notes","commit_id":"d8cbe092deaae6be2d90221ce64b40bffa3116c6"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"bf16d0be2adb6f8dadc0f3c20d6b13c98ed6c490","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        \"\"\"Get requested deployable by filters.\"\"\""},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    @abc.abstractmethod"},{"line_number":138,"context_line":"    def deployable_get_by_filters_with_attributes(self, context,"},{"line_number":139,"context_line":"                                                  filters):"},{"line_number":140,"context_line":"        \"\"\"Get requested deployable by filters with attributes.\"\"\""},{"line_number":141,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_2f8fe222","side":"PARENT","line":138,"range":{"start_line":138,"start_character":8,"end_line":138,"end_character":49},"in_reply_to":"3fa7e38b_8f1cd614","updated":"2020-02-09 14:12:46.000000000","message":"Good catch. This part code should appear in the next patch[1]. I made a mistake when updating the code.\n[1]. https://review.opendev.org/#/c/703333/2\nThanks. will update this. So the releasenote is not needed.","commit_id":"d8cbe092deaae6be2d90221ce64b40bffa3116c6"}],"cyborg/db/sqlalchemy/api.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"a2ad0d7cc6a2168c169324ea5512e91fabc8a3e0","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        :param legal_keys: list of keys to apply exact filtering to"},{"line_number":212,"context_line":"        \"\"\""},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        if filters is None:"},{"line_number":215,"context_line":"            filters \u003d {}"},{"line_number":216,"context_line":"        if legal_keys is None:"},{"line_number":217,"context_line":"            legal_keys \u003d []"},{"line_number":218,"context_line":"        filter_dict \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_3c189a81","line":215,"range":{"start_line":214,"start_character":7,"end_line":215,"end_character":24},"updated":"2020-01-20 09:21:10.000000000","message":"https://review.opendev.org/#/c/703049/ already fixed this(because it depends-on https://review.opendev.org/#/c/702578, so it was not merged), I think you should rebased on that patch, and then run your test.\n\nYou can:\ngit review -d 703281\n\nand then:\ngit review -x 703049\ngit commit --amend\n\nfinally:\ngit review","commit_id":"623140fd3b08be8ea0ff0d3a696dc6fa9e4a358f"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"6e07f550a8255e1e2279745a7cf3c32c5b8b7567","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        :param legal_keys: list of keys to apply exact filtering to"},{"line_number":212,"context_line":"        \"\"\""},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        if filters is None:"},{"line_number":215,"context_line":"            filters \u003d {}"},{"line_number":216,"context_line":"        if legal_keys is None:"},{"line_number":217,"context_line":"            legal_keys \u003d []"},{"line_number":218,"context_line":"        filter_dict \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_ae0c42eb","line":215,"range":{"start_line":214,"start_character":7,"end_line":215,"end_character":24},"in_reply_to":"3fa7e38b_3c189a81","updated":"2020-01-21 02:44:46.000000000","message":"Good advice. Thanks Brin. I know your patch had fixed this. This is only a temporary addition, so that unit tests can pass. After your patch merged, I will rebase on it.","commit_id":"623140fd3b08be8ea0ff0d3a696dc6fa9e4a358f"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"a029cfa97000f44f3e36351a67c57a6045eedb85","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        :param legal_keys: list of keys to apply exact filtering to"},{"line_number":212,"context_line":"        \"\"\""},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        if filters is None:"},{"line_number":215,"context_line":"            filters \u003d {}"},{"line_number":216,"context_line":"        if legal_keys is None:"},{"line_number":217,"context_line":"            legal_keys \u003d []"},{"line_number":218,"context_line":"        filter_dict \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_424fb034","line":215,"range":{"start_line":214,"start_character":7,"end_line":215,"end_character":24},"in_reply_to":"3fa7e38b_3c189a81","updated":"2020-01-20 09:43:06.000000000","message":"agree","commit_id":"623140fd3b08be8ea0ff0d3a696dc6fa9e4a358f"}],"cyborg/objects/deployable.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6599ad03a3a1901ad07e3316223e2d7b64f72004","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    def get_by_filter(cls, context,"},{"line_number":135,"context_line":"                      filters):"},{"line_number":136,"context_line":"        obj_dpl_list \u003d []"},{"line_number":137,"context_line":"        db_dpl_list \u003d cls.dbapi.deployable_get_by_filters("},{"line_number":138,"context_line":"            context,"},{"line_number":139,"context_line":"            filters)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        if db_dpl_list:"},{"line_number":142,"context_line":"            for db_dpl in db_dpl_list:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_efb1ca01","line":139,"range":{"start_line":137,"start_character":0,"end_line":139,"end_character":20},"updated":"2020-02-08 06:20:56.000000000","message":"nit:        db_dpl_list \u003d cls.dbapi.deployable_get_by_filters(context, filters)\n\nit\u0027s not more than 79 characters.","commit_id":"8829e17b4d29f55f5a086bcd9a99cfe7d7c02cf3"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"bf16d0be2adb6f8dadc0f3c20d6b13c98ed6c490","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    def get_by_filter(cls, context,"},{"line_number":135,"context_line":"                      filters):"},{"line_number":136,"context_line":"        obj_dpl_list \u003d []"},{"line_number":137,"context_line":"        db_dpl_list \u003d cls.dbapi.deployable_get_by_filters("},{"line_number":138,"context_line":"            context,"},{"line_number":139,"context_line":"            filters)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        if db_dpl_list:"},{"line_number":142,"context_line":"            for db_dpl in db_dpl_list:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_ef946a37","line":139,"range":{"start_line":137,"start_character":0,"end_line":139,"end_character":20},"in_reply_to":"3fa7e38b_efb1ca01","updated":"2020-02-09 14:12:46.000000000","message":"Ok.","commit_id":"8829e17b4d29f55f5a086bcd9a99cfe7d7c02cf3"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"cfb5769f3961055835a3352ea7d2caf864f09da2","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    def get_by_filter(cls, context,"},{"line_number":135,"context_line":"                      filters):"},{"line_number":136,"context_line":"        obj_dpl_list \u003d []"},{"line_number":137,"context_line":"        db_dpl_list \u003d cls.dbapi.deployable_get_by_filters("},{"line_number":138,"context_line":"            context,"},{"line_number":139,"context_line":"            filters)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        if db_dpl_list:"},{"line_number":142,"context_line":"            for db_dpl in db_dpl_list:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_0f53ff16","line":139,"range":{"start_line":137,"start_character":0,"end_line":139,"end_character":20},"in_reply_to":"3fa7e38b_efb1ca01","updated":"2020-02-10 03:06:52.000000000","message":"Thanks Brin. I think it\u0027s ok.","commit_id":"8829e17b4d29f55f5a086bcd9a99cfe7d7c02cf3"}],"cyborg/tests/unit/db/test_db_deployable.py":[{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"a029cfa97000f44f3e36351a67c57a6045eedb85","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from cyborg.tests.unit.db import utils"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class TestDbDeployable(base.DbTestCase):"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def test_get_by_uuid(self):"},{"line_number":28,"context_line":"        created_dep \u003d utils.create_test_deployable(self.context)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_c25400c9","line":25,"range":{"start_line":25,"start_character":6,"end_line":25,"end_character":22},"updated":"2020-01-20 09:43:06.000000000","message":"I think we should also add test_deployable_create here. What do you think?","commit_id":"623140fd3b08be8ea0ff0d3a696dc6fa9e4a358f"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"178c9b923e593618cc3826ce0a26cabfbe8e8df8","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from cyborg.tests.unit.db import utils"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class TestDbDeployable(base.DbTestCase):"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def test_get_by_uuid(self):"},{"line_number":28,"context_line":"        created_dep \u003d utils.create_test_deployable(self.context)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_7a436112","line":25,"range":{"start_line":25,"start_character":6,"end_line":25,"end_character":22},"in_reply_to":"3fa7e38b_8b08632e","updated":"2020-01-21 08:58:15.000000000","message":"Done.","commit_id":"623140fd3b08be8ea0ff0d3a696dc6fa9e4a358f"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"6ef046cd158650ad0f697c144f0a3766e2966e71","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from cyborg.tests.unit.db import utils"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class TestDbDeployable(base.DbTestCase):"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def test_get_by_uuid(self):"},{"line_number":28,"context_line":"        created_dep \u003d utils.create_test_deployable(self.context)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_8b08632e","line":25,"range":{"start_line":25,"start_character":6,"end_line":25,"end_character":22},"in_reply_to":"3fa7e38b_c25400c9","updated":"2020-01-20 13:46:03.000000000","message":"Thanks xinran. Good Catch. Actually every testcase include deployable_create method. That\u0027s why I didn\u0027t add a method to verify deployable_create.","commit_id":"623140fd3b08be8ea0ff0d3a696dc6fa9e4a358f"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6599ad03a3a1901ad07e3316223e2d7b64f72004","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\"Tests for manipulating Deployable via the DB API\"\"\""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo_utils import uuidutils"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from cyborg.common import exception"},{"line_number":21,"context_line":"from cyborg.tests.unit.db import base"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_cfa16ea9","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":32},"updated":"2020-02-08 06:20:56.000000000","message":"nit: instead of use \"from oslo_utils.fixture import uuidsentinel as uuids\", some reason in https://review.opendev.org/#/c/703341/2/cyborg/tests/unit/db/test_db_extarq.py@18","commit_id":"8829e17b4d29f55f5a086bcd9a99cfe7d7c02cf3"}],"cyborg/tests/unit/db/utils.py":[{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"a029cfa97000f44f3e36351a67c57a6045eedb85","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from cyborg.db import api as db_api"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def get_test_deployable(**kw):"},{"line_number":22,"context_line":"    return {"},{"line_number":23,"context_line":"        \u0027id\u0027: kw.get(\u0027id\u0027, 1),"},{"line_number":24,"context_line":"        \u0027uuid\u0027: kw.get(\u0027uuid\u0027, \u002710efe63d-dfea-4a37-ad94-4116fba50112\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_e2257c5c","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":30},"updated":"2020-01-20 09:43:06.000000000","message":"I think we can remove these functions step by step, and use https://github.com/openstack/cyborg/blob/master/cyborg/tests/unit/fake_deployable.py instead, please see https://review.opendev.org/#/c/695648/7/cyborg/tests/unit/db/utils.py and https://review.opendev.org/#/c/695648/7/cyborg/tests/unit/fake_device.py.\nI think this can reduce the code redundancy.","commit_id":"623140fd3b08be8ea0ff0d3a696dc6fa9e4a358f"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"ac75b358d0d0510fffc1239fa110ef9232f9f33d","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from cyborg.db import api as db_api"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def get_test_deployable(**kw):"},{"line_number":22,"context_line":"    return {"},{"line_number":23,"context_line":"        \u0027id\u0027: kw.get(\u0027id\u0027, 1),"},{"line_number":24,"context_line":"        \u0027uuid\u0027: kw.get(\u0027uuid\u0027, \u002710efe63d-dfea-4a37-ad94-4116fba50112\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_14e804de","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":30},"in_reply_to":"3fa7e38b_ce9bbe76","updated":"2020-01-21 06:16:09.000000000","message":"As the same, move this to the fake_deplouable.py, make this looks clear.","commit_id":"623140fd3b08be8ea0ff0d3a696dc6fa9e4a358f"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"3e4741ee1425ac3a927bc8141b1604e27990b893","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from cyborg.db import api as db_api"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def get_test_deployable(**kw):"},{"line_number":22,"context_line":"    return {"},{"line_number":23,"context_line":"        \u0027id\u0027: kw.get(\u0027id\u0027, 1),"},{"line_number":24,"context_line":"        \u0027uuid\u0027: kw.get(\u0027uuid\u0027, \u002710efe63d-dfea-4a37-ad94-4116fba50112\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_ce9bbe76","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":30},"in_reply_to":"3fa7e38b_e2257c5c","updated":"2020-01-21 02:56:02.000000000","message":"I had created a story: https://storyboard.openstack.org/#!/story/2007190\nWe can sort out the duplicate code and add the appropriate fake data in this task.","commit_id":"623140fd3b08be8ea0ff0d3a696dc6fa9e4a358f"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"6ef046cd158650ad0f697c144f0a3766e2966e71","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from cyborg.db import api as db_api"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def get_test_deployable(**kw):"},{"line_number":22,"context_line":"    return {"},{"line_number":23,"context_line":"        \u0027id\u0027: kw.get(\u0027id\u0027, 1),"},{"line_number":24,"context_line":"        \u0027uuid\u0027: kw.get(\u0027uuid\u0027, \u002710efe63d-dfea-4a37-ad94-4116fba50112\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_f67e9a6b","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":30},"in_reply_to":"3fa7e38b_e2257c5c","updated":"2020-01-20 13:46:03.000000000","message":"Thanks for xinran and bailin\u0027s advice. I agree that we need to set a series of fake data for all layers and rearrange redundant code like [1].\n[1]. https://github.com/openstack/cyborg/blob/master/cyborg/tests/unit/fake_deployable.py#L21\nBut for this patch, I think the main problem is to improve unit testing. To avoid complications, we should integrate the fake data with a new topic.\n@Xinran @Bailin. what do you think?","commit_id":"623140fd3b08be8ea0ff0d3a696dc6fa9e4a358f"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"b5bba7379a69946a8ef3fe06fb35fc108616db6c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from cyborg.db import api as db_api"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def get_test_deployable(**kw):"},{"line_number":22,"context_line":"    return {"},{"line_number":23,"context_line":"        \u0027id\u0027: kw.get(\u0027id\u0027, 1),"},{"line_number":24,"context_line":"        \u0027uuid\u0027: kw.get(\u0027uuid\u0027, \u002710efe63d-dfea-4a37-ad94-4116fba50112\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_22c5d409","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":30},"in_reply_to":"3fa7e38b_e2257c5c","updated":"2020-01-20 10:01:50.000000000","message":"Yeah, I think that\u0027s also Sundar\u0027s mean, \"we could have a single set of fake data for all layers -- api, objects and db,  That one set can then be expanded to cover various cases. IMHO, having separate sets for db and objects is ok for UT right now.\"\n\nSo you should define the deployable,devices,device_profiles,attach_handle etc. in fake_xxx.py under cyborg/tests/unit/fake_xxx.py\n\nAgree with xinran, that will avoid so many redundant code whil need some fake data.","commit_id":"623140fd3b08be8ea0ff0d3a696dc6fa9e4a358f"}]}
