)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"f4ebb7b49cfc6657d114540af00e8ffabc77bea9","unresolved":false,"context_lines":[{"line_number":9,"context_line":"There is a race between getting the instances from the database and"},{"line_number":10,"context_line":"when the view builder shows the details.  If an instance is deleted"},{"line_number":11,"context_line":"before lazy-loading some info, like the flavor, then the view"},{"line_number":12,"context_line":"builder fails with an InstanceNotFound and the request returns a 500."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"We can have the view builder tell the API code what attributes it"},{"line_number":15,"context_line":"expects when it gets the instance from the database so that we don\u0027t"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa1b9901_dbe560a8","line":12,"updated":"2015-08-25 06:14:52.000000000","message":"Traceback (most recent call last):\n  File \"tempest/api/compute/admin/test_servers.py\", line 81, in test_list_servers_by_admin_with_all_tenants\n    body \u003d self.client.list_servers(detail\u003dTrue, **params)\n  File \"tempest/services/compute/json/servers_client.py\", line 159, in list_servers\n    resp, body \u003d self.get(url)\n  File \"/opt/stack/new/tempest/.tox/full/local/lib/python2.7/site-packages/tempest_lib/common/rest_client.py\", line 271, in get\n    return self.request(\u0027GET\u0027, url, extra_headers, headers)\n  File \"/opt/stack/new/tempest/.tox/full/local/lib/python2.7/site-packages/tempest_lib/common/rest_client.py\", line 643, in request\n    resp, resp_body)\n  File \"/opt/stack/new/tempest/.tox/full/local/lib/python2.7/site-packages/tempest_lib/common/rest_client.py\", line 695, in _error_checker\n    raise exceptions.NotFound(resp_body)\ntempest_lib.exceptions.NotFound: Object not found\nDetails: {u\u0027message\u0027: u\u0027The resource could not be found.\u0027, u\u0027code\u0027: 404}\n\nA response seems 404, not 500 on the gate.","commit_id":"2ec3bc30da8902f2d9d26fbcabecadc9397d89eb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b66f3557246816bf1606f01800ea97589a02902","unresolved":false,"context_lines":[{"line_number":9,"context_line":"There is a race between getting the instances from the database and"},{"line_number":10,"context_line":"when the view builder shows the details.  If an instance is deleted"},{"line_number":11,"context_line":"before lazy-loading some info, like the flavor, then the view"},{"line_number":12,"context_line":"builder fails with an InstanceNotFound and the request returns a 500."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"We can have the view builder tell the API code what attributes it"},{"line_number":15,"context_line":"expects when it gets the instance from the database so that we don\u0027t"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa1b9901_76de8512","line":12,"in_reply_to":"fa1b9901_8f38fe3e","updated":"2015-08-25 18:11:35.000000000","message":"I updated the e-r query yesterday for the 404:\n\nhttps://review.openstack.org/#/c/216414/","commit_id":"2ec3bc30da8902f2d9d26fbcabecadc9397d89eb"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"3f342ca9bd4bf9b459e3b8df10c80464ebd71492","unresolved":false,"context_lines":[{"line_number":9,"context_line":"There is a race between getting the instances from the database and"},{"line_number":10,"context_line":"when the view builder shows the details.  If an instance is deleted"},{"line_number":11,"context_line":"before lazy-loading some info, like the flavor, then the view"},{"line_number":12,"context_line":"builder fails with an InstanceNotFound and the request returns a 500."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"We can have the view builder tell the API code what attributes it"},{"line_number":15,"context_line":"expects when it gets the instance from the database so that we don\u0027t"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa1b9901_8f38fe3e","line":12,"in_reply_to":"fa1b9901_cfbd96d8","updated":"2015-08-25 07:53:51.000000000","message":"oh, I see.\nThanks for your explanation, Alex :-)","commit_id":"2ec3bc30da8902f2d9d26fbcabecadc9397d89eb"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"973e7df059049dc0f1baf3ceea7a952e597a5eb7","unresolved":false,"context_lines":[{"line_number":9,"context_line":"There is a race between getting the instances from the database and"},{"line_number":10,"context_line":"when the view builder shows the details.  If an instance is deleted"},{"line_number":11,"context_line":"before lazy-loading some info, like the flavor, then the view"},{"line_number":12,"context_line":"builder fails with an InstanceNotFound and the request returns a 500."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"We can have the view builder tell the API code what attributes it"},{"line_number":15,"context_line":"expects when it gets the instance from the database so that we don\u0027t"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa1b9901_cfbd96d8","line":12,"in_reply_to":"fa1b9901_dbe560a8","updated":"2015-08-25 07:47:42.000000000","message":"I guess for v2 API, it will return 404.\n\nFor v2.1 API, it will return 500, as the InstanceNotFound exception won\u0027t catched by the api layer code, the v2.1 API will return 500","commit_id":"2ec3bc30da8902f2d9d26fbcabecadc9397d89eb"}],"nova/api/openstack/compute/legacy_v2/servers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"61933406f96ebe20b0751cb7580c61a96a8b699e","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            # merge our expected attrs with what the view builder needs for"},{"line_number":228,"context_line":"            # showing details"},{"line_number":229,"context_line":"            expected_attrs \u003d self._view_builder.get_show_expected_attrs("},{"line_number":230,"context_line":"                                                                expected_attrs)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        try:"},{"line_number":233,"context_line":"            instance_list \u003d self.compute_api.get_all(elevated or context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_175f8076","line":230,"updated":"2015-08-22 01:49:29.000000000","message":"This will fail with a NoneType...","commit_id":"48a1cfa2dc7f8cc1a659e953886a3b40fccd3f9a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"da8e115cdf0b04ab01b9c2c5c1fdeee52e5778a2","unresolved":false,"context_lines":[{"line_number":252,"context_line":"    def _get_server(self, context, req, instance_uuid):"},{"line_number":253,"context_line":"        \"\"\"Utility function for looking up an instance by uuid.\"\"\""},{"line_number":254,"context_line":"        instance \u003d common.get_instance(self.compute_api, context,"},{"line_number":255,"context_line":"                                       instance_uuid,"},{"line_number":256,"context_line":"                                       expected_attrs\u003d[\u0027flavor\u0027])"},{"line_number":257,"context_line":"        req.cache_db_instance(instance)"},{"line_number":258,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_cc68848a","line":255,"updated":"2015-08-24 01:02:37.000000000","message":"we should get expected attrs from views\u0027s show also","commit_id":"95ceb33e0989f546cbb228e7e969e490ccbe8d64"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a7fd8f6a47490b4ebc4acf7054a56e3187da97ed","unresolved":false,"context_lines":[{"line_number":252,"context_line":"    def _get_server(self, context, req, instance_uuid):"},{"line_number":253,"context_line":"        \"\"\"Utility function for looking up an instance by uuid.\"\"\""},{"line_number":254,"context_line":"        instance \u003d common.get_instance(self.compute_api, context,"},{"line_number":255,"context_line":"                                       instance_uuid,"},{"line_number":256,"context_line":"                                       expected_attrs\u003d[\u0027flavor\u0027])"},{"line_number":257,"context_line":"        req.cache_db_instance(instance)"},{"line_number":258,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_37bcd26b","line":255,"in_reply_to":"fa1b9901_cc68848a","updated":"2015-08-24 14:25:21.000000000","message":"Yeah good point.","commit_id":"95ceb33e0989f546cbb228e7e969e490ccbe8d64"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d5aac883b77ff2f8191e695be51a6ef1cf5a274e","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        try:"},{"line_number":226,"context_line":"            instance_list \u003d self.compute_api.get_all(elevated or context,"},{"line_number":227,"context_line":"                    search_opts\u003dsearch_opts, limit\u003dlimit, marker\u003dmarker,"},{"line_number":228,"context_line":"                    want_objects\u003dTrue, expected_attrs\u003dexpected_attrs,"},{"line_number":229,"context_line":"                    sort_keys\u003dsort_keys, sort_dirs\u003dsort_dirs)"},{"line_number":230,"context_line":"        except exception.MarkerNotFound:"},{"line_number":231,"context_line":"            msg \u003d _(\u0027marker [%s] not found\u0027) % marker"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_fb03e274","line":228,"updated":"2015-08-26 19:28:29.000000000","message":"It took me awhile to realize this was the missing piece causing the gate failures -- everywhere else is already specifying \u0027flavor\u0027 as an expected attribute.","commit_id":"2e68b2298e94a15d1282c0fb46804b9efa6c8b3a"}],"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"da8e115cdf0b04ab01b9c2c5c1fdeee52e5778a2","unresolved":false,"context_lines":[{"line_number":373,"context_line":"        sort_keys, sort_dirs \u003d common.get_sort_params(req.params)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"        expected_attrs \u003d [\u0027pci_devices\u0027]"},{"line_number":376,"context_line":"        if is_detail:"},{"line_number":377,"context_line":"            # merge our expected attrs with what the view builder needs for"},{"line_number":378,"context_line":"            # showing details"},{"line_number":379,"context_line":"            expected_attrs \u003d self._view_builder.get_show_expected_attrs("}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_2c402007","line":376,"updated":"2015-08-24 01:02:37.000000000","message":"++","commit_id":"95ceb33e0989f546cbb228e7e969e490ccbe8d64"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"da8e115cdf0b04ab01b9c2c5c1fdeee52e5778a2","unresolved":false,"context_lines":[{"line_number":404,"context_line":"        \"\"\"Utility function for looking up an instance by uuid.\"\"\""},{"line_number":405,"context_line":"        instance \u003d common.get_instance(self.compute_api, context,"},{"line_number":406,"context_line":"                                       instance_uuid,"},{"line_number":407,"context_line":"                                       expected_attrs\u003d[\u0027pci_devices\u0027,"},{"line_number":408,"context_line":"                                                       \u0027flavor\u0027])"},{"line_number":409,"context_line":"        req.cache_db_instance(instance)"},{"line_number":410,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_6c5db8eb","line":407,"updated":"2015-08-24 01:02:37.000000000","message":"we should have same code as line 379 at here","commit_id":"95ceb33e0989f546cbb228e7e969e490ccbe8d64"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a7fd8f6a47490b4ebc4acf7054a56e3187da97ed","unresolved":false,"context_lines":[{"line_number":404,"context_line":"        \"\"\"Utility function for looking up an instance by uuid.\"\"\""},{"line_number":405,"context_line":"        instance \u003d common.get_instance(self.compute_api, context,"},{"line_number":406,"context_line":"                                       instance_uuid,"},{"line_number":407,"context_line":"                                       expected_attrs\u003d[\u0027pci_devices\u0027,"},{"line_number":408,"context_line":"                                                       \u0027flavor\u0027])"},{"line_number":409,"context_line":"        req.cache_db_instance(instance)"},{"line_number":410,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_3731320c","line":407,"in_reply_to":"fa1b9901_6c5db8eb","updated":"2015-08-24 14:25:21.000000000","message":"yup","commit_id":"95ceb33e0989f546cbb228e7e969e490ccbe8d64"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"bc97f04c89b818c2ae80488323fe5df1507b0b8b","unresolved":false,"context_lines":[{"line_number":765,"context_line":"            self.update_extension_manager.map(self._update_extension_point,"},{"line_number":766,"context_line":"                                              body[\u0027server\u0027], update_dict)"},{"line_number":767,"context_line":""},{"line_number":768,"context_line":"        instance \u003d common.get_instance(self.compute_api, ctxt, id,"},{"line_number":769,"context_line":"                                       expected_attrs\u003d[\u0027pci_devices\u0027])"},{"line_number":770,"context_line":"        try:"},{"line_number":771,"context_line":"            # NOTE(mikal): this try block needs to stay because save() still"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_e5ad2189","line":768,"updated":"2015-08-25 05:07:17.000000000","message":"you change this for v2, I guess you forget change this","commit_id":"2ec3bc30da8902f2d9d26fbcabecadc9397d89eb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b66f3557246816bf1606f01800ea97589a02902","unresolved":false,"context_lines":[{"line_number":765,"context_line":"            self.update_extension_manager.map(self._update_extension_point,"},{"line_number":766,"context_line":"                                              body[\u0027server\u0027], update_dict)"},{"line_number":767,"context_line":""},{"line_number":768,"context_line":"        instance \u003d common.get_instance(self.compute_api, ctxt, id,"},{"line_number":769,"context_line":"                                       expected_attrs\u003d[\u0027pci_devices\u0027])"},{"line_number":770,"context_line":"        try:"},{"line_number":771,"context_line":"            # NOTE(mikal): this try block needs to stay because save() still"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_f6f93581","line":768,"in_reply_to":"fa1b9901_e5ad2189","updated":"2015-08-25 18:11:35.000000000","message":"Yeah, nice catch.  I missed it here since I was only looking for the calls to self._get_server.","commit_id":"2ec3bc30da8902f2d9d26fbcabecadc9397d89eb"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"bc97f04c89b818c2ae80488323fe5df1507b0b8b","unresolved":false,"context_lines":[{"line_number":1006,"context_line":"                exception.AutoDiskConfigDisabledByImage) as error:"},{"line_number":1007,"context_line":"            raise exc.HTTPBadRequest(explanation\u003derror.format_message())"},{"line_number":1008,"context_line":""},{"line_number":1009,"context_line":"        instance \u003d self._get_server(context, req, id, is_detail\u003dTrue)"},{"line_number":1010,"context_line":""},{"line_number":1011,"context_line":"        view \u003d self._view_builder.show(req, instance, extend_address\u003dFalse)"},{"line_number":1012,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_85854508","line":1009,"updated":"2015-08-25 05:07:17.000000000","message":"++","commit_id":"2ec3bc30da8902f2d9d26fbcabecadc9397d89eb"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c95633927faa3f29e4421881ae1076d292d89882","unresolved":false,"context_lines":[{"line_number":755,"context_line":"        try:"},{"line_number":756,"context_line":"            # NOTE(mikal): this try block needs to stay because save() still"},{"line_number":757,"context_line":"            # might throw an exception."},{"line_number":758,"context_line":"            req.cache_db_instance(instance)"},{"line_number":759,"context_line":"            instance.update(update_dict)"},{"line_number":760,"context_line":"            instance.save()"},{"line_number":761,"context_line":"            return self._view_builder.show(req, instance,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_f2c1104f","side":"PARENT","line":758,"updated":"2015-08-26 14:51:56.000000000","message":"was about to ask why these two were dropped, but I see now, its has just moved.","commit_id":"7a1ef0b53874d3a596583aa5ad451ae3c72637f2"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"9297f7c41611c12e1550e66d129467d9fab9ddae","unresolved":false,"context_lines":[{"line_number":402,"context_line":"        :param is_detail: True if you plan on showing the details of the"},{"line_number":403,"context_line":"            instance in the response, False otherwise."},{"line_number":404,"context_line":"        \"\"\""},{"line_number":405,"context_line":"        expected_attrs \u003d [\u0027flavor\u0027, \u0027pci_devices\u0027]"},{"line_number":406,"context_line":"        if is_detail:"},{"line_number":407,"context_line":"            expected_attrs \u003d self._view_builder.get_show_expected_attrs("},{"line_number":408,"context_line":"                                                            expected_attrs)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_40c1052e","line":405,"updated":"2015-08-26 14:37:25.000000000","message":"isn\u0027t flavor already in the default showing attrs? It looks like you never test this function with is_detail so it looks like you\u0027re never seeing what happens when you double them up in tests.","commit_id":"2e68b2298e94a15d1282c0fb46804b9efa6c8b3a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"77620c2b2395ec814016bedc076c132f29885be7","unresolved":false,"context_lines":[{"line_number":402,"context_line":"        :param is_detail: True if you plan on showing the details of the"},{"line_number":403,"context_line":"            instance in the response, False otherwise."},{"line_number":404,"context_line":"        \"\"\""},{"line_number":405,"context_line":"        expected_attrs \u003d [\u0027flavor\u0027, \u0027pci_devices\u0027]"},{"line_number":406,"context_line":"        if is_detail:"},{"line_number":407,"context_line":"            expected_attrs \u003d self._view_builder.get_show_expected_attrs("},{"line_number":408,"context_line":"                                                            expected_attrs)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_729ae063","line":405,"in_reply_to":"fa1b9901_40c1052e","updated":"2015-08-26 14:45:24.000000000","message":"I\u0027m pretty sure this is hit from tests on other methods that call this.  I can add a specific unit test for the view builder method - that would be cleaner IMO since the server API tests are kind of clunky.\n\nBut the point of the set used in the view builder method is to filter out duplicates.","commit_id":"2e68b2298e94a15d1282c0fb46804b9efa6c8b3a"}],"nova/api/openstack/compute/views/servers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"61933406f96ebe20b0751cb7580c61a96a8b699e","unresolved":false,"context_lines":[{"line_number":32,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"# These are the lazy-loadable instance attributes required for showing details"},{"line_number":35,"context_line":"# about an instance. Add to this list as new things need to be shown. "},{"line_number":36,"context_line":"SHOW_EXPECTED_ATTRS \u003d (\u0027flavor\u0027, \u0027info_cache\u0027, \u0027metadata\u0027)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_d758288d","line":35,"updated":"2015-08-22 01:49:29.000000000","message":"wut?!","commit_id":"48a1cfa2dc7f8cc1a659e953886a3b40fccd3f9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"61933406f96ebe20b0751cb7580c61a96a8b699e","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"# These are the lazy-loadable instance attributes required for showing details"},{"line_number":35,"context_line":"# about an instance. Add to this list as new things need to be shown. "},{"line_number":36,"context_line":"SHOW_EXPECTED_ATTRS \u003d (\u0027flavor\u0027, \u0027info_cache\u0027, \u0027metadata\u0027)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class ViewBuilder(common.ViewBuilder):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_17c6a016","line":36,"updated":"2015-08-22 01:49:29.000000000","message":"Should this have pci_devices for v2.1?","commit_id":"48a1cfa2dc7f8cc1a659e953886a3b40fccd3f9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"61933406f96ebe20b0751cb7580c61a96a8b699e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            },"},{"line_number":85,"context_line":"        }"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def get_show_expected_attrs(self, expected_attrs\u003d[]):"},{"line_number":88,"context_line":"        \"\"\"Returns a list of lazy-loadable expected attributes used by show"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        This should be used when getting the instances from the database so"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_b7501460","line":87,"updated":"2015-08-22 01:49:29.000000000","message":"Should probably handle if this is None.","commit_id":"48a1cfa2dc7f8cc1a659e953886a3b40fccd3f9a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"da8e115cdf0b04ab01b9c2c5c1fdeee52e5778a2","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        \"\"\""},{"line_number":102,"context_line":"        if expected_attrs is None:"},{"line_number":103,"context_line":"            expected_attrs \u003d []"},{"line_number":104,"context_line":"        return sorted(list(set(self._show_expected_attrs + expected_attrs)))"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def show(self, request, instance):"},{"line_number":107,"context_line":"        \"\"\"Detailed view of a single instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_6c3618b6","line":104,"updated":"2015-08-24 01:02:37.000000000","message":"why we need sort the list?","commit_id":"95ceb33e0989f546cbb228e7e969e490ccbe8d64"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a7fd8f6a47490b4ebc4acf7054a56e3187da97ed","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        \"\"\""},{"line_number":102,"context_line":"        if expected_attrs is None:"},{"line_number":103,"context_line":"            expected_attrs \u003d []"},{"line_number":104,"context_line":"        return sorted(list(set(self._show_expected_attrs + expected_attrs)))"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def show(self, request, instance):"},{"line_number":107,"context_line":"        \"\"\"Detailed view of a single instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_290c763a","line":104,"in_reply_to":"fa1b9901_6c3618b6","updated":"2015-08-24 14:25:21.000000000","message":"So that we have predictable order when we assert the list during unit tests, which was a problem I ran into.","commit_id":"95ceb33e0989f546cbb228e7e969e490ccbe8d64"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"60cfa89cd2002f9b7f65381a74893fc211c1cccc","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        \"\"\""},{"line_number":102,"context_line":"        if expected_attrs is None:"},{"line_number":103,"context_line":"            expected_attrs \u003d []"},{"line_number":104,"context_line":"        return sorted(list(set(self._show_expected_attrs + expected_attrs)))"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def show(self, request, instance):"},{"line_number":107,"context_line":"        \"\"\"Detailed view of a single instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_b88bee67","line":104,"updated":"2015-08-24 15:56:45.000000000","message":"a question: why sorted is needed?","commit_id":"17739dd7999c8ca2609d0bcc485feb92790525e8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1181e63aa565399dfc1d2ab3d1e58bba64cb2aa1","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        \"\"\""},{"line_number":102,"context_line":"        if expected_attrs is None:"},{"line_number":103,"context_line":"            expected_attrs \u003d []"},{"line_number":104,"context_line":"        return sorted(list(set(self._show_expected_attrs + expected_attrs)))"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def show(self, request, instance):"},{"line_number":107,"context_line":"        \"\"\"Detailed view of a single instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_33013f6b","line":104,"in_reply_to":"fa1b9901_b88bee67","updated":"2015-08-24 16:13:14.000000000","message":"Alex asked this in the previous patch set.  It\u0027s so we have predictable sorted lists for making assertions in the unit tests.","commit_id":"17739dd7999c8ca2609d0bcc485feb92790525e8"},{"author":{"_account_id":17139,"name":"Chuck Carmack","email":"carmack@us.ibm.com","username":"ccarmack"},"change_message_id":"40e1ec0c9db7071874244085ff2f4e59866de5cc","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    # These are the lazy-loadable instance attributes required for showing"},{"line_number":54,"context_line":"    # details about an instance. Add to this list as new things need to be"},{"line_number":55,"context_line":"    # shown."},{"line_number":56,"context_line":"    _show_expected_attrs \u003d [\u0027flavor\u0027, \u0027info_cache\u0027, \u0027metadata\u0027]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def __init__(self):"},{"line_number":59,"context_line":"        \"\"\"Initialize view builder.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_921a147c","line":56,"updated":"2015-08-26 14:48:51.000000000","message":"Should this list be owned by the Instance, rather than here?","commit_id":"2e68b2298e94a15d1282c0fb46804b9efa6c8b3a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c95633927faa3f29e4421881ae1076d292d89882","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    # These are the lazy-loadable instance attributes required for showing"},{"line_number":54,"context_line":"    # details about an instance. Add to this list as new things need to be"},{"line_number":55,"context_line":"    # shown."},{"line_number":56,"context_line":"    _show_expected_attrs \u003d [\u0027flavor\u0027, \u0027info_cache\u0027, \u0027metadata\u0027]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def __init__(self):"},{"line_number":59,"context_line":"        \"\"\"Initialize view builder.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_d5b71638","line":56,"in_reply_to":"fa1b9901_921a147c","updated":"2015-08-26 14:51:56.000000000","message":"I think this is specific to this set of views, so I like it here.","commit_id":"2e68b2298e94a15d1282c0fb46804b9efa6c8b3a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a23da753e1eff616f9508bfac277e93bc409c1f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    # These are the lazy-loadable instance attributes required for showing"},{"line_number":54,"context_line":"    # details about an instance. Add to this list as new things need to be"},{"line_number":55,"context_line":"    # shown."},{"line_number":56,"context_line":"    _show_expected_attrs \u003d [\u0027flavor\u0027, \u0027info_cache\u0027, \u0027metadata\u0027]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def __init__(self):"},{"line_number":59,"context_line":"        \"\"\"Initialize view builder.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_7c2275bb","line":56,"in_reply_to":"fa1b9901_d5b71638","updated":"2015-08-26 16:14:41.000000000","message":"Right, the list is specific to the view.  For example, the v3 view builder below that extends this class could overwrite this list if it needs to add to it for it\u0027s own show implementation.","commit_id":"2e68b2298e94a15d1282c0fb46804b9efa6c8b3a"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"9297f7c41611c12e1550e66d129467d9fab9ddae","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        if expected_attrs is None:"},{"line_number":103,"context_line":"            expected_attrs \u003d []"},{"line_number":104,"context_line":"        # NOTE(mriedem): We sort the list so we can have predictable test"},{"line_number":105,"context_line":"        # results."},{"line_number":106,"context_line":"        return sorted(list(set(self._show_expected_attrs + expected_attrs)))"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def show(self, request, instance):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_c07f55dd","line":105,"updated":"2015-08-26 14:37:25.000000000","message":"do you want to handle things being in here twice? In _get_server() you send in \u0027flavor\u0027 as an expected_attr, so that will cause it to be in the list twice.","commit_id":"2e68b2298e94a15d1282c0fb46804b9efa6c8b3a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"77620c2b2395ec814016bedc076c132f29885be7","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        if expected_attrs is None:"},{"line_number":103,"context_line":"            expected_attrs \u003d []"},{"line_number":104,"context_line":"        # NOTE(mriedem): We sort the list so we can have predictable test"},{"line_number":105,"context_line":"        # results."},{"line_number":106,"context_line":"        return sorted(list(set(self._show_expected_attrs + expected_attrs)))"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def show(self, request, instance):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_52331c62","line":105,"in_reply_to":"fa1b9901_c07f55dd","updated":"2015-08-26 14:45:24.000000000","message":"The view builder method merges the lists and filters duplicates using a set.  The point of the separate method in the view builder is to decouple what the API says it needs from the database and what the view builder says it needs - I don\u0027t want either module knowing the internals of the other since that would make this all tightly coupled and prone to regression.","commit_id":"2e68b2298e94a15d1282c0fb46804b9efa6c8b3a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c95633927faa3f29e4421881ae1076d292d89882","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        if expected_attrs is None:"},{"line_number":103,"context_line":"            expected_attrs \u003d []"},{"line_number":104,"context_line":"        # NOTE(mriedem): We sort the list so we can have predictable test"},{"line_number":105,"context_line":"        # results."},{"line_number":106,"context_line":"        return sorted(list(set(self._show_expected_attrs + expected_attrs)))"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def show(self, request, instance):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_12d4c4e9","line":105,"in_reply_to":"fa1b9901_c07f55dd","updated":"2015-08-26 14:51:56.000000000","message":"looks like the set operation does just that.","commit_id":"2e68b2298e94a15d1282c0fb46804b9efa6c8b3a"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"9297f7c41611c12e1550e66d129467d9fab9ddae","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            expected_attrs \u003d []"},{"line_number":104,"context_line":"        # NOTE(mriedem): We sort the list so we can have predictable test"},{"line_number":105,"context_line":"        # results."},{"line_number":106,"context_line":"        return sorted(list(set(self._show_expected_attrs + expected_attrs)))"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def show(self, request, instance):"},{"line_number":109,"context_line":"        \"\"\"Detailed view of a single instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_85d2cffe","line":106,"updated":"2015-08-26 14:37:25.000000000","message":"why do we need to turn the list into a set, and then back into a list? you can get a predictable order if you just merge the 2 lists together.","commit_id":"2e68b2298e94a15d1282c0fb46804b9efa6c8b3a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"77620c2b2395ec814016bedc076c132f29885be7","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            expected_attrs \u003d []"},{"line_number":104,"context_line":"        # NOTE(mriedem): We sort the list so we can have predictable test"},{"line_number":105,"context_line":"        # results."},{"line_number":106,"context_line":"        return sorted(list(set(self._show_expected_attrs + expected_attrs)))"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def show(self, request, instance):"},{"line_number":109,"context_line":"        \"\"\"Detailed view of a single instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_5281dcc1","line":106,"in_reply_to":"fa1b9901_85d2cffe","updated":"2015-08-26 14:45:24.000000000","message":"The set filters out duplicates.","commit_id":"2e68b2298e94a15d1282c0fb46804b9efa6c8b3a"}],"nova/tests/unit/api/openstack/compute/test_server_actions.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"bc97f04c89b818c2ae80488323fe5df1507b0b8b","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            self.context, objects.Instance(), instance)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        self.compute_api.get(self.context, uuid,"},{"line_number":132,"context_line":"                             expected_attrs\u003d[\u0027flavor\u0027, \u0027pci_devices\u0027],"},{"line_number":133,"context_line":"                             want_objects\u003dTrue).AndReturn(instance)"},{"line_number":134,"context_line":"        return instance"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_a5608936","line":132,"updated":"2015-08-25 05:07:17.000000000","message":"feel like an unrelated change","commit_id":"2ec3bc30da8902f2d9d26fbcabecadc9397d89eb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b66f3557246816bf1606f01800ea97589a02902","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            self.context, objects.Instance(), instance)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        self.compute_api.get(self.context, uuid,"},{"line_number":132,"context_line":"                             expected_attrs\u003d[\u0027flavor\u0027, \u0027pci_devices\u0027],"},{"line_number":133,"context_line":"                             want_objects\u003dTrue).AndReturn(instance)"},{"line_number":134,"context_line":"        return instance"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_b6465dbe","line":132,"in_reply_to":"fa1b9901_a5608936","updated":"2015-08-25 18:11:35.000000000","message":"No this is needed otherwise the test fails.  That\u0027s due to the sorted list coming out of the view builder\u0027s helper method now.","commit_id":"2ec3bc30da8902f2d9d26fbcabecadc9397d89eb"}],"nova/tests/unit/api/openstack/compute/test_serversV21.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"60cfa89cd2002f9b7f65381a74893fc211c1cccc","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        self.assertEqual(res_dict[\u0027server\u0027][\u0027id\u0027], FAKE_UUID)"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def test_get_server_joins_pci_devices(self):"},{"line_number":317,"context_line":"        self.expected_attrs \u003d None"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        def fake_get(_self, *args, **kwargs):"},{"line_number":320,"context_line":"            expected_attrs \u003d kwargs[\u0027expected_attrs\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_d86822bd","line":317,"updated":"2015-08-24 15:56:45.000000000","message":"this is useless now ?","commit_id":"17739dd7999c8ca2609d0bcc485feb92790525e8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1181e63aa565399dfc1d2ab3d1e58bba64cb2aa1","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        self.assertEqual(res_dict[\u0027server\u0027][\u0027id\u0027], FAKE_UUID)"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def test_get_server_joins_pci_devices(self):"},{"line_number":317,"context_line":"        self.expected_attrs \u003d None"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        def fake_get(_self, *args, **kwargs):"},{"line_number":320,"context_line":"            expected_attrs \u003d kwargs[\u0027expected_attrs\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_b3446fb7","line":317,"in_reply_to":"fa1b9901_d86822bd","updated":"2015-08-24 16:13:14.000000000","message":"Yeah, I\u0027ll remove it.","commit_id":"17739dd7999c8ca2609d0bcc485feb92790525e8"}]}
