)]}'
{"nova/compute/resource_tracker.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f55d1d0ef09a500c5b350abb87c0ce52408da3d5","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    return False"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"def _is_trackable_migration(migration):"},{"line_number":71,"context_line":"    # Only look at resize/migrate migration and evacuation records"},{"line_number":72,"context_line":"    # NOTE(danms): RT should probably examine live migration"},{"line_number":73,"context_line":"    # records as well and do something smart. However, ignore"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_f4b18148","line":70,"updated":"2016-08-10 13:12:07.000000000","message":"@cdent: I don\u0027t like @staticmethods generally and prefer module-level functions. In this case, I\u0027d actually prefer this to be an instance method on nova.objects.Migration:\n\n def is_trackable(self):\n     return self.migration_type in (...)\n\npossibly with a @property decoration on it.\n\nbut that would have required more change than I wanted to introduce just to get the old test out of test_resource_tracker.py and into test_tracker.py...","commit_id":"2039920cab0665cd645e7e44c6e81295187ece70"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"dd8475c649105003353217d24e4137a5c989d0b4","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    return False"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"def _is_trackable_migration(migration):"},{"line_number":71,"context_line":"    # Only look at resize/migrate migration and evacuation records"},{"line_number":72,"context_line":"    # NOTE(danms): RT should probably examine live migration"},{"line_number":73,"context_line":"    # records as well and do something smart. However, ignore"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_768639dc","line":70,"updated":"2016-08-10 12:47:50.000000000","message":"Just out of curiosity what\u0027s your metric for deciding whether something like this should be module level or staticmehod?","commit_id":"2039920cab0665cd645e7e44c6e81295187ece70"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"ead6c6efaa083d492caa4027e19a70ce15d69dda","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    return False"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"def _is_trackable_migration(migration):"},{"line_number":71,"context_line":"    # Only look at resize/migrate migration and evacuation records"},{"line_number":72,"context_line":"    # NOTE(danms): RT should probably examine live migration"},{"line_number":73,"context_line":"    # records as well and do something smart. However, ignore"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_69650f44","line":70,"updated":"2016-08-15 17:47:53.000000000","message":"Could have just made this a staticmethod, but this works, too.","commit_id":"c000c45ec60283f85ad847e6221c463fa6f08185"}],"nova/tests/unit/compute/test_resource_tracker.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0c91267846bc017647ce0432b8a41a746db09b99","unresolved":false,"context_lines":[{"line_number":577,"context_line":"        self._assert(0, \u0027memory_mb_used\u0027)"},{"line_number":578,"context_line":"        self._assert(0, \u0027local_gb_used\u0027)"},{"line_number":579,"context_line":"        self._assert(0, \u0027vcpus_used\u0027)"},{"line_number":580,"context_line":"        self.assertEqual(0, len(self.tracker.tracked_migrations))"},{"line_number":581,"context_line":""},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"class ResizeClaimTestCase(_MoveClaimTestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_981f0a09","side":"PARENT","line":580,"updated":"2016-08-12 15:35:28.000000000","message":"So, while silly, this does check that the thing is called and honored. By moving this to a unit test just on the utility function, the call could be removed in the RT itself and we wouldn\u0027t notice.","commit_id":"9fff82896870be9c581abd6f556b80db371cda68"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6090ea121fb4e7cafbc99a7f47ef708292c4373d","unresolved":false,"context_lines":[{"line_number":577,"context_line":"        self._assert(0, \u0027memory_mb_used\u0027)"},{"line_number":578,"context_line":"        self._assert(0, \u0027local_gb_used\u0027)"},{"line_number":579,"context_line":"        self._assert(0, \u0027vcpus_used\u0027)"},{"line_number":580,"context_line":"        self.assertEqual(0, len(self.tracker.tracked_migrations))"},{"line_number":581,"context_line":""},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"class ResizeClaimTestCase(_MoveClaimTestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ac371cc_bc7475cf","side":"PARENT","line":580,"in_reply_to":"9ad45d7e_981f0a09","updated":"2016-08-15 13:48:43.000000000","message":"@dansmith: I have done your bidding on the next revision :)","commit_id":"9fff82896870be9c581abd6f556b80db371cda68"}],"nova/tests/unit/compute/test_tracker.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e076b676432a1b9ee83368623d821f6b12b6ea5e","unresolved":false,"context_lines":[{"line_number":1876,"context_line":"        migration \u003d objects.Migration(migration_type\u003d\u0027live-migration\u0027)"},{"line_number":1877,"context_line":"        # For same-node migrations, the RT\u0027s _get_instance_type() method is"},{"line_number":1878,"context_line":"        # called if there is a migration that is trackable. Here, we want to"},{"line_number":1879,"context_line":"        # ensure that this method isn\u0027t called for live-migration migrations."},{"line_number":1880,"context_line":"        rt._update_usage_from_migration(mock.sentinel.ctx,"},{"line_number":1881,"context_line":"                                        mock.sentinel.instance,"},{"line_number":1882,"context_line":"                                        migration)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_e23ac6cc","line":1879,"updated":"2016-08-15 13:54:14.000000000","message":"This seems more fragile and likely to stop effectively validating the thing we\u0027re actually trying to assert, which is that other types of migrations aren\u0027t tracked.","commit_id":"c000c45ec60283f85ad847e6221c463fa6f08185"}]}
