)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"53e5e1065bc3aff42d0a43d5a7bf17465dfda582","unresolved":false,"context_lines":[{"line_number":16,"context_line":"DocImpact"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I58c328391a80ee8b81f66b2e09a1bfa4b26e584c"},{"line_number":19,"context_line":"Imlements: blueprint hyperv-serial-ports"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"1a930d6b_702bafeb","line":19,"updated":"2015-01-21 15:43:33.000000000","message":"Nit: Implements","commit_id":"d0165550b4a388f083640e83c21f80ba3309d354"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"fb628b9eaa62a4392193af95463a500366e6ec79","unresolved":false,"context_lines":[{"line_number":16,"context_line":"DocImpact"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I58c328391a80ee8b81f66b2e09a1bfa4b26e584c"},{"line_number":19,"context_line":"Imlements: blueprint hyperv-serial-ports"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"1a930d6b_be314aee","line":19,"in_reply_to":"1a930d6b_702bafeb","updated":"2015-01-22 10:01:18.000000000","message":"Done","commit_id":"d0165550b4a388f083640e83c21f80ba3309d354"}],"nova/tests/unit/virt/hyperv/test_ioutils.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"037a9c122dd52dad8e7d69b22159fa543b39cb2d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from nova.virt.hyperv import vmutils"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class IOUtilsTestCase(test_base.HyperVBaseTestCase):"},{"line_number":25,"context_line":"    def setUp(self):"},{"line_number":26,"context_line":"        super(IOUtilsTestCase, self).setUp()"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_5eb624dd","line":24,"updated":"2015-01-07 13:45:35.000000000","message":"Also, IOQueue would need some unit tests.","commit_id":"bd6dd3f6892ea72bc9cabf5fb13c17552c5f8d5f"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"34985f69950eed6db42066b64eb210bd1e3a3a94","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from nova.virt.hyperv import vmutils"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class IOUtilsTestCase(test_base.HyperVBaseTestCase):"},{"line_number":25,"context_line":"    def setUp(self):"},{"line_number":26,"context_line":"        super(IOUtilsTestCase, self).setUp()"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_be3c68e2","line":24,"in_reply_to":"3a961159_5eb624dd","updated":"2015-01-07 14:01:20.000000000","message":"Done","commit_id":"bd6dd3f6892ea72bc9cabf5fb13c17552c5f8d5f"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"037a9c122dd52dad8e7d69b22159fa543b39cb2d","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def test_run_and_check_output(self):"},{"line_number":37,"context_line":"        fake_error_code \u003d 1"},{"line_number":38,"context_line":"        mock_func \u003d mock.Mock(return_value\u003dfake_error_code)"},{"line_number":39,"context_line":"        with mock.patch.object(self._ioutils, \u0027handle_last_error\u0027):"},{"line_number":40,"context_line":"            ret_val \u003d self._ioutils._run_and_check_output("},{"line_number":41,"context_line":"                mock_func, error_codes\u003d[fake_error_code])"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_03236705","line":39,"updated":"2015-01-07 13:45:35.000000000","message":"instead of having this as a context, can you put it as a mock.patch.object decorator?","commit_id":"bd6dd3f6892ea72bc9cabf5fb13c17552c5f8d5f"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"037a9c122dd52dad8e7d69b22159fa543b39cb2d","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def test_get_write_buffer_data(self):"},{"line_number":66,"context_line":"        fake_data \u003d \u0027fake data\u0027"},{"line_number":67,"context_line":"        fake_buffer \u003d (ctypes.c_ubyte * len(fake_data))()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        self._ioutils.write_buffer_data(fake_buffer, fake_data)"},{"line_number":70,"context_line":"        buff_data \u003d self._ioutils.get_buffer_data(fake_buffer, len(fake_data))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_0351a761","line":67,"updated":"2015-01-07 13:45:35.000000000","message":"i assume this isn\u0027t a function, why call it?","commit_id":"bd6dd3f6892ea72bc9cabf5fb13c17552c5f8d5f"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"34985f69950eed6db42066b64eb210bd1e3a3a94","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def test_get_write_buffer_data(self):"},{"line_number":66,"context_line":"        fake_data \u003d \u0027fake data\u0027"},{"line_number":67,"context_line":"        fake_buffer \u003d (ctypes.c_ubyte * len(fake_data))()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        self._ioutils.write_buffer_data(fake_buffer, fake_data)"},{"line_number":70,"context_line":"        buff_data \u003d self._ioutils.get_buffer_data(fake_buffer, len(fake_data))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_1e02dc0b","line":67,"in_reply_to":"3a961159_0351a761","updated":"2015-01-07 14:01:20.000000000","message":"It\u0027s actually a class representing a byte array which has to be instantiated.","commit_id":"bd6dd3f6892ea72bc9cabf5fb13c17552c5f8d5f"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        self._mock_client_connected.isSet.side_effect \u003d [True, True, False]"},{"line_number":106,"context_line":"        self._mock_queue.get.side_effect \u003d ioutils.Queue.Empty"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        data \u003d self._ioqueue.get(timeout\u003dmock.sentinel.timeout,"},{"line_number":109,"context_line":"                                 continue_on_timeout\u003dcontinue_on_timeout)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        expected_calls_number \u003d 2 if continue_on_timeout else 1"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_0b0b1225","line":108,"updated":"2015-01-20 18:01:50.000000000","message":"i don\u0027t know about data, I think a better name would be queue_item.","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        self._mock_client_connected.isSet.side_effect \u003d [True, True, False]"},{"line_number":106,"context_line":"        self._mock_queue.get.side_effect \u003d ioutils.Queue.Empty"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        data \u003d self._ioqueue.get(timeout\u003dmock.sentinel.timeout,"},{"line_number":109,"context_line":"                                 continue_on_timeout\u003dcontinue_on_timeout)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        expected_calls_number \u003d 2 if continue_on_timeout else 1"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_de3ba436","line":108,"in_reply_to":"3a961159_0b0b1225","updated":"2015-01-21 08:49:27.000000000","message":"Done","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self._mock_queue.get.assert_has_calls("},{"line_number":113,"context_line":"            [mock.call(self._ioqueue, timeout\u003dmock.sentinel.timeout)] *"},{"line_number":114,"context_line":"            expected_calls_number)"},{"line_number":115,"context_line":"        self.assertFalse(data)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def test_get_continue_on_timeout(self):"},{"line_number":118,"context_line":"        # Test that the queue blocks as long"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_f03cf1e3","line":115,"updated":"2015-01-20 18:01:50.000000000","message":"I assume you expect data to be None. Then, self.assertIsNone.","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self._mock_queue.get.assert_has_calls("},{"line_number":113,"context_line":"            [mock.call(self._ioqueue, timeout\u003dmock.sentinel.timeout)] *"},{"line_number":114,"context_line":"            expected_calls_number)"},{"line_number":115,"context_line":"        self.assertFalse(data)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def test_get_continue_on_timeout(self):"},{"line_number":118,"context_line":"        # Test that the queue blocks as long"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_def48489","line":115,"in_reply_to":"3a961159_f03cf1e3","updated":"2015-01-21 08:49:27.000000000","message":"Done","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"}],"nova/tests/unit/virt/hyperv/test_namedpipe.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"037a9c122dd52dad8e7d69b22159fa543b39cb2d","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            thread \u003d namedpipe.threading.Thread"},{"line_number":59,"context_line":"            for job in [self._handler._read_from_pipe,"},{"line_number":60,"context_line":"                        self._handler._write_to_pipe]:"},{"line_number":61,"context_line":"                thread.assert_any_call(target\u003djob)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _mock_setup_pipe_handler(self):"},{"line_number":64,"context_line":"        self._handler._log_file_handle \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_63bc2b6d","line":61,"updated":"2015-01-07 13:45:35.000000000","message":"hm, wouldn\u0027t thread.assert_has_calls(expected_calls) be better?\n\ncalls \u003d [mock.call(target\u003dself._handler._read_from_pipe, ...]","commit_id":"bd6dd3f6892ea72bc9cabf5fb13c17552c5f8d5f"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"34985f69950eed6db42066b64eb210bd1e3a3a94","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            thread \u003d namedpipe.threading.Thread"},{"line_number":59,"context_line":"            for job in [self._handler._read_from_pipe,"},{"line_number":60,"context_line":"                        self._handler._write_to_pipe]:"},{"line_number":61,"context_line":"                thread.assert_any_call(target\u003djob)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _mock_setup_pipe_handler(self):"},{"line_number":64,"context_line":"        self._handler._log_file_handle \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_f42a907c","line":61,"in_reply_to":"3a961159_63bc2b6d","updated":"2015-01-07 14:01:20.000000000","message":"Done","commit_id":"bd6dd3f6892ea72bc9cabf5fb13c17552c5f8d5f"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_6b5e5615","line":1,"updated":"2015-01-20 18:01:50.000000000","message":"2015? :)","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_be25f80b","line":1,"in_reply_to":"3a961159_6b5e5615","updated":"2015-01-21 08:49:27.000000000","message":"Done","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"}],"nova/tests/unit/virt/hyperv/test_pathutils.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"037a9c122dd52dad8e7d69b22159fa543b39cb2d","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @mock.patch(\u0027nova.openstack.common.fileutils.delete_if_exists\u0027)"},{"line_number":121,"context_line":"    def test_delete_console_logs(self, mock_delete):"},{"line_number":122,"context_line":"        self._pathutils.get_vm_console_log_paths \u003d mock.Mock("},{"line_number":123,"context_line":"            return_value\u003d[mock.sentinel.log_path,"},{"line_number":124,"context_line":"                          mock.sentinel.archived_log_path])"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_c3131f63","line":122,"updated":"2015-01-07 13:45:35.000000000","message":"this should be patched as a mock.patch.object decorator.","commit_id":"bd6dd3f6892ea72bc9cabf5fb13c17552c5f8d5f"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"34985f69950eed6db42066b64eb210bd1e3a3a94","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @mock.patch(\u0027nova.openstack.common.fileutils.delete_if_exists\u0027)"},{"line_number":121,"context_line":"    def test_delete_console_logs(self, mock_delete):"},{"line_number":122,"context_line":"        self._pathutils.get_vm_console_log_paths \u003d mock.Mock("},{"line_number":123,"context_line":"            return_value\u003d[mock.sentinel.log_path,"},{"line_number":124,"context_line":"                          mock.sentinel.archived_log_path])"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_94486c5d","line":122,"in_reply_to":"3a961159_c3131f63","updated":"2015-01-07 14:01:20.000000000","message":"It\u0027s the same thing in this case as self._pathutils is assigned in setUp for each test.","commit_id":"bd6dd3f6892ea72bc9cabf5fb13c17552c5f8d5f"}],"nova/tests/unit/virt/hyperv/test_serialconsolehandler.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_cb066acd","line":1,"updated":"2015-01-20 18:01:50.000000000","message":"2015? :)","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_39884222","line":1,"in_reply_to":"3a961159_cb066acd","updated":"2015-01-21 08:49:27.000000000","message":"Done","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    def setUp(self):"},{"line_number":31,"context_line":"        super(SerialConsoleHandlerTestCase, self).setUp()"},{"line_number":32,"context_line":"        self._consolehandler \u003d serialconsolehandler.SerialConsoleHandler("},{"line_number":33,"context_line":"            self._FAKE_INSTANCE_NAME)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    @mock.patch.object(serialconsolehandler.SerialConsoleHandler,"},{"line_number":36,"context_line":"                       \u0027_setup_handlers\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_6bff36ac","line":33,"updated":"2015-01-20 18:01:50.000000000","message":"is self._FAKE_INSTANCE_NAME really necessary? Or you can just use mock.sentinel.fake_instance_name?","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    def setUp(self):"},{"line_number":31,"context_line":"        super(SerialConsoleHandlerTestCase, self).setUp()"},{"line_number":32,"context_line":"        self._consolehandler \u003d serialconsolehandler.SerialConsoleHandler("},{"line_number":33,"context_line":"            self._FAKE_INSTANCE_NAME)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    @mock.patch.object(serialconsolehandler.SerialConsoleHandler,"},{"line_number":36,"context_line":"                       \u0027_setup_handlers\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_9e403c58","line":33,"in_reply_to":"3a961159_6bff36ac","updated":"2015-01-21 08:49:27.000000000","message":"Done","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"}],"nova/tests/unit/virt/hyperv/test_serialconsoleops.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_eba7a6ba","line":1,"updated":"2015-01-20 18:01:50.000000000","message":"2015? :)","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_392be2ec","line":1,"in_reply_to":"3a961159_eba7a6ba","updated":"2015-01-21 08:49:27.000000000","message":"Done","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            mock.sentinel.instance_name)"},{"line_number":46,"context_line":"        self.assertEqual("},{"line_number":47,"context_line":"            handler,"},{"line_number":48,"context_line":"            mock_console_handler.return_value)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def test_stop_console_handler(self):"},{"line_number":51,"context_line":"        mock_console_handler \u003d self._setup_console_handler_mock()"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_cb902a45","line":48,"updated":"2015-01-20 18:01:50.000000000","message":"Well, this could be alligned better like this:\n\n    self.assertEqual(mock_console_handler.return_value,\n                     handler)\n\nAlso, expected value first.","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            mock.sentinel.instance_name)"},{"line_number":46,"context_line":"        self.assertEqual("},{"line_number":47,"context_line":"            handler,"},{"line_number":48,"context_line":"            mock_console_handler.return_value)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def test_stop_console_handler(self):"},{"line_number":51,"context_line":"        mock_console_handler \u003d self._setup_console_handler_mock()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_f9f15a96","line":48,"in_reply_to":"3a961159_cb902a45","updated":"2015-01-21 08:49:27.000000000","message":"Done","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        mock_console_handler.stop.assert_called_once_with()"},{"line_number":56,"context_line":"        handler \u003d serialconsoleops._console_handlers.get("},{"line_number":57,"context_line":"                mock.sentinel.instance_name)"},{"line_number":58,"context_line":"        self.assertFalse(handler)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def test_get_serial_console(self):"},{"line_number":61,"context_line":"        mock_console_handler \u003d self._setup_console_handler_mock()"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_4bc35a39","line":58,"updated":"2015-01-20 18:01:50.000000000","message":"I\u0027m expecting handler to be an object. So, self.assertIsNone instead? :)","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        mock_console_handler.stop.assert_called_once_with()"},{"line_number":56,"context_line":"        handler \u003d serialconsoleops._console_handlers.get("},{"line_number":57,"context_line":"                mock.sentinel.instance_name)"},{"line_number":58,"context_line":"        self.assertFalse(handler)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def test_get_serial_console(self):"},{"line_number":61,"context_line":"        mock_console_handler \u003d self._setup_console_handler_mock()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_19ef06b2","line":58,"in_reply_to":"3a961159_4bc35a39","updated":"2015-01-21 08:49:27.000000000","message":"Done","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"}],"nova/tests/unit/virt/hyperv/test_serialproxy.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_2bf44e87","line":1,"updated":"2015-01-20 18:01:50.000000000","message":"2015? :)","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_d9081e30","line":1,"in_reply_to":"3a961159_2bf44e87","updated":"2015-01-21 08:49:27.000000000","message":"Done","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        self._proxy._client_connected.set.assert_called_once_with()"},{"line_number":65,"context_line":"        mock_conn.close.assert_called_once_with()"},{"line_number":66,"context_line":"        self.assertFalse(self._proxy._conn)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        thread \u003d serialproxy.threading.Thread"},{"line_number":69,"context_line":"        for job in [self._proxy._get_data,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_eb088682","line":66,"updated":"2015-01-20 18:01:50.000000000","message":"I\u0027m expecting self._proxy._conn to be an Object. So, self.assertIsNone instead?","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        self._proxy._client_connected.set.assert_called_once_with()"},{"line_number":65,"context_line":"        mock_conn.close.assert_called_once_with()"},{"line_number":66,"context_line":"        self.assertFalse(self._proxy._conn)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        thread \u003d serialproxy.threading.Thread"},{"line_number":69,"context_line":"        for job in [self._proxy._get_data,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_79356a45","line":66,"in_reply_to":"3a961159_eb088682","updated":"2015-01-21 08:49:27.000000000","message":"Done","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"59ab130e0a4579c0cd8dc00db8f61a5cb921d11a","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import mock"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import socket"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from nova.tests.unit.virt.hyperv import test_base"}],"source_content_type":"text/x-python","patch_set":20,"id":"1aca2d91_8a31320e","line":17,"updated":"2015-05-06 22:03:05.000000000","message":"this new line should\u0027t be here? Pep8 says it\u0027s fine... so.. No need to change it.","commit_id":"93ddb2e257ad6e4e7d56c9a90b9727514c73410f"}],"nova/virt/hyperv/ioutils.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"037a9c122dd52dad8e7d69b22159fa543b39cb2d","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        kernel32.LocalFree(message_buffer)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        err \u003d (_LE(\"IO operation failed. Error code: %(error_code)s. \""},{"line_number":114,"context_line":"                  \"Error message: %(error_message)s\"),"},{"line_number":115,"context_line":"               {\u0027error_code\u0027: error_code,"},{"line_number":116,"context_line":"                \u0027error_message\u0027: error_message})"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_be42a80c","line":114,"updated":"2015-01-07 13:45:35.000000000","message":"one more space before \", to align the strings.","commit_id":"bd6dd3f6892ea72bc9cabf5fb13c17552c5f8d5f"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"34985f69950eed6db42066b64eb210bd1e3a3a94","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        kernel32.LocalFree(message_buffer)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        err \u003d (_LE(\"IO operation failed. Error code: %(error_code)s. \""},{"line_number":114,"context_line":"                  \"Error message: %(error_message)s\"),"},{"line_number":115,"context_line":"               {\u0027error_code\u0027: error_code,"},{"line_number":116,"context_line":"                \u0027error_message\u0027: error_message})"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_146c7ccf","line":114,"in_reply_to":"3a961159_be42a80c","updated":"2015-01-07 14:01:20.000000000","message":"Done","commit_id":"bd6dd3f6892ea72bc9cabf5fb13c17552c5f8d5f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bee0e867cd41c4b27760f0ce1d0009ec08e855ea","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        error_message \u003d message_buffer.value"},{"line_number":118,"context_line":"        kernel32.LocalFree(message_buffer)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        err \u003d (_LE(\"IO operation failed while executing \""},{"line_number":121,"context_line":"                   \"function %(func_name)s. \""},{"line_number":122,"context_line":"                   \"Error code: %(error_code)s. \""},{"line_number":123,"context_line":"                   \"Error message: %(error_message)s\") %"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_b6eedab3","line":120,"updated":"2015-01-20 16:17:30.000000000","message":"if we raise an exception then the message should not have log hints.\nthis should be _(\"IO opertaion ... )","commit_id":"6dcc29174d905f4c85b086c3ad5a1820f2b8edbb"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"6dcb63cc02d13ae1f594e6bcf1f365d27179fea7","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        error_message \u003d message_buffer.value"},{"line_number":118,"context_line":"        kernel32.LocalFree(message_buffer)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        err \u003d (_LE(\"IO operation failed while executing \""},{"line_number":121,"context_line":"                   \"function %(func_name)s. \""},{"line_number":122,"context_line":"                   \"Error code: %(error_code)s. \""},{"line_number":123,"context_line":"                   \"Error message: %(error_message)s\") %"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_9c33bff6","line":120,"in_reply_to":"3a961159_b6eedab3","updated":"2015-01-20 16:53:07.000000000","message":"Done","commit_id":"6dcc29174d905f4c85b086c3ad5a1820f2b8edbb"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"53e5e1065bc3aff42d0a43d5a7bf17465dfda582","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        error_message \u003d message_buffer.value"},{"line_number":118,"context_line":"        kernel32.LocalFree(message_buffer)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        err \u003d (_(\"IO operation failed while executing \""},{"line_number":121,"context_line":"                 \"function %(func_name)s. \""},{"line_number":122,"context_line":"                 \"Error code: %(error_code)s. \""},{"line_number":123,"context_line":"                 \"Error message: %(error_message)s\") %"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_4b31a6eb","line":120,"updated":"2015-01-21 15:43:33.000000000","message":"Why _ instead of the previous _LE? If it is because this error message is used in the exception message, you can just have instead:\n\n    err \u003d (\"IO operation failed while executing...\" # without _\n    LOG.error(_LE(err))\n    raise vmutils.HyperVException(_(err))","commit_id":"d0165550b4a388f083640e83c21f80ba3309d354"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"fb628b9eaa62a4392193af95463a500366e6ec79","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        error_message \u003d message_buffer.value"},{"line_number":118,"context_line":"        kernel32.LocalFree(message_buffer)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        err \u003d (_(\"IO operation failed while executing \""},{"line_number":121,"context_line":"                 \"function %(func_name)s. \""},{"line_number":122,"context_line":"                 \"Error code: %(error_code)s. \""},{"line_number":123,"context_line":"                 \"Error message: %(error_message)s\") %"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_9ebe4efe","line":120,"in_reply_to":"1a930d6b_4b31a6eb","updated":"2015-01-22 10:01:18.000000000","message":"Please see the guidelines: http://docs.openstack.org/developer/oslo.i18n/guidelines.html\n\n # RIGHT\n msg \u003d _(\u0027There was an error.\u0027)\n LOG.exception(msg)\n raise LocalExceptionClass(msg)","commit_id":"d0165550b4a388f083640e83c21f80ba3309d354"}],"nova/virt/hyperv/namedpipe.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_693654ea","line":1,"updated":"2015-01-20 18:01:50.000000000","message":"2015. :)","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_b96c3238","line":1,"in_reply_to":"3a961159_693654ea","updated":"2015-01-21 08:49:27.000000000","message":"Sure. Well, we were still in 2014 when I wrote this :).","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"WAIT_PIPE_TIMEOUT \u003d 5  # seconds"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_29a8cc8b","line":30,"updated":"2015-01-20 18:01:50.000000000","message":"no need for 2 blank lines here.","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"WAIT_PIPE_TIMEOUT \u003d 5  # seconds"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_d969fe26","line":30,"in_reply_to":"3a961159_29a8cc8b","updated":"2015-01-21 08:49:27.000000000","message":"Done","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"0b247eef97c6847cd5ce3709d70a6ade43f6c3f1","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"            self._close_pipe()"},{"line_number":84,"context_line":"            if self._log_file_handle:"},{"line_number":85,"context_line":"                self._log_file_handle.close()"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _setup_io_structures(self):"},{"line_number":88,"context_line":"        self._r_buffer \u003d self._ioutils.get_buffer("}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_c932b40f","line":85,"updated":"2015-01-23 10:55:44.000000000","message":"i think that stop might generate an exception too, right?","commit_id":"16e7b91cf60316dbb8a9a61acbd191a8083c8c8d"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"61be6754494dfcc50a90c44175b298d8ca5b3862","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"            self._close_pipe()"},{"line_number":84,"context_line":"            if self._log_file_handle:"},{"line_number":85,"context_line":"                self._log_file_handle.close()"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _setup_io_structures(self):"},{"line_number":88,"context_line":"        self._r_buffer \u003d self._ioutils.get_buffer("}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_a793bf4d","line":85,"in_reply_to":"1a930d6b_c932b40f","updated":"2015-01-23 18:56:31.000000000","message":"No, not the case here.","commit_id":"16e7b91cf60316dbb8a9a61acbd191a8083c8c8d"}],"nova/virt/hyperv/pathutils.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"949c47539932651a4b6e51ef6907aa12c209e308","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                                           remove_dir\u003dTrue)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def get_vm_console_log_paths(self, instance_name, remote_server\u003dNone):"},{"line_number":145,"context_line":"        instance_dir \u003d self.get_instance_dir(instance_name,"},{"line_number":146,"context_line":"                                             remote_server)"},{"line_number":147,"context_line":"        console_log_path \u003d os.path.join(instance_dir, \u0027console.log\u0027)"},{"line_number":148,"context_line":"        return console_log_path, console_log_path + \u0027.1\u0027"}],"source_content_type":"text/x-python","patch_set":46,"id":"fa69d971_6b2c8702","line":145,"updated":"2016-01-04 17:44:38.000000000","message":"change makes sense, but it\u0027s unrelated to the patch.","commit_id":"1a2869b89eb830ba9956744ee4917a9bb5268ed1"}],"nova/virt/hyperv/serialconsolehandler.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_89054017","line":1,"updated":"2015-01-20 18:01:50.000000000","message":"2015. :)","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_59650e44","line":1,"in_reply_to":"3a961159_89054017","updated":"2015-01-21 08:49:27.000000000","message":"Done","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                        \"for instance %s\") % self._instance_name"},{"line_number":77,"context_line":"            raise vmutils.HyperVException(err_msg)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        if CONF.serial_console.enabled:"},{"line_number":80,"context_line":"            self._listen_host \u003d ("},{"line_number":81,"context_line":"                CONF.serial_console.proxyclient_address)"},{"line_number":82,"context_line":"            self._listen_port \u003d serial_console.acquire_port("}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_ac8cca81","line":79,"updated":"2015-01-20 18:01:50.000000000","message":"So, question... if CONF.serial_console.enabled is False, shouldn\u0027t it be disabled? Not logging at all?","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                        \"for instance %s\") % self._instance_name"},{"line_number":77,"context_line":"            raise vmutils.HyperVException(err_msg)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        if CONF.serial_console.enabled:"},{"line_number":80,"context_line":"            self._listen_host \u003d ("},{"line_number":81,"context_line":"                CONF.serial_console.proxyclient_address)"},{"line_number":82,"context_line":"            self._listen_port \u003d serial_console.acquire_port("}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_599a6e15","line":79,"in_reply_to":"3a961159_ac8cca81","updated":"2015-01-21 08:49:27.000000000","message":"Not really, we should still be able to get the VM console log. The only difference is that the serial proxy will be disabled in that case.\n\nOn Libvirt for example, you can get the VM console log only when serial console is disabled.","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"}],"nova/virt/hyperv/serialconsoleops.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_4cf526ec","line":1,"updated":"2015-01-20 18:01:50.000000000","message":"2015. :)","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_1990e6eb","line":1,"in_reply_to":"3a961159_4cf526ec","updated":"2015-01-21 08:49:27.000000000","message":"Done","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":31,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def instance_synchronized(func):"},{"line_number":35,"context_line":"    @functools.wraps(func)"},{"line_number":36,"context_line":"    def wrapper(self, instance_name, *args, **kwargs):"},{"line_number":37,"context_line":"        @utils.synchronized(instance_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_cca676ab","line":34,"updated":"2015-01-20 18:01:50.000000000","message":"question, is this necessary? Won\u0027t it just work with a simple @utils.synchronised instead?","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":31,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def instance_synchronized(func):"},{"line_number":35,"context_line":"    @functools.wraps(func)"},{"line_number":36,"context_line":"    def wrapper(self, instance_name, *args, **kwargs):"},{"line_number":37,"context_line":"        @utils.synchronized(instance_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_9949368e","line":34,"in_reply_to":"3a961159_cca676ab","updated":"2015-01-21 08:49:27.000000000","message":"This is better than simply putting @utils.synchronized decorators. It will block only operations on the same instance.\n\nFor example, there is no need for the get_console_output for instance A to wait for the instance B\u0027s handler to set up.","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    return wrapper"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"_console_handlers \u003d {}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class SerialConsoleOps(object):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_6cc6624c","line":44,"updated":"2015-01-20 18:01:50.000000000","message":"you should move this before the decorator above.","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    return wrapper"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"_console_handlers \u003d {}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class SerialConsoleOps(object):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_b95d124b","line":44,"in_reply_to":"3a961159_6cc6624c","updated":"2015-01-21 08:49:27.000000000","message":"Done","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"53e5e1065bc3aff42d0a43d5a7bf17465dfda582","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                _console_handlers[instance_name] \u003d handler"},{"line_number":58,"context_line":"                handler.start()"},{"line_number":59,"context_line":"            except vmutils.HyperVException as exc:"},{"line_number":60,"context_line":"                LOG.warning(exc)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    @instance_synchronized"},{"line_number":63,"context_line":"    def stop_console_handler(self, instance_name):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_4bbb660e","line":60,"updated":"2015-01-21 15:43:33.000000000","message":"not sure about this, but use _LW(exc)? It might not be feasible, since the exception message already has a _. Plus, it will include the stack trace...\n\nAnyways, I\u0027m unsure of the log error level. Basically, this exception will mean that the console handler did not start, so it won\u0027t be able to work properly or at all. That would an error.\n\nA warning is something that maay be a possible problem, but it\u0027s still working.\n\nhttps://docs.python.org/2/howto/logging.html\n\nAlso, I assume there won\u0027t be any other exceptions from SerialProxy or NamedPipe, where you have: open(self._log_file_path, \u0027ab\u0027, 1)? That seems to be like it can raise an exception.","commit_id":"d0165550b4a388f083640e83c21f80ba3309d354"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"fb628b9eaa62a4392193af95463a500366e6ec79","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                _console_handlers[instance_name] \u003d handler"},{"line_number":58,"context_line":"                handler.start()"},{"line_number":59,"context_line":"            except vmutils.HyperVException as exc:"},{"line_number":60,"context_line":"                LOG.warning(exc)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    @instance_synchronized"},{"line_number":63,"context_line":"    def stop_console_handler(self, instance_name):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_99e74840","line":60,"in_reply_to":"1a930d6b_4bbb660e","updated":"2015-01-22 10:01:18.000000000","message":"You are right, maybe LOG.error would be more appropriate.\n\nThere would be an exception if the instance does not have a serial port attached. Also, I\u0027ve just fixed the error handling for the SerialProxy and NamedPipeHandler initialization.","commit_id":"d0165550b4a388f083640e83c21f80ba3309d354"}],"nova/virt/hyperv/serialproxy.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f008be9af8b606d3c663814b9cef0a3cc98df97","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_ec27b21c","line":1,"updated":"2015-01-20 18:01:50.000000000","message":"2015. :)","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d1b81974bcf5d995c2436e66135c2939d8bd7397","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Cloudbase Solutions Srl"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_7912ca63","line":1,"in_reply_to":"3a961159_ec27b21c","updated":"2015-01-21 08:49:27.000000000","message":"Done","commit_id":"92b0ee46ba82ad6002f89548bd1fa91630e5ce7c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"0b247eef97c6847cd5ce3709d70a6ade43f6c3f1","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _setup_socket(self):"},{"line_number":66,"context_line":"        try:"},{"line_number":67,"context_line":"            LOG.debug(\u0027Ininitializing serial proxy on %(addr)s:%(port)s, \u0027"},{"line_number":68,"context_line":"                      \u0027handling connections to instance %(instance_name)s.\u0027,"},{"line_number":69,"context_line":"                      {\u0027addr\u0027: self._addr, \u0027port\u0027: self._port,"},{"line_number":70,"context_line":"                       \u0027instance_name\u0027: self._instance_name})"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_8930ac02","line":67,"updated":"2015-01-23 10:55:44.000000000","message":"Initializing *","commit_id":"16e7b91cf60316dbb8a9a61acbd191a8083c8c8d"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"61be6754494dfcc50a90c44175b298d8ca5b3862","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _setup_socket(self):"},{"line_number":66,"context_line":"        try:"},{"line_number":67,"context_line":"            LOG.debug(\u0027Ininitializing serial proxy on %(addr)s:%(port)s, \u0027"},{"line_number":68,"context_line":"                      \u0027handling connections to instance %(instance_name)s.\u0027,"},{"line_number":69,"context_line":"                      {\u0027addr\u0027: self._addr, \u0027port\u0027: self._port,"},{"line_number":70,"context_line":"                       \u0027instance_name\u0027: self._instance_name})"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_a4c58f3d","line":67,"in_reply_to":"1a930d6b_8930ac02","updated":"2015-01-23 18:56:31.000000000","message":"Whops, thanks.","commit_id":"16e7b91cf60316dbb8a9a61acbd191a8083c8c8d"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"0b247eef97c6847cd5ce3709d70a6ade43f6c3f1","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                                  1)"},{"line_number":77,"context_line":"            self._sock.bind((self._addr, self._port))"},{"line_number":78,"context_line":"            self._sock.listen(1)"},{"line_number":79,"context_line":"        except socket.error as err:"},{"line_number":80,"context_line":"            msg \u003d (_(\u0027Failed to ininitialize serial proxy on\u0027"},{"line_number":81,"context_line":"                     \u0027%(addr)s:%(port)s, handling connections \u0027"},{"line_number":82,"context_line":"                     \u0027to instance %(instance_name)s. Error: %(error)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_c419bb7a","line":79,"updated":"2015-01-23 10:55:44.000000000","message":"If the socket is open, close it if it encounters an exception?","commit_id":"16e7b91cf60316dbb8a9a61acbd191a8083c8c8d"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"61be6754494dfcc50a90c44175b298d8ca5b3862","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                                  1)"},{"line_number":77,"context_line":"            self._sock.bind((self._addr, self._port))"},{"line_number":78,"context_line":"            self._sock.listen(1)"},{"line_number":79,"context_line":"        except socket.error as err:"},{"line_number":80,"context_line":"            msg \u003d (_(\u0027Failed to ininitialize serial proxy on\u0027"},{"line_number":81,"context_line":"                     \u0027%(addr)s:%(port)s, handling connections \u0027"},{"line_number":82,"context_line":"                     \u0027to instance %(instance_name)s. Error: %(error)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_443a2b37","line":79,"in_reply_to":"1a930d6b_c419bb7a","updated":"2015-01-23 18:56:31.000000000","message":"Citing from the docs: \"Sockets are automatically closed when they are garbage-collected.\". Anyway, I\u0027ll explicitly close the socket in that case.","commit_id":"16e7b91cf60316dbb8a9a61acbd191a8083c8c8d"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"0b247eef97c6847cd5ce3709d70a6ade43f6c3f1","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            self._sock.bind((self._addr, self._port))"},{"line_number":78,"context_line":"            self._sock.listen(1)"},{"line_number":79,"context_line":"        except socket.error as err:"},{"line_number":80,"context_line":"            msg \u003d (_(\u0027Failed to ininitialize serial proxy on\u0027"},{"line_number":81,"context_line":"                     \u0027%(addr)s:%(port)s, handling connections \u0027"},{"line_number":82,"context_line":"                     \u0027to instance %(instance_name)s. Error: %(error)s\u0027) %"},{"line_number":83,"context_line":"                   {\u0027addr\u0027: self._addr, \u0027port\u0027: self._port,"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_c919d489","line":80,"updated":"2015-01-23 10:55:44.000000000","message":"initialize*\n\nalso, space after the last word, so it will be a separate word from addr.","commit_id":"16e7b91cf60316dbb8a9a61acbd191a8083c8c8d"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"61be6754494dfcc50a90c44175b298d8ca5b3862","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            self._sock.bind((self._addr, self._port))"},{"line_number":78,"context_line":"            self._sock.listen(1)"},{"line_number":79,"context_line":"        except socket.error as err:"},{"line_number":80,"context_line":"            msg \u003d (_(\u0027Failed to ininitialize serial proxy on\u0027"},{"line_number":81,"context_line":"                     \u0027%(addr)s:%(port)s, handling connections \u0027"},{"line_number":82,"context_line":"                     \u0027to instance %(instance_name)s. Error: %(error)s\u0027) %"},{"line_number":83,"context_line":"                   {\u0027addr\u0027: self._addr, \u0027port\u0027: self._port,"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_44030b73","line":80,"in_reply_to":"1a930d6b_c919d489","updated":"2015-01-23 18:56:31.000000000","message":"Done","commit_id":"16e7b91cf60316dbb8a9a61acbd191a8083c8c8d"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"0b247eef97c6847cd5ce3709d70a6ade43f6c3f1","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        if self._conn:"},{"line_number":94,"context_line":"            self._conn.shutdown(socket.SHUT_RDWR)"},{"line_number":95,"context_line":"            self._conn.close()"},{"line_number":96,"context_line":"        self._sock.close()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def run(self):"},{"line_number":99,"context_line":"        self._setup_socket()"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_042bc382","line":96,"updated":"2015-01-23 10:55:44.000000000","message":"can closing / stopping those things generate exceptions?","commit_id":"16e7b91cf60316dbb8a9a61acbd191a8083c8c8d"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"61be6754494dfcc50a90c44175b298d8ca5b3862","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        if self._conn:"},{"line_number":94,"context_line":"            self._conn.shutdown(socket.SHUT_RDWR)"},{"line_number":95,"context_line":"            self._conn.close()"},{"line_number":96,"context_line":"        self._sock.close()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def run(self):"},{"line_number":99,"context_line":"        self._setup_socket()"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_c710cb03","line":96,"in_reply_to":"1a930d6b_042bc382","updated":"2015-01-23 18:56:31.000000000","message":"Nope.","commit_id":"16e7b91cf60316dbb8a9a61acbd191a8083c8c8d"}],"nova/virt/hyperv/vmops.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"037a9c122dd52dad8e7d69b22159fa543b39cb2d","unresolved":false,"context_lines":[{"line_number":502,"context_line":"        try:"},{"line_number":503,"context_line":"            if req_state !\u003d constants.HYPERV_VM_STATE_ENABLED:"},{"line_number":504,"context_line":"                delete_logs \u003d req_state in (constants.HYPERV_VM_STATE_DISABLED,"},{"line_number":505,"context_line":"                                            constants.HYPERV_VM_STATE_REBOOT)"},{"line_number":506,"context_line":"                self._serialconsoleops.stop_console_handler("},{"line_number":507,"context_line":"                  instance_name, delete_logs\u003ddelete_logs)"},{"line_number":508,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_1e9bbc73","line":505,"updated":"2015-01-07 13:45:35.000000000","message":"so, if the vm is stopped or is rebooting, it will delete the logs. What if the VM guest OS has some kind of problem which forces the VM to shutdown / reboot? Wouldn\u0027t the logs be useful?","commit_id":"bd6dd3f6892ea72bc9cabf5fb13c17552c5f8d5f"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"34985f69950eed6db42066b64eb210bd1e3a3a94","unresolved":false,"context_lines":[{"line_number":502,"context_line":"        try:"},{"line_number":503,"context_line":"            if req_state !\u003d constants.HYPERV_VM_STATE_ENABLED:"},{"line_number":504,"context_line":"                delete_logs \u003d req_state in (constants.HYPERV_VM_STATE_DISABLED,"},{"line_number":505,"context_line":"                                            constants.HYPERV_VM_STATE_REBOOT)"},{"line_number":506,"context_line":"                self._serialconsoleops.stop_console_handler("},{"line_number":507,"context_line":"                  instance_name, delete_logs\u003ddelete_logs)"},{"line_number":508,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_f4ed3026","line":505,"in_reply_to":"3a961159_1e9bbc73","updated":"2015-01-07 14:01:20.000000000","message":"That\u0027s only if the vm is stopped/rebooted by nova.","commit_id":"bd6dd3f6892ea72bc9cabf5fb13c17552c5f8d5f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bee0e867cd41c4b27760f0ce1d0009ec08e855ea","unresolved":false,"context_lines":[{"line_number":408,"context_line":"        LOG.debug(\"Rebooting instance\", instance\u003dinstance)"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        self._serialconsoleops.stop_console_handler("},{"line_number":411,"context_line":"            instance[\u0027name\u0027])"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        if reboot_type \u003d\u003d REBOOT_TYPE_SOFT:"},{"line_number":414,"context_line":"            if self._soft_shutdown(instance):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_16c96e25","line":411,"updated":"2015-01-20 16:17:30.000000000","message":"the instance name is something like 000001. Do you want to use that or the display_name or the instance uuid. Maybe you should consider the UUID","commit_id":"6dcc29174d905f4c85b086c3ad5a1820f2b8edbb"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"6dcb63cc02d13ae1f594e6bcf1f365d27179fea7","unresolved":false,"context_lines":[{"line_number":408,"context_line":"        LOG.debug(\"Rebooting instance\", instance\u003dinstance)"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        self._serialconsoleops.stop_console_handler("},{"line_number":411,"context_line":"            instance[\u0027name\u0027])"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        if reboot_type \u003d\u003d REBOOT_TYPE_SOFT:"},{"line_number":414,"context_line":"            if self._soft_shutdown(instance):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_5c84f70a","line":411,"in_reply_to":"3a961159_16c96e25","updated":"2015-01-20 16:53:07.000000000","message":"I thought about using the uuid but most of the utils methods use the instance name in order to identify an instance.\n\nThe display_name surely is not helpfull here because there might be multiple instances with the same display name.","commit_id":"6dcc29174d905f4c85b086c3ad5a1820f2b8edbb"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bee0e867cd41c4b27760f0ce1d0009ec08e855ea","unresolved":false,"context_lines":[{"line_number":482,"context_line":"        \"\"\"Power off the specified instance.\"\"\""},{"line_number":483,"context_line":"        LOG.debug(\"Power off instance\", instance\u003dinstance)"},{"line_number":484,"context_line":"        self._serialconsoleops.stop_console_handler("},{"line_number":485,"context_line":"            instance[\u0027name\u0027])"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"        if retry_interval \u003c\u003d 0:"},{"line_number":488,"context_line":"            retry_interval \u003d SHUTDOWN_TIME_INCREMENT"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_76d712c1","line":485,"updated":"2015-01-20 16:17:30.000000000","message":"ditto","commit_id":"6dcc29174d905f4c85b086c3ad5a1820f2b8edbb"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"59ab130e0a4579c0cd8dc00db8f61a5cb921d11a","unresolved":false,"context_lines":[{"line_number":463,"context_line":"        LOG.debug(\"Rebooting instance\", instance\u003dinstance)"},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"        self._serialconsoleops.stop_console_handler("},{"line_number":466,"context_line":"            instance[\u0027name\u0027])"},{"line_number":467,"context_line":""},{"line_number":468,"context_line":"        if reboot_type \u003d\u003d REBOOT_TYPE_SOFT:"},{"line_number":469,"context_line":"            if self._soft_shutdown(instance):"}],"source_content_type":"text/x-python","patch_set":20,"id":"1aca2d91_6a17f6a3","line":466,"updated":"2015-05-06 22:03:05.000000000","message":"instance.name\n\nalso, you could put this on the same line as self._serialconsoleops.stop_console_handler(","commit_id":"93ddb2e257ad6e4e7d56c9a90b9727514c73410f"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"59ab130e0a4579c0cd8dc00db8f61a5cb921d11a","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        \"\"\"Power off the specified instance.\"\"\""},{"line_number":538,"context_line":"        LOG.debug(\"Power off instance\", instance\u003dinstance)"},{"line_number":539,"context_line":"        self._serialconsoleops.stop_console_handler("},{"line_number":540,"context_line":"            instance[\u0027name\u0027])"},{"line_number":541,"context_line":""},{"line_number":542,"context_line":"        if retry_interval \u003c\u003d 0:"},{"line_number":543,"context_line":"            retry_interval \u003d SHUTDOWN_TIME_INCREMENT"}],"source_content_type":"text/x-python","patch_set":20,"id":"1aca2d91_2a5fbe73","line":540,"updated":"2015-05-06 22:03:05.000000000","message":"ditto.","commit_id":"93ddb2e257ad6e4e7d56c9a90b9727514c73410f"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"f3d6d3b908905563e9e9cd0a7d17f8f28f5d139a","unresolved":false,"context_lines":[{"line_number":267,"context_line":"            root_vhd_path \u003d self._create_root_vhd(context, instance)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        eph_vhd_path \u003d self.create_ephemeral_vhd(instance)"},{"line_number":270,"context_line":"        # TODO(lpetrut): move this to the create_instance method."},{"line_number":271,"context_line":"        vm_gen \u003d self.get_image_vm_generation(root_vhd_path, image_meta)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":31,"id":"3afb71cf_ccaf4ae2","line":270,"range":{"start_line":270,"start_character":24,"end_line":270,"end_character":25},"updated":"2015-06-05 13:53:11.000000000","message":"you mean vm_gen? I originally wanted to have vm_gen in create_instance, but it is also needed by attach_config_drive (L284), so I opted to have vm_gen in spawn.","commit_id":"958807b7e5f029018ea49e8e32f89844b453e746"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"85ada65bd54e89d8abe8c10338257dd997787c4a","unresolved":false,"context_lines":[{"line_number":267,"context_line":"            root_vhd_path \u003d self._create_root_vhd(context, instance)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        eph_vhd_path \u003d self.create_ephemeral_vhd(instance)"},{"line_number":270,"context_line":"        # TODO(lpetrut): move this to the create_instance method."},{"line_number":271,"context_line":"        vm_gen \u003d self.get_image_vm_generation(root_vhd_path, image_meta)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":31,"id":"3afb71cf_68639fb2","line":270,"in_reply_to":"3afb71cf_ccaf4ae2","updated":"2015-06-05 14:40:39.000000000","message":"Good point.","commit_id":"958807b7e5f029018ea49e8e32f89844b453e746"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"f3d6d3b908905563e9e9cd0a7d17f8f28f5d139a","unresolved":false,"context_lines":[{"line_number":634,"context_line":"        for image_prop, port_type in constants.SERIAL_PORT_TYPES.iteritems():"},{"line_number":635,"context_line":"            port_number \u003d int(image_props.get("},{"line_number":636,"context_line":"                image_prop,"},{"line_number":637,"context_line":"                constants.DEFAULT_SERIAL_CONSOLE_PORT))"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"            if port_number not in [1, 2]:"},{"line_number":640,"context_line":"                err_msg \u003d _(\"Invalid serial port number: %(port_number)s. \""}],"source_content_type":"text/x-python","patch_set":31,"id":"3afb71cf_02b089dc","line":637,"updated":"2015-06-05 13:53:11.000000000","message":"So, if the property is not defined, both serial port types will have the same port_number? That is problematic, since one of the ports will not be created. See comment below.\n\nAlso, since there are only 2 properties, if the user sets one, the other one should automatically assumed the other value, IMO.","commit_id":"958807b7e5f029018ea49e8e32f89844b453e746"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"85ada65bd54e89d8abe8c10338257dd997787c4a","unresolved":false,"context_lines":[{"line_number":634,"context_line":"        for image_prop, port_type in constants.SERIAL_PORT_TYPES.iteritems():"},{"line_number":635,"context_line":"            port_number \u003d int(image_props.get("},{"line_number":636,"context_line":"                image_prop,"},{"line_number":637,"context_line":"                constants.DEFAULT_SERIAL_CONSOLE_PORT))"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"            if port_number not in [1, 2]:"},{"line_number":640,"context_line":"                err_msg \u003d _(\"Invalid serial port number: %(port_number)s. \""}],"source_content_type":"text/x-python","patch_set":31,"id":"3afb71cf_c81a9317","line":637,"in_reply_to":"3afb71cf_02b089dc","updated":"2015-06-05 14:40:39.000000000","message":"The 2 serial ports are automatically created by Hyper-V when you create the instance. Based on which serial ports will be used, we create named pipes and workers that are going to consume those pipes.\n\nWell, I don\u0027t see any problem with using the same serial port for logging as well as interactive sessions if not specified otherwise.","commit_id":"958807b7e5f029018ea49e8e32f89844b453e746"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"f3d6d3b908905563e9e9cd0a7d17f8f28f5d139a","unresolved":false,"context_lines":[{"line_number":645,"context_line":"            existing_type \u003d serial_ports.get(port_number)"},{"line_number":646,"context_line":"            if (not existing_type or"},{"line_number":647,"context_line":"                    existing_type \u003d\u003d constants.SERIAL_PORT_TYPE_RO):"},{"line_number":648,"context_line":"                serial_ports[port_number] \u003d port_type"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"        return serial_ports"}],"source_content_type":"text/x-python","patch_set":31,"id":"3afb71cf_c27cb122","line":648,"range":{"start_line":648,"start_character":29,"end_line":648,"end_character":40},"updated":"2015-06-05 13:53:11.000000000","message":"Hm, so, basically, if the user will set 2 serial console related properties with the same port number, one of them will be ignored (also, see above). Now, which one will be ignored, will depend on the Gods of Randomness, since constants.SERIAL_PORT_TYPES is a dict.\n\nI think this can lead to unexpected behaviour that is not easily detectable, as it isn\u0027t even logged. At least a warning should be issued. I\u0027d say it\u0027s even debatable if it\u0027s acceptable.","commit_id":"958807b7e5f029018ea49e8e32f89844b453e746"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"85ada65bd54e89d8abe8c10338257dd997787c4a","unresolved":false,"context_lines":[{"line_number":645,"context_line":"            existing_type \u003d serial_ports.get(port_number)"},{"line_number":646,"context_line":"            if (not existing_type or"},{"line_number":647,"context_line":"                    existing_type \u003d\u003d constants.SERIAL_PORT_TYPE_RO):"},{"line_number":648,"context_line":"                serial_ports[port_number] \u003d port_type"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"        return serial_ports"}],"source_content_type":"text/x-python","patch_set":31,"id":"3afb71cf_2be24104","line":648,"in_reply_to":"3afb71cf_c27cb122","updated":"2015-06-05 14:40:39.000000000","message":"Actually, this is not random at all. The code above enforces that SERIAL_PORT_TYPE_RW supersedes SERIAL_PORT_RO. I\u0027ll add an inline comment explaining this as it\u0027s not very obvious.","commit_id":"958807b7e5f029018ea49e8e32f89844b453e746"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"f3d6d3b908905563e9e9cd0a7d17f8f28f5d139a","unresolved":false,"context_lines":[{"line_number":647,"context_line":"                    existing_type \u003d\u003d constants.SERIAL_PORT_TYPE_RO):"},{"line_number":648,"context_line":"                serial_ports[port_number] \u003d port_type"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"        return serial_ports"}],"source_content_type":"text/x-python","patch_set":31,"id":"3afb71cf_a2ce5558","line":650,"updated":"2015-06-05 13:53:11.000000000","message":"My question is, why do you have to rely on the user to input image properties? Especially you assume a default value anyways.","commit_id":"958807b7e5f029018ea49e8e32f89844b453e746"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"85ada65bd54e89d8abe8c10338257dd997787c4a","unresolved":false,"context_lines":[{"line_number":647,"context_line":"                    existing_type \u003d\u003d constants.SERIAL_PORT_TYPE_RO):"},{"line_number":648,"context_line":"                serial_ports[port_number] \u003d port_type"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"        return serial_ports"}],"source_content_type":"text/x-python","patch_set":31,"id":"3afb71cf_6bf39974","line":650,"in_reply_to":"3afb71cf_a2ce5558","updated":"2015-06-05 14:40:39.000000000","message":"The whole idea is that if not specified otherwise, COM1 will be used for logging as well as interactive sessions.\n\nOn the other hand, there are cases when this is not desired. For example, cloudbase-init may be configured to use COM1 for logging, so you won\u0027t be able to use it for interactive sessions (for example for EMS). In this case, you would set the image extra specs so that COM1 would be used for logging and COM2 for interactive sessions.","commit_id":"958807b7e5f029018ea49e8e32f89844b453e746"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d6183f1cf4c0d694b38e4e8a15fa376910c84a4f","unresolved":false,"context_lines":[{"line_number":667,"context_line":"        for image_prop, port_type in constants.SERIAL_PORT_TYPES.items():"},{"line_number":668,"context_line":"            port_number \u003d int(image_props.get("},{"line_number":669,"context_line":"                image_prop,"},{"line_number":670,"context_line":"                constants.DEFAULT_SERIAL_CONSOLE_PORT))"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"            if port_number not in [1, 2]:"},{"line_number":673,"context_line":"                err_msg \u003d _(\"Invalid serial port number: %(port_number)s. \""}],"source_content_type":"text/x-python","patch_set":58,"id":"bab6814e_f6c40a60","line":670,"updated":"2016-05-19 17:11:59.000000000","message":"Isn\u0027t this requesting an image property that isn\u0027t on image_meta? That would mean that we\u0027re always taking the default.\n\nThe image_meta object only specifies the number of serial ports (hw_serial_port_count) so you should be using that here right? Perhaps just doing the two you want as the first two ports, and only enabling both if we have two specified?","commit_id":"3901555bbd9ee9b3c5e4feb74d7e0db7713fb772"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"042865458d7e3d92f78f84ef8dca3eaadcb4992a","unresolved":false,"context_lines":[{"line_number":667,"context_line":"        for image_prop, port_type in constants.SERIAL_PORT_TYPES.items():"},{"line_number":668,"context_line":"            port_number \u003d int(image_props.get("},{"line_number":669,"context_line":"                image_prop,"},{"line_number":670,"context_line":"                constants.DEFAULT_SERIAL_CONSOLE_PORT))"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"            if port_number not in [1, 2]:"},{"line_number":673,"context_line":"                err_msg \u003d _(\"Invalid serial port number: %(port_number)s. \""}],"source_content_type":"text/x-python","patch_set":58,"id":"bab6814e_df3bd9cf","line":670,"in_reply_to":"bab6814e_b978b52c","updated":"2016-05-19 18:05:14.000000000","message":"Well, the thing in the metadata object is what we have at the moment. So, getting a property that doesn\u0027t exist is wrong here, IMHO.\n\nCan you just honor the count (or just do what you want if the property is nonzero?\n\nI don\u0027t know that we can really identify one serial port as interactive vs. logging in a consistent manner, but that\u0027s really a larger discussion.","commit_id":"3901555bbd9ee9b3c5e4feb74d7e0db7713fb772"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"4b5831d5cda26829acaab4fd559de3ddb4e3da77","unresolved":false,"context_lines":[{"line_number":667,"context_line":"        for image_prop, port_type in constants.SERIAL_PORT_TYPES.items():"},{"line_number":668,"context_line":"            port_number \u003d int(image_props.get("},{"line_number":669,"context_line":"                image_prop,"},{"line_number":670,"context_line":"                constants.DEFAULT_SERIAL_CONSOLE_PORT))"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"            if port_number not in [1, 2]:"},{"line_number":673,"context_line":"                err_msg \u003d _(\"Invalid serial port number: %(port_number)s. \""}],"source_content_type":"text/x-python","patch_set":58,"id":"bab6814e_b978b52c","line":670,"in_reply_to":"bab6814e_f6c40a60","updated":"2016-05-19 17:35:48.000000000","message":"The hw_serial_port_count prop is not very helpful in this case.\n\nAs mentioned in the inline comment, we wanted to let the user specify which port will be used for interactive sessions and which one will be used for logging only.\n\nActually, this patch was there before the instance metadata object was used. Since I was going to add those two image props, I left this code here, which at the moment will just return the defaults.","commit_id":"3901555bbd9ee9b3c5e4feb74d7e0db7713fb772"}]}
