)]}'
{"nova/tests/unit/virt/libvirt/test_guest.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"0f460e68fa7384b92770135c4cae6f845218fa32","unresolved":false,"context_lines":[{"line_number":362,"context_line":"        self.assertEqual(1, power)"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"    def test_is_active_when_domain_is_active(self):"},{"line_number":365,"context_line":"        self.assertTrue(self.guest.is_active())"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def test_is_active_when_domain_not_active(self):"},{"line_number":368,"context_line":"        with mock.patch.object(self.domain, \"isActive\", return_value\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_3b95c6e3","line":365,"updated":"2015-09-14 12:35:43.000000000","message":"nit: Hum that could create a fail in future think we share the same domain\u0027s reference for all tests [1] perhaps a mock as you did line 367 can avoid it definitely. \n\n[1] http://git.openstack.org/cgit/openstack/nova/tree/nova/tests/unit/virt/libvirt/fakelibvirt.py#n527","commit_id":"4a2c3f453ee0d5f99451743204dfa362e984395d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dffcbdc840d1fd7ae7f45022e1a117b674de081f","unresolved":false,"context_lines":[{"line_number":362,"context_line":"        self.assertEqual(1, power)"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"    def test_is_active_when_domain_is_active(self):"},{"line_number":365,"context_line":"        self.assertTrue(self.guest.is_active())"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def test_is_active_when_domain_not_active(self):"},{"line_number":368,"context_line":"        with mock.patch.object(self.domain, \"isActive\", return_value\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_ea89accb","line":365,"in_reply_to":"ba15a1d1_3b95c6e3","updated":"2015-09-14 17:27:21.000000000","message":"self.guest here uses self.domain which is a mock, not what\u0027s in fakelibvirt (it just specs the mock based on the Domain type in fakelibvirt):\n\nself.domain \u003d mock.Mock(spec\u003dfakelibvirt.virDomain)\n\nThis test passes because assertTrue is truthy.  If this were self.assertEqual(True, self.guest.is_active()) it would probably fail.  The mocked domain is just returning some mock.DEFAULT value when calling self.domain.isActive().\n\nSo while not entirely accurate, it doesn\u0027t seem to be a race condition issue with other tests using fakelibvirt.","commit_id":"4a2c3f453ee0d5f99451743204dfa362e984395d"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"309a30c807f0fcd8ec9512795308a943999f41a4","unresolved":false,"context_lines":[{"line_number":5585,"context_line":""},{"line_number":5586,"context_line":"    def _live_migration_monitor(self, context, instance, dest, post_method,"},{"line_number":5587,"context_line":"                                recover_method, block_migration,"},{"line_number":5588,"context_line":"                                migrate_data, dom, finish_event, guest):"},{"line_number":5589,"context_line":"        n \u003d 0"},{"line_number":5590,"context_line":"        while True:"},{"line_number":5591,"context_line":"            info \u003d host.DomainJobInfo.for_domain(dom)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_16e9921a","line":5588,"updated":"2015-08-10 13:33:08.000000000","message":"So we should not add new arg here but replace \u0027dom\u0027 by \u0027guest\u0027.","commit_id":"e1e0760c8a2e929767673afc61ab07cb58a7a351"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"309a30c807f0fcd8ec9512795308a943999f41a4","unresolved":false,"context_lines":[{"line_number":5608,"context_line":"                    # Leave type untouched"},{"line_number":5609,"context_line":"                else:"},{"line_number":5610,"context_line":"                    try:"},{"line_number":5611,"context_line":"                        if guest.isActive():"},{"line_number":5612,"context_line":"                            LOG.debug(\"VM running on src, migration failed\","},{"line_number":5613,"context_line":"                                      instance\u003dinstance)"},{"line_number":5614,"context_line":"                            info.type \u003d libvirt.VIR_DOMAIN_JOB_FAILED"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_363a8e99","line":5611,"updated":"2015-08-10 13:33:08.000000000","message":"A guest object is already alive is that method so no necessary to address the TODO.","commit_id":"e1e0760c8a2e929767673afc61ab07cb58a7a351"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a6a666e3d77aa1a533151a85fbdfbb561cc8cf8","unresolved":false,"context_lines":[{"line_number":5846,"context_line":"                    # Leave type untouched"},{"line_number":5847,"context_line":"                else:"},{"line_number":5848,"context_line":"                    # TODO(sahid): Should pass a guest to this method."},{"line_number":5849,"context_line":"                    guest \u003d libvirt_guest.Guest(dom)"},{"line_number":5850,"context_line":"                    try:"},{"line_number":5851,"context_line":"                        if guest.is_active():"},{"line_number":5852,"context_line":"                            LOG.debug(\"VM running on src, migration failed\","}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_5925c4ab","line":5849,"updated":"2015-09-10 20:51:21.000000000","message":"This masks the guest attribute passed to this method, what\u0027s the difference?","commit_id":"e5fb70764c6b0cb75b065d6c5b9e4b549e7b52c2"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"c04c1fdd6765d39603c5ae67f03dd985a0955c7c","unresolved":false,"context_lines":[{"line_number":5846,"context_line":"                    # Leave type untouched"},{"line_number":5847,"context_line":"                else:"},{"line_number":5848,"context_line":"                    # TODO(sahid): Should pass a guest to this method."},{"line_number":5849,"context_line":"                    guest \u003d libvirt_guest.Guest(dom)"},{"line_number":5850,"context_line":"                    try:"},{"line_number":5851,"context_line":"                        if guest.is_active():"},{"line_number":5852,"context_line":"                            LOG.debug(\"VM running on src, migration failed\","}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_cb16c3f1","line":5849,"in_reply_to":"da20952f_5925c4ab","updated":"2015-09-11 10:11:55.000000000","message":"Yeah my bad. https://review.openstack.org/#/c/206632/ was merged 15 days ago which passed a Guest object to this method and I didn\u0027t update my patch accordingly. \n\nI\u0027ll fix it.","commit_id":"e5fb70764c6b0cb75b065d6c5b9e4b549e7b52c2"}],"nova/virt/libvirt/guest.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"309a30c807f0fcd8ec9512795308a943999f41a4","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        \"\"\"Configures a new user password.\"\"\""},{"line_number":261,"context_line":"        self._domain.setUserPassword(user, new_pass, 0)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    def isActive(self):"},{"line_number":264,"context_line":"        \"Determines if the guest is currently running.\""},{"line_number":265,"context_line":"        return self._domain.isActive()"},{"line_number":266,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_9672827b","line":263,"updated":"2015-08-10 13:33:08.000000000","message":"Please use is_active(self) to keep coherence.","commit_id":"e1e0760c8a2e929767673afc61ab07cb58a7a351"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"0f460e68fa7384b92770135c4cae6f845218fa32","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        return self.get_info(host).state"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"    def is_active(self):"},{"line_number":369,"context_line":"        \"Determines if the guest is currently running.\""},{"line_number":370,"context_line":"        return self._domain.isActive()"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_9bd8921f","line":369,"updated":"2015-09-14 12:35:43.000000000","message":"s/if the guest is/whether guest is/ :)","commit_id":"4a2c3f453ee0d5f99451743204dfa362e984395d"}]}
