)]}'
{"nova/api/openstack/compute/consoles.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8a2dfea9086f9de972b24f5cf895509fde1d1b17","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    @wsgi.serializers(xml\u003dConsolesTemplate)"},{"line_number":88,"context_line":"    def index(self, req, server_id):"},{"line_number":89,"context_line":"        \"\"\"Returns a list of consoles for this instance.\"\"\""},{"line_number":90,"context_line":"        try:"},{"line_number":91,"context_line":"            consoles \u003d self.console_api.get_consoles("},{"line_number":92,"context_line":"                                    req.environ[\u0027nova.context\u0027],"},{"line_number":93,"context_line":"                                    server_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_2e545a53","line":90,"updated":"2014-11-11 12:17:56.000000000","message":"any reason not to use get_instance here?","commit_id":"fdb0e44d70ab700dac49f7f08b4d28c75d29ebd4"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"a267e09329e15a144cb3de07bea7f6313a29b195","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    @wsgi.serializers(xml\u003dConsolesTemplate)"},{"line_number":88,"context_line":"    def index(self, req, server_id):"},{"line_number":89,"context_line":"        \"\"\"Returns a list of consoles for this instance.\"\"\""},{"line_number":90,"context_line":"        try:"},{"line_number":91,"context_line":"            consoles \u003d self.console_api.get_consoles("},{"line_number":92,"context_line":"                                    req.environ[\u0027nova.context\u0027],"},{"line_number":93,"context_line":"                                    server_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_0bc5b93b","line":90,"in_reply_to":"5a890539_2e545a53","updated":"2014-11-12 05:04:11.000000000","message":"Thanks garyk for review. but here we request get_consoles on console api.\n\nI searched and found get_consoles() will end up with empty dict instead of raising any exception.","commit_id":"fdb0e44d70ab700dac49f7f08b4d28c75d29ebd4"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"746237aa0cd4c3a397a627e602d3a38fad33088b","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                                req.environ[\u0027nova.context\u0027],"},{"line_number":101,"context_line":"                                server_id)"},{"line_number":102,"context_line":"        except exception.InstanceNotFound as e:"},{"line_number":103,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @wsgi.serializers(xml\u003dConsoleTemplate)"},{"line_number":106,"context_line":"    def show(self, req, server_id, id):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_7278cd2b","line":103,"updated":"2014-11-13 07:51:23.000000000","message":"Yeah, this change seems nice because current api returns meaningless message like the following:\n\n\n $ curl -i \u0027http://192.168.11.62:8774/v2/acf9b89b1285439cb511950b24278c6b/servers/non-existent/consoles\u0027 -X POST -H \"Accept: applicatio\nn/json\" -H \"Content-Type: application/json\" -H \"User-Agent: python-novaclient\" -H \"X-Auth-Project-Id: demo\" -H \"X-Auth-Token: 5ff468acbd3d43b9bba2c1d672b36022\" -d \u0027{}\u0027\n HTTP/1.1 404 Not Found\n Content-Length: 78\n Content-Type: application/json; charset\u003dUTF-8\n X-Compute-Request-Id: req-c491ad1b-3694-49b8-89d0-998185ddc24b\n Date: Thu, 13 Nov 2014 07:44:35 GMT\n\n {\"itemNotFound\": {\"message\": \"The resource could not be found.\", \"code\": 404}}\n $","commit_id":"33b2d7f314bfc54a704564a6adc110a981cfd381"}],"nova/tests/unit/api/openstack/compute/test_consoles.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"746237aa0cd4c3a397a627e602d3a38fad33088b","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.url)"},{"line_number":145,"context_line":"        self.controller.create(req, self.uuid, None)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def test_create_console_unknown_instance(self):"},{"line_number":148,"context_line":"        def fake_create_console(cons_self, context, instance_id):"},{"line_number":149,"context_line":"            raise exception.InstanceNotFound(instance_id\u003dinstance_id)"},{"line_number":150,"context_line":"        self.stubs.Set(console.api.API, \u0027create_console\u0027, fake_create_console)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_92c5393e","line":147,"updated":"2014-11-13 07:51:23.000000000","message":"Ideally, it is better to use mock. However current code also seems fine for me because all other tests are using stubs in this test file.","commit_id":"33b2d7f314bfc54a704564a6adc110a981cfd381"}]}
