)]}'
{"nova/tests/functional/regressions/test_bug_1550919.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f2146a7431b0e61524a85bcc36ae677223a5da9f","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        dest_root_disk \u003d os.path.join(self.dest_instance_path(server),"},{"line_number":58,"context_line":"                                      \u0027disk\u0027)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        self.assertTrue(os.path.exists(source_root_disk),"},{"line_number":61,"context_line":"                        \"Source root disk %s exists\" % source_root_disk)"},{"line_number":62,"context_line":"        self.assertFalse(os.path.exists(dest_root_disk),"},{"line_number":63,"context_line":"                         \"Destination root disk %s exists\" % dest_root_disk)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def assert_disks_shared_instancedir(self, server):"},{"line_number":66,"context_line":"        source_root_disk \u003d os.path.join(self.source_instance_path(server),"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_3c8d197d","line":63,"range":{"start_line":60,"start_character":1,"end_line":63,"end_character":76},"updated":"2018-10-19 14:11:36.000000000","message":"Both assert prints a positive message when fails but one asserts something to be true and the other asserts to something is not true. I suggest to change the first to \"Source root disk %s does not exist\"","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"0c914533a2fb4998798a36e337390821e3d0970c","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        dest_root_disk \u003d os.path.join(self.dest_instance_path(server),"},{"line_number":58,"context_line":"                                      \u0027disk\u0027)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        self.assertTrue(os.path.exists(source_root_disk),"},{"line_number":61,"context_line":"                        \"Source root disk %s exists\" % source_root_disk)"},{"line_number":62,"context_line":"        self.assertFalse(os.path.exists(dest_root_disk),"},{"line_number":63,"context_line":"                         \"Destination root disk %s exists\" % dest_root_disk)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def assert_disks_shared_instancedir(self, server):"},{"line_number":66,"context_line":"        source_root_disk \u003d os.path.join(self.source_instance_path(server),"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_c0a97ade","line":63,"range":{"start_line":60,"start_character":1,"end_line":63,"end_character":76},"in_reply_to":"3f79a3b5_3c8d197d","updated":"2018-10-22 16:13:46.000000000","message":"Done.","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f2146a7431b0e61524a85bcc36ae677223a5da9f","unresolved":false,"context_lines":[{"line_number":136,"context_line":"                               return_value\u003dname):"},{"line_number":137,"context_line":"            compute \u003d self.start_service(\u0027compute\u0027, host\u003dname)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        compute.driver._host.get_connection().getHostname \u003d lambda: name"},{"line_number":140,"context_line":"        return compute"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_5cb015fe","line":139,"updated":"2018-10-19 14:11:36.000000000","message":"ugly but I cannot come up with a better one after thinking about it for a while","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f2146a7431b0e61524a85bcc36ae677223a5da9f","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    def setUp(self):"},{"line_number":143,"context_line":"        super(_LibvirtEvacuateTest, self).setUp()"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        self.flags(debug\u003dTrue)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        self.useFixture(nova_fixtures.NeutronFixture(self))"},{"line_number":148,"context_line":"        fake_network.set_stub_network_methods(self)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_7c963140","line":145,"updated":"2018-10-19 14:11:36.000000000","message":"Why do we need this? The tests are passing without it for me.","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"14449292f6acfab02e2c87b07e377f1a1c85b034","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    def setUp(self):"},{"line_number":143,"context_line":"        super(_LibvirtEvacuateTest, self).setUp()"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        self.flags(debug\u003dTrue)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        self.useFixture(nova_fixtures.NeutronFixture(self))"},{"line_number":148,"context_line":"        fake_network.set_stub_network_methods(self)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_e542a4ac","line":145,"in_reply_to":"3f79a3b5_7c963140","updated":"2018-10-19 15:57:29.000000000","message":"Yeah, if you want to get debug logs when a test fails, you just do \u0027OS_DEBUG\u003d1 tox -efunctional \u003cyour_test\u003e\u0027 and you don\u0027t need this.","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"0c914533a2fb4998798a36e337390821e3d0970c","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    def setUp(self):"},{"line_number":143,"context_line":"        super(_LibvirtEvacuateTest, self).setUp()"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        self.flags(debug\u003dTrue)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        self.useFixture(nova_fixtures.NeutronFixture(self))"},{"line_number":148,"context_line":"        fake_network.set_stub_network_methods(self)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_e0a4b607","line":145,"in_reply_to":"3f79a3b5_8ee3ba3a","updated":"2018-10-22 16:13:46.000000000","message":"Done","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"68ff6c2b3a43a06a241e8a3ba8ad167546426e6e","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    def setUp(self):"},{"line_number":143,"context_line":"        super(_LibvirtEvacuateTest, self).setUp()"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        self.flags(debug\u003dTrue)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        self.useFixture(nova_fixtures.NeutronFixture(self))"},{"line_number":148,"context_line":"        fake_network.set_stub_network_methods(self)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_8ee3ba3a","line":145,"in_reply_to":"3f79a3b5_e542a4ac","updated":"2018-10-22 08:45:41.000000000","message":"Yeah, this is vestigial :) I spent bloody ages trying to get DEBUG logs out of this test.","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f2146a7431b0e61524a85bcc36ae677223a5da9f","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        return os.path.join(CONF.instances_path, \u0027dest\u0027, server[\u0027id\u0027])"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _create_server(self):"},{"line_number":186,"context_line":"        # Create an instance on compute0"},{"line_number":187,"context_line":"        create_req \u003d {"},{"line_number":188,"context_line":"            \u0027name\u0027: \u0027server\u0027,"},{"line_number":189,"context_line":"            \u0027imageRef\u0027: self.image_id,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_1ccb7d4b","line":186,"range":{"start_line":186,"start_character":8,"end_line":186,"end_character":40},"updated":"2018-10-19 14:11:36.000000000","message":"How this function makes sure that the instance is started on compute0?","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"0c914533a2fb4998798a36e337390821e3d0970c","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        return os.path.join(CONF.instances_path, \u0027dest\u0027, server[\u0027id\u0027])"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _create_server(self):"},{"line_number":186,"context_line":"        # Create an instance on compute0"},{"line_number":187,"context_line":"        create_req \u003d {"},{"line_number":188,"context_line":"            \u0027name\u0027: \u0027server\u0027,"},{"line_number":189,"context_line":"            \u0027imageRef\u0027: self.image_id,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_80b3824e","line":186,"range":{"start_line":186,"start_character":8,"end_line":186,"end_character":40},"in_reply_to":"3f79a3b5_0ed7aa52","updated":"2018-10-22 16:13:46.000000000","message":"Done","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"14449292f6acfab02e2c87b07e377f1a1c85b034","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        return os.path.join(CONF.instances_path, \u0027dest\u0027, server[\u0027id\u0027])"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _create_server(self):"},{"line_number":186,"context_line":"        # Create an instance on compute0"},{"line_number":187,"context_line":"        create_req \u003d {"},{"line_number":188,"context_line":"            \u0027name\u0027: \u0027server\u0027,"},{"line_number":189,"context_line":"            \u0027imageRef\u0027: self.image_id,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_858090c0","line":186,"range":{"start_line":186,"start_character":8,"end_line":186,"end_character":40},"in_reply_to":"3f79a3b5_1ccb7d4b","updated":"2018-10-19 15:57:29.000000000","message":"Looks like it does only because _create_server is called before compute1 is ever started (in _swap_computes). So really this comment should be in each test, not inside this function.","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"68ff6c2b3a43a06a241e8a3ba8ad167546426e6e","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        return os.path.join(CONF.instances_path, \u0027dest\u0027, server[\u0027id\u0027])"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _create_server(self):"},{"line_number":186,"context_line":"        # Create an instance on compute0"},{"line_number":187,"context_line":"        create_req \u003d {"},{"line_number":188,"context_line":"            \u0027name\u0027: \u0027server\u0027,"},{"line_number":189,"context_line":"            \u0027imageRef\u0027: self.image_id,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_0ed7aa52","line":186,"range":{"start_line":186,"start_character":8,"end_line":186,"end_character":40},"in_reply_to":"3f79a3b5_858090c0","updated":"2018-10-22 08:45:41.000000000","message":"This comment was more obvious before I moved the code into this function and the comment with it. I\u0027ll update.","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f2146a7431b0e61524a85bcc36ae677223a5da9f","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        # Start compute1"},{"line_number":205,"context_line":"        self.compute1 \u003d self._start_compute(\u0027compute1\u0027)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        # Create a \u0027pass-through\u0027 mock for ensure_tree so we can log its calls"},{"line_number":208,"context_line":"        orig_ensure_tree \u003d fileutils.ensure_tree"},{"line_number":209,"context_line":"        self.mock_ensure_tree \u003d self.useFixture(fixtures.MockPatch("},{"line_number":210,"context_line":"            \u0027oslo_utils.fileutils.ensure_tree\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_5cfa5577","line":207,"range":{"start_line":207,"start_character":19,"end_line":207,"end_character":38},"updated":"2018-10-19 14:11:36.000000000","message":"a spy? :)\nhttp://agileinaflash.blogspot.com/2010/03/mock-terminology.html","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"68ff6c2b3a43a06a241e8a3ba8ad167546426e6e","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        # Start compute1"},{"line_number":205,"context_line":"        self.compute1 \u003d self._start_compute(\u0027compute1\u0027)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        # Create a \u0027pass-through\u0027 mock for ensure_tree so we can log its calls"},{"line_number":208,"context_line":"        orig_ensure_tree \u003d fileutils.ensure_tree"},{"line_number":209,"context_line":"        self.mock_ensure_tree \u003d self.useFixture(fixtures.MockPatch("},{"line_number":210,"context_line":"            \u0027oslo_utils.fileutils.ensure_tree\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_eedb4e77","line":207,"range":{"start_line":207,"start_character":19,"end_line":207,"end_character":38},"in_reply_to":"3f79a3b5_5cfa5577","updated":"2018-10-22 08:45:41.000000000","message":"Hah :)","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f2146a7431b0e61524a85bcc36ae677223a5da9f","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        # Check that we\u0027ve got an instance directory on the source and not on"},{"line_number":247,"context_line":"        # the dest"},{"line_number":248,"context_line":"        self.assertTrue(os.path.exists(source_instance_path),"},{"line_number":249,"context_line":"                        \"Source instance directory %s exists\" %"},{"line_number":250,"context_line":"                        source_instance_path)"},{"line_number":251,"context_line":"        self.assertFalse(os.path.exists(dest_instance_path),"},{"line_number":252,"context_line":"                         \"Destination instance directory %s exists\" %"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_9c5c6d81","line":249,"range":{"start_line":249,"start_character":25,"end_line":249,"end_character":60},"updated":"2018-10-19 14:11:36.000000000","message":"negate it as it is printed if the path does not exists and therefore the assert fails","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"0c914533a2fb4998798a36e337390821e3d0970c","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        # Check that we\u0027ve got an instance directory on the source and not on"},{"line_number":247,"context_line":"        # the dest"},{"line_number":248,"context_line":"        self.assertTrue(os.path.exists(source_instance_path),"},{"line_number":249,"context_line":"                        \"Source instance directory %s exists\" %"},{"line_number":250,"context_line":"                        source_instance_path)"},{"line_number":251,"context_line":"        self.assertFalse(os.path.exists(dest_instance_path),"},{"line_number":252,"context_line":"                         \"Destination instance directory %s exists\" %"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_80eb82db","line":249,"range":{"start_line":249,"start_character":25,"end_line":249,"end_character":60},"in_reply_to":"3f79a3b5_9c5c6d81","updated":"2018-10-22 16:13:46.000000000","message":"Done","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f2146a7431b0e61524a85bcc36ae677223a5da9f","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        def dest_get_instance_path(instance, relative\u003dFalse):"},{"line_number":259,"context_line":"            if relative:"},{"line_number":260,"context_line":"                return instance.uuid"},{"line_number":261,"context_line":"            return os.path.join(CONF.instances_path, \u0027dest\u0027, instance.uuid)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        with mock.patch(\u0027nova.virt.libvirt.utils.get_instance_path\u0027) \\"},{"line_number":264,"context_line":"                as get_instance_path:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_fcd9e1f0","line":261,"range":{"start_line":261,"start_character":19,"end_line":261,"end_character":75},"updated":"2018-10-19 14:11:36.000000000","message":"isn\u0027t it the same as dest_instance_path ?","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"68ff6c2b3a43a06a241e8a3ba8ad167546426e6e","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        def dest_get_instance_path(instance, relative\u003dFalse):"},{"line_number":259,"context_line":"            if relative:"},{"line_number":260,"context_line":"                return instance.uuid"},{"line_number":261,"context_line":"            return os.path.join(CONF.instances_path, \u0027dest\u0027, instance.uuid)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        with mock.patch(\u0027nova.virt.libvirt.utils.get_instance_path\u0027) \\"},{"line_number":264,"context_line":"                as get_instance_path:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_6ec97ea9","line":261,"range":{"start_line":261,"start_character":19,"end_line":261,"end_character":75},"in_reply_to":"3f79a3b5_fcd9e1f0","updated":"2018-10-22 08:45:41.000000000","message":"Yeah. This code has been iterated a bunch of times, and I obviously haven\u0027t updated everything.","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f2146a7431b0e61524a85bcc36ae677223a5da9f","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        # Check that we\u0027ve got an instance directory on the source and not on"},{"line_number":269,"context_line":"        # the dest, but that the dest was created"},{"line_number":270,"context_line":"        self.assertTrue(os.path.exists(source_instance_path),"},{"line_number":271,"context_line":"                        \"Source instance directory %s exists\" %"},{"line_number":272,"context_line":"                        source_instance_path)"},{"line_number":273,"context_line":"        self.assertFalse(os.path.exists(dest_instance_path),"},{"line_number":274,"context_line":"                         \"Destination instance directory %s exists\" %"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_3cf9994e","line":271,"range":{"start_line":271,"start_character":25,"end_line":271,"end_character":61},"updated":"2018-10-19 14:11:36.000000000","message":"negate it","commit_id":"1c6a74c69f64e28cce27568d1691ab51b6b0f967"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f730c3033049e584500c40e55c6ed7a97b0ae70","unresolved":false,"context_lines":[{"line_number":31,"context_line":"CONF \u003d conf.CONF"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class _FakeFlat(object):"},{"line_number":35,"context_line":"    def setUp(self):"},{"line_number":36,"context_line":"        super(_FakeFlat, self).setUp()"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_3ec0144b","line":34,"updated":"2018-11-27 15:21:29.000000000","message":"Docstrings on the classes here and throughout would be useful. Maintaining tests like this which rely heavily on fixtures need to be well documented.","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"660fd5785416ea343167a19d4cb7a0b516314aa2","unresolved":false,"context_lines":[{"line_number":31,"context_line":"CONF \u003d conf.CONF"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class _FakeFlat(object):"},{"line_number":35,"context_line":"    def setUp(self):"},{"line_number":36,"context_line":"        super(_FakeFlat, self).setUp()"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_19ba12df","line":34,"in_reply_to":"3f79a3b5_3ec0144b","updated":"2018-11-27 15:43:27.000000000","message":"Ack.","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f730c3033049e584500c40e55c6ed7a97b0ae70","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def setUp(self):"},{"line_number":36,"context_line":"        super(_FakeFlat, self).setUp()"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        def fake_create_image(_self, prepare_template, base, size,"},{"line_number":39,"context_line":"                              *args, **kwargs):"},{"line_number":40,"context_line":"            # Simply ensure the file exists"},{"line_number":41,"context_line":"            open(_self.path, \u0027a\u0027).close()"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_3ee7b412","line":39,"range":{"start_line":38,"start_character":37,"end_line":39,"end_character":45},"updated":"2018-11-27 15:21:29.000000000","message":"nit: if we aren\u0027t going to use any of these I\u0027d probably just make them all *args and **kwargs in case that interface changes later.","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"660fd5785416ea343167a19d4cb7a0b516314aa2","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def setUp(self):"},{"line_number":36,"context_line":"        super(_FakeFlat, self).setUp()"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        def fake_create_image(_self, prepare_template, base, size,"},{"line_number":39,"context_line":"                              *args, **kwargs):"},{"line_number":40,"context_line":"            # Simply ensure the file exists"},{"line_number":41,"context_line":"            open(_self.path, \u0027a\u0027).close()"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_f99b9675","line":39,"range":{"start_line":38,"start_character":37,"end_line":39,"end_character":45},"in_reply_to":"3f79a3b5_3ee7b412","updated":"2018-11-27 15:43:27.000000000","message":"Can\u0027t recall why I did this, probably just cut/paste. Assuming there\u0027s no good reason (can\u0027t think of one) I\u0027ll remove it.","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f730c3033049e584500c40e55c6ed7a97b0ae70","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                         \"Source root disk %s exists\" % source_root_disk)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"# NOTE(mdbooth): The Rbd tests also need to mock the flat backend, because the"},{"line_number":76,"context_line":"# image returned by the fake image service may (non-deterministically before"},{"line_number":77,"context_line":"# python3.6 due to dict ordering) include a kernel and ramdisk. The libvirt"},{"line_number":78,"context_line":"# driver forces these to use the flat backend."},{"line_number":79,"context_line":"class _RbdTest(_FakeFlat):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_3e6ed464","line":76,"range":{"start_line":75,"start_character":67,"end_line":76,"end_character":42},"updated":"2018-11-27 15:21:29.000000000","message":"Can\u0027t we control which specific image we want to use via the image ID? Looking at L172 you do use a specific image.","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"660fd5785416ea343167a19d4cb7a0b516314aa2","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                         \"Source root disk %s exists\" % source_root_disk)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"# NOTE(mdbooth): The Rbd tests also need to mock the flat backend, because the"},{"line_number":76,"context_line":"# image returned by the fake image service may (non-deterministically before"},{"line_number":77,"context_line":"# python3.6 due to dict ordering) include a kernel and ramdisk. The libvirt"},{"line_number":78,"context_line":"# driver forces these to use the flat backend."},{"line_number":79,"context_line":"class _RbdTest(_FakeFlat):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_99dce243","line":76,"range":{"start_line":75,"start_character":67,"end_line":76,"end_character":42},"in_reply_to":"3f79a3b5_3e6ed464","updated":"2018-11-27 15:43:27.000000000","message":"Yes we do, and I forgot to update this when I made that change. I\u0027ll see if I can simplify this.","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f730c3033049e584500c40e55c6ed7a97b0ae70","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        self.created \u003d set()"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        def fake_create_image(_self, prepare_template, base, size,"},{"line_number":88,"context_line":"                              *args, **kwargs):"},{"line_number":89,"context_line":"            self.created.add(_self.rbd_name)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        def fake_exists(_self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_be8f441f","line":88,"range":{"start_line":87,"start_character":30,"end_line":88,"end_character":45},"updated":"2018-11-27 15:21:29.000000000","message":"same as above","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f730c3033049e584500c40e55c6ed7a97b0ae70","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.mock_rbd_driver.get_mon_addrs.return_value \u003d ([], [])"},{"line_number":105,"context_line":"        self.mock_rbd_driver.size.return_value \u003d 10 * units.Gi"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        self.mock_cleanup_rbd \u003d self.useFixture(fixtures.MockPatch("},{"line_number":108,"context_line":"            \u0027nova.virt.libvirt.driver.LibvirtDriver._cleanup_rbd\u0027)).mock"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _assert_disks(self, server):"},{"line_number":111,"context_line":"        # Check that we created a root disk and haven\u0027t called _cleanup_rbd at"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_deab206d","line":108,"range":{"start_line":107,"start_character":8,"end_line":108,"end_character":72},"updated":"2018-11-27 15:21:29.000000000","message":"Why not just mock the RBDDriver.cleanup_volumes method?","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"660fd5785416ea343167a19d4cb7a0b516314aa2","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.mock_rbd_driver.get_mon_addrs.return_value \u003d ([], [])"},{"line_number":105,"context_line":"        self.mock_rbd_driver.size.return_value \u003d 10 * units.Gi"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        self.mock_cleanup_rbd \u003d self.useFixture(fixtures.MockPatch("},{"line_number":108,"context_line":"            \u0027nova.virt.libvirt.driver.LibvirtDriver._cleanup_rbd\u0027)).mock"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _assert_disks(self, server):"},{"line_number":111,"context_line":"        # Check that we created a root disk and haven\u0027t called _cleanup_rbd at"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_b98f5e1f","line":108,"range":{"start_line":107,"start_character":8,"end_line":108,"end_character":72},"in_reply_to":"3f79a3b5_deab206d","updated":"2018-11-27 15:43:27.000000000","message":"Looks like this would already be mocked anyway due to line 102. I\u0027ll look into this.","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f730c3033049e584500c40e55c6ed7a97b0ae70","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        # Choice of image id and flavor are arbitrary. Fixed for consistency."},{"line_number":172,"context_line":"        self.image_id \u003d fake_image.AUTO_DISK_CONFIG_ENABLED_IMAGE_UUID"},{"line_number":173,"context_line":"        self.flavor_id \u003d next(flavor for flavor in self.api.get_flavors()"},{"line_number":174,"context_line":"                              if flavor[\u0027name\u0027] \u003d\u003d \u0027m1.tiny\u0027)[\u0027id\u0027]"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    @staticmethod"},{"line_number":177,"context_line":"    def source_instance_path(server):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_1e12f8b3","line":174,"range":{"start_line":173,"start_character":25,"end_line":174,"end_character":67},"updated":"2018-11-27 15:21:29.000000000","message":"If it doesn\u0027t matter, I\u0027m not sure why you just don\u0027t do this:\n\nself.flavor_id \u003d self.api.get_flavors()[0][\u0027id\u0027]","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"660fd5785416ea343167a19d4cb7a0b516314aa2","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        # Choice of image id and flavor are arbitrary. Fixed for consistency."},{"line_number":172,"context_line":"        self.image_id \u003d fake_image.AUTO_DISK_CONFIG_ENABLED_IMAGE_UUID"},{"line_number":173,"context_line":"        self.flavor_id \u003d next(flavor for flavor in self.api.get_flavors()"},{"line_number":174,"context_line":"                              if flavor[\u0027name\u0027] \u003d\u003d \u0027m1.tiny\u0027)[\u0027id\u0027]"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    @staticmethod"},{"line_number":177,"context_line":"    def source_instance_path(server):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_f9cdd691","line":174,"range":{"start_line":173,"start_character":25,"end_line":174,"end_character":67},"in_reply_to":"3f79a3b5_1e12f8b3","updated":"2018-11-27 15:43:27.000000000","message":"Just so we\u0027re guaranteed to get m1.tiny. I guess it\u0027s true to say that the choice is arbitrary, but which one we choose arbitrarily may affect what needs to be mocked, etc.","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"24284ab0906c719aed8ae3f2fa495a157f0d9e39","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        # Choice of image id and flavor are arbitrary. Fixed for consistency."},{"line_number":172,"context_line":"        self.image_id \u003d fake_image.AUTO_DISK_CONFIG_ENABLED_IMAGE_UUID"},{"line_number":173,"context_line":"        self.flavor_id \u003d next(flavor for flavor in self.api.get_flavors()"},{"line_number":174,"context_line":"                              if flavor[\u0027name\u0027] \u003d\u003d \u0027m1.tiny\u0027)[\u0027id\u0027]"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    @staticmethod"},{"line_number":177,"context_line":"    def source_instance_path(server):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_4a4bca7e","line":174,"range":{"start_line":173,"start_character":25,"end_line":174,"end_character":67},"in_reply_to":"3f79a3b5_f9cdd691","updated":"2018-11-27 17:47:46.000000000","message":"Alternatively, if you have a specific type of flavor you want, create it in the test setup.","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f730c3033049e584500c40e55c6ed7a97b0ae70","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            \u0027flavorRef\u0027: self.flavor_id,"},{"line_number":189,"context_line":"        }"},{"line_number":190,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: create_req})"},{"line_number":191,"context_line":"        self.addCleanup(self.api.delete_server, server[\u0027id\u0027])"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_3e1814cc","line":191,"range":{"start_line":191,"start_character":8,"end_line":191,"end_character":61},"updated":"2018-11-27 15:21:29.000000000","message":"nit: we shouldn\u0027t need this, the test will teardown the sqlite db between test cases anyway.","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"660fd5785416ea343167a19d4cb7a0b516314aa2","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            \u0027flavorRef\u0027: self.flavor_id,"},{"line_number":189,"context_line":"        }"},{"line_number":190,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: create_req})"},{"line_number":191,"context_line":"        self.addCleanup(self.api.delete_server, server[\u0027id\u0027])"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_d9ab3a6d","line":191,"range":{"start_line":191,"start_character":8,"end_line":191,"end_character":61},"in_reply_to":"3f79a3b5_3e1814cc","updated":"2018-11-27 15:43:27.000000000","message":"IIRC this cleans stuff up on disk as well as in the db.","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f730c3033049e584500c40e55c6ed7a97b0ae70","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        with mock.patch.object(self.compute1.driver, \u0027plug_vifs\u0027) as plug_vifs:"},{"line_number":217,"context_line":"            plug_vifs.side_effect \u003d test.TestingException"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"            self.api.post_server_action(instance_uuid,"},{"line_number":220,"context_line":"                                        {\u0027evacuate\u0027: {\u0027host\u0027: \u0027compute1\u0027}})"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"            # Wait for the rebuild to start, then complete"},{"line_number":223,"context_line":"            fake_notifier.wait_for_versioned_notifications("}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_7e50cc5f","line":220,"range":{"start_line":219,"start_character":12,"end_line":220,"end_character":75},"updated":"2018-11-27 15:21:29.000000000","message":"I\u0027m not sure if it matters here, but we are bypassing the scheduler here since we\u0027re using microversion 2.14 and it wasn\u0027t until 2.29 that we\u0027d go through the scheduler to validate the specific host.","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f730c3033049e584500c40e55c6ed7a97b0ae70","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            self.api.post_server_action(instance_uuid,"},{"line_number":220,"context_line":"                                        {\u0027evacuate\u0027: {\u0027host\u0027: \u0027compute1\u0027}})"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"            # Wait for the rebuild to start, then complete"},{"line_number":223,"context_line":"            fake_notifier.wait_for_versioned_notifications("},{"line_number":224,"context_line":"                    \u0027instance.rebuild.start\u0027)"},{"line_number":225,"context_line":"            self._wait_for_server_parameter(self.api, server,"},{"line_number":226,"context_line":"                                            {\u0027OS-EXT-STS:task_state\u0027: None})"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"            # Meta-test"},{"line_number":229,"context_line":"            plug_vifs.assert_called()"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_be9504e4","line":226,"range":{"start_line":222,"start_character":12,"end_line":226,"end_character":76},"updated":"2018-11-27 15:21:29.000000000","message":"Might also be useful to assert the related migration record status is \u0027failed\u0027:\n\nself._wait_for_migration_status(server, [\u0027failed\u0027])","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"660fd5785416ea343167a19d4cb7a0b516314aa2","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            self.api.post_server_action(instance_uuid,"},{"line_number":220,"context_line":"                                        {\u0027evacuate\u0027: {\u0027host\u0027: \u0027compute1\u0027}})"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"            # Wait for the rebuild to start, then complete"},{"line_number":223,"context_line":"            fake_notifier.wait_for_versioned_notifications("},{"line_number":224,"context_line":"                    \u0027instance.rebuild.start\u0027)"},{"line_number":225,"context_line":"            self._wait_for_server_parameter(self.api, server,"},{"line_number":226,"context_line":"                                            {\u0027OS-EXT-STS:task_state\u0027: None})"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"            # Meta-test"},{"line_number":229,"context_line":"            plug_vifs.assert_called()"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_d907ba6e","line":226,"range":{"start_line":222,"start_character":12,"end_line":226,"end_character":76},"in_reply_to":"3f79a3b5_be9504e4","updated":"2018-11-27 15:43:27.000000000","message":"Ack.","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f730c3033049e584500c40e55c6ed7a97b0ae70","unresolved":false,"context_lines":[{"line_number":229,"context_line":"            plug_vifs.assert_called()"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # Return fresh server state after evacuate"},{"line_number":232,"context_line":"        return self.api.get_server(instance_uuid)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def test_evacuate_nonshared_instancedir(self):"},{"line_number":235,"context_line":"        # If we fail during evacuate and the instance directory didn\u0027t"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_9ef92850","line":232,"range":{"start_line":232,"start_character":8,"end_line":232,"end_character":49},"updated":"2018-11-27 15:21:29.000000000","message":"nit: _wait_for_server_parameter will return the server so you could just store that variable and return it here.","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"660fd5785416ea343167a19d4cb7a0b516314aa2","unresolved":false,"context_lines":[{"line_number":229,"context_line":"            plug_vifs.assert_called()"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # Return fresh server state after evacuate"},{"line_number":232,"context_line":"        return self.api.get_server(instance_uuid)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def test_evacuate_nonshared_instancedir(self):"},{"line_number":235,"context_line":"        # If we fail during evacuate and the instance directory didn\u0027t"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_7950e65f","line":232,"range":{"start_line":232,"start_character":8,"end_line":232,"end_character":49},"in_reply_to":"3f79a3b5_9ef92850","updated":"2018-11-27 15:43:27.000000000","message":"Nice.","commit_id":"bbe88786fc90c2106f9fae0156ee7b09ece9a83b"}]}
