)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9bb7ec89448ecc31b74ee67e2986420b4e618079","unresolved":false,"context_lines":[{"line_number":11,"context_line":"and replaces it with a call to the corresponding method on"},{"line_number":12,"context_line":"MigrationList."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Furthers bp make-resource-tracker-use-objects"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Co-Authored-By: Paul Murray \u003cpmurray@hp.com\u003e"},{"line_number":17,"context_line":"Co-Authored-By: Alexis Lee \u003clxsli@hp.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"9aa7fdbe_65faa076","line":14,"updated":"2014-10-23 20:06:29.000000000","message":"Should just be:\n\n blueprint: make-resource-tracker-use-objects","commit_id":"1f2571b4895e520fe2e17c2cb8a81036c94320db"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"23f4b993f589618132fbfeb220b36ca4eaabafde","unresolved":false,"context_lines":[{"line_number":11,"context_line":"and replaces it with a call to the corresponding method on"},{"line_number":12,"context_line":"MigrationList."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Furthers bp make-resource-tracker-use-objects"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Co-Authored-By: Paul Murray \u003cpmurray@hp.com\u003e"},{"line_number":17,"context_line":"Co-Authored-By: Alexis Lee \u003clxsli@hp.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5a890539_0a273813","line":14,"in_reply_to":"9aa7fdbe_65faa076","updated":"2014-11-13 17:18:19.000000000","message":"Should even be Partially implements blueprint make-resource-tracker-use-objects","commit_id":"1f2571b4895e520fe2e17c2cb8a81036c94320db"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6d610b01910543073f17f8fe590da2442f84cbc9","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        self._update_usage_from_instances(resources, instances)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        # Grab all in-progress migrations:"},{"line_number":321,"context_line":"        migrations \u003d (migration_obj.MigrationList."},{"line_number":322,"context_line":"            get_in_progress_by_host_and_node("},{"line_number":323,"context_line":"                context, self.host, self.nodename))"},{"line_number":324,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_3e35eda7","line":321,"updated":"2014-08-01 17:15:00.000000000","message":"Can you convert this to the newer pattern of doing:\n\n  from nova import objects\n  ...\n  objects.MigrationList(...)","commit_id":"a50ec1ef0846cf05bc1ae5af314a5a482ec939a9"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"d02da568e09c740fd9452e0d648a74a272f7e3a2","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        self._update_usage_from_instances(resources, instances)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        # Grab all in-progress migrations:"},{"line_number":321,"context_line":"        migrations \u003d (migration_obj.MigrationList."},{"line_number":322,"context_line":"            get_in_progress_by_host_and_node("},{"line_number":323,"context_line":"                context, self.host, self.nodename))"},{"line_number":324,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_da2b9580","line":321,"in_reply_to":"1abeadc6_2fe1829a","updated":"2014-10-20 17:53:29.000000000","message":"Done","commit_id":"a50ec1ef0846cf05bc1ae5af314a5a482ec939a9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d95fe324edb764869cbf79408da9c778de7b92f5","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        self._update_usage_from_instances(resources, instances)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        # Grab all in-progress migrations:"},{"line_number":321,"context_line":"        migrations \u003d (migration_obj.MigrationList."},{"line_number":322,"context_line":"            get_in_progress_by_host_and_node("},{"line_number":323,"context_line":"                context, self.host, self.nodename))"},{"line_number":324,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_2fe1829a","line":321,"in_reply_to":"baada198_3e35eda7","updated":"2014-08-19 16:44:53.000000000","message":"+1 to what Dan said","commit_id":"a50ec1ef0846cf05bc1ae5af314a5a482ec939a9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9bb7ec89448ecc31b74ee67e2986420b4e618079","unresolved":false,"context_lines":[{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        # Grab all in-progress migrations:"},{"line_number":352,"context_line":"        migrations \u003d (objects.MigrationList.get_in_progress_by_host_and_node("},{"line_number":353,"context_line":"            context, self.host, self.nodename))"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        self._update_usage_from_migrations(context, resources, migrations)"},{"line_number":356,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa7fdbe_e52db0ff","line":353,"updated":"2014-10-23 20:06:29.000000000","message":"nit: no need for the outer parens above...","commit_id":"1f2571b4895e520fe2e17c2cb8a81036c94320db"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"23f4b993f589618132fbfeb220b36ca4eaabafde","unresolved":false,"context_lines":[{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        # Grab all in-progress migrations:"},{"line_number":352,"context_line":"        migrations \u003d (objects.MigrationList.get_in_progress_by_host_and_node("},{"line_number":353,"context_line":"            context, self.host, self.nodename))"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        self._update_usage_from_migrations(context, resources, migrations)"},{"line_number":356,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_2a223401","line":353,"in_reply_to":"9aa7fdbe_e52db0ff","updated":"2014-11-13 17:18:19.000000000","message":"+1","commit_id":"1f2571b4895e520fe2e17c2cb8a81036c94320db"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9bb7ec89448ecc31b74ee67e2986420b4e618079","unresolved":false,"context_lines":[{"line_number":622,"context_line":"                # migration referencing deleted instance"},{"line_number":623,"context_line":"                continue"},{"line_number":624,"context_line":""},{"line_number":625,"context_line":"            uuid \u003d instance[\u0027uuid\u0027]"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"            # skip migration if instance isn\u0027t in a resize state:"},{"line_number":628,"context_line":"            if not self._instance_in_resize_state(instance):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa7fdbe_05339463","line":625,"updated":"2014-10-23 20:06:29.000000000","message":"Probably good to update the above to instance.uuid, since with this patch, we are assured that migration.instance is a nova.objects.Instance object and not a dict :)","commit_id":"1f2571b4895e520fe2e17c2cb8a81036c94320db"}],"nova/tests/compute/test_resource_tracker.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e217d8ec94b818256e4be1257206100cbdd3ea7c","unresolved":false,"context_lines":[{"line_number":806,"context_line":"            # Going via the model sets default properties EG deleted_at."},{"line_number":807,"context_line":"            # It\u0027s unfortunate to depend on the SQLAlchemy model but avoids"},{"line_number":808,"context_line":"            # enumerating the default properties."},{"line_number":809,"context_line":"            migration \u003d models.Migration()"},{"line_number":810,"context_line":"            migration.update(mig_self.obj_get_changes())"},{"line_number":811,"context_line":""},{"line_number":812,"context_line":"            # Pretend the migration has been #save\u0027d"}],"source_content_type":"text/x-python","patch_set":3,"id":"7adec928_d6960c94","line":809,"updated":"2014-05-09 16:19:05.000000000","message":"Please don\u0027t do this. Use nova.tests.objects.test_migration.fake_db_migration","commit_id":"2625ef1a75ace23a58cc5fc900864202a41d6127"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"344d38239da2a17ea8942b351740428101baebce","unresolved":false,"context_lines":[{"line_number":806,"context_line":"            # Going via the model sets default properties EG deleted_at."},{"line_number":807,"context_line":"            # It\u0027s unfortunate to depend on the SQLAlchemy model but avoids"},{"line_number":808,"context_line":"            # enumerating the default properties."},{"line_number":809,"context_line":"            migration \u003d models.Migration()"},{"line_number":810,"context_line":"            migration.update(mig_self.obj_get_changes())"},{"line_number":811,"context_line":""},{"line_number":812,"context_line":"            # Pretend the migration has been #save\u0027d"}],"source_content_type":"text/x-python","patch_set":3,"id":"7adec928_3e937350","line":809,"in_reply_to":"7adec928_d6960c94","updated":"2014-05-12 11:36:12.000000000","message":"Done","commit_id":"2625ef1a75ace23a58cc5fc900864202a41d6127"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"44c3451a6f7719a6e77660c2e814780ffa5bb44b","unresolved":false,"context_lines":[{"line_number":931,"context_line":""},{"line_number":932,"context_line":"        self.tracker.update_available_resource(self.context)"},{"line_number":933,"context_line":"        claim.abort()"},{"line_number":934,"context_line":"        self._migrations.pop(instance[\u0027uuid\u0027])"},{"line_number":935,"context_line":""},{"line_number":936,"context_line":"        # only the original instance should remain, not the migration:"},{"line_number":937,"context_line":"        self._assert(src_dict[\u0027memory_mb\u0027] + FAKE_VIRT_MEMORY_OVERHEAD,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_a6a52704","line":934,"updated":"2014-06-20 20:31:15.000000000","message":"What does this line do?","commit_id":"5e8ef8a9952857a38a1707f86470a79d5255c81a"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"fb47d224506a416d3b475b5d1cc323502fc91498","unresolved":false,"context_lines":[{"line_number":931,"context_line":""},{"line_number":932,"context_line":"        self.tracker.update_available_resource(self.context)"},{"line_number":933,"context_line":"        claim.abort()"},{"line_number":934,"context_line":"        self._migrations.pop(instance[\u0027uuid\u0027])"},{"line_number":935,"context_line":""},{"line_number":936,"context_line":"        # only the original instance should remain, not the migration:"},{"line_number":937,"context_line":"        self._assert(src_dict[\u0027memory_mb\u0027] + FAKE_VIRT_MEMORY_OVERHEAD,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_3a2e68ac","line":934,"in_reply_to":"1ae5cdf2_a6a52704","updated":"2014-06-23 11:13:01.000000000","message":"This reflects the aborted claim in the list which backs the mock. It would be neater for the claim#abort call to do this but if memory serves correctly that turned out to be difficult","commit_id":"5e8ef8a9952857a38a1707f86470a79d5255c81a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d95fe324edb764869cbf79408da9c778de7b92f5","unresolved":false,"context_lines":[{"line_number":823,"context_line":"        patcher \u003d mock.patch.object(migration_obj.Migration, \u0027instance\u0027,"},{"line_number":824,"context_line":"                property(lambda _: instance, None, None, \u0027\u0027))"},{"line_number":825,"context_line":"        patcher.start()"},{"line_number":826,"context_line":"        self.addCleanup(patcher.stop)"},{"line_number":827,"context_line":""},{"line_number":828,"context_line":"    def _fake_migration_create(self, context, values\u003dNone):"},{"line_number":829,"context_line":"        instance_uuid \u003d str(uuid.uuid1())"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_0fe686b4","line":826,"updated":"2014-08-19 16:44:53.000000000","message":"I would prefer to make use of a context here rather than creating a new method for this","commit_id":"a50ec1ef0846cf05bc1ae5af314a5a482ec939a9"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"d02da568e09c740fd9452e0d648a74a272f7e3a2","unresolved":false,"context_lines":[{"line_number":823,"context_line":"        patcher \u003d mock.patch.object(migration_obj.Migration, \u0027instance\u0027,"},{"line_number":824,"context_line":"                property(lambda _: instance, None, None, \u0027\u0027))"},{"line_number":825,"context_line":"        patcher.start()"},{"line_number":826,"context_line":"        self.addCleanup(patcher.stop)"},{"line_number":827,"context_line":""},{"line_number":828,"context_line":"    def _fake_migration_create(self, context, values\u003dNone):"},{"line_number":829,"context_line":"        instance_uuid \u003d str(uuid.uuid1())"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_7a1d4966","line":826,"in_reply_to":"1abeadc6_0fe686b4","updated":"2014-10-20 17:53:29.000000000","message":"Dropped this method and used with statements around the relevant sections of code in the tests.","commit_id":"a50ec1ef0846cf05bc1ae5af314a5a482ec939a9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"960143b2a1fa679962e9b4142db5a1d4eda10c53","unresolved":false,"context_lines":[{"line_number":1044,"context_line":"        def _fake_migration_create(mig_self, ctxt):"},{"line_number":1045,"context_line":"            # Going via the model sets default properties EG deleted_at."},{"line_number":1046,"context_line":"            # It\u0027s unfortunate to depend on the SQLAlchemy model but avoids"},{"line_number":1047,"context_line":"            # enumerating the default properties."},{"line_number":1048,"context_line":"            migration \u003d test_migration.fake_db_migration("},{"line_number":1049,"context_line":"                    **mig_self.obj_get_changes())"},{"line_number":1050,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_a9e2a82c","line":1047,"updated":"2014-11-13 22:28:31.000000000","message":"Why do you even need to set those? Unless they\u0027re going to get used, you can leave them unset. I\u0027d much prefer to see you create a migration from scratch here so that it\u0027s clear what the values are.","commit_id":"1f2571b4895e520fe2e17c2cb8a81036c94320db"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9bb7ec89448ecc31b74ee67e2986420b4e618079","unresolved":false,"context_lines":[{"line_number":1057,"context_line":"            self._migrations[mig_self.instance_uuid] \u003d mig_self"},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"        self.stubs.Set(objects.Migration, \u0027create\u0027,"},{"line_number":1060,"context_line":"                       _fake_migration_create)"},{"line_number":1061,"context_line":""},{"line_number":1062,"context_line":"        self.instance \u003d self._fake_instance()"},{"line_number":1063,"context_line":"        self.instance_type \u003d self._fake_flavor_create()"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa7fdbe_85f7848a","line":1060,"updated":"2014-10-23 20:06:29.000000000","message":"You should remove the stubout of objects.Migration.create in this test case class. It\u0027s extremely confusing given the _fake_migration_create() method of the test case itself (which properly returns a nova.objects.Migration instance)","commit_id":"1f2571b4895e520fe2e17c2cb8a81036c94320db"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9bb7ec89448ecc31b74ee67e2986420b4e618079","unresolved":false,"context_lines":[{"line_number":1084,"context_line":"        migration \u003d objects.Migration()"},{"line_number":1085,"context_line":"        migration.update(mig_dict)"},{"line_number":1086,"context_line":"        # This hits the stub in setUp()"},{"line_number":1087,"context_line":"        migration.create(\u0027fake\u0027)"},{"line_number":1088,"context_line":"        return migration"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance_uuid\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa7fdbe_a5f00892","line":1087,"updated":"2014-10-23 20:06:29.000000000","message":"Get rid of this. There\u0027s no reason the unit tests should need to call create(). Just test the units of code using real nova objects.","commit_id":"1f2571b4895e520fe2e17c2cb8a81036c94320db"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"960143b2a1fa679962e9b4142db5a1d4eda10c53","unresolved":false,"context_lines":[{"line_number":1084,"context_line":"        migration \u003d objects.Migration()"},{"line_number":1085,"context_line":"        migration.update(mig_dict)"},{"line_number":1086,"context_line":"        # This hits the stub in setUp()"},{"line_number":1087,"context_line":"        migration.create(\u0027fake\u0027)"},{"line_number":1088,"context_line":"        return migration"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance_uuid\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_49c6a49b","line":1087,"in_reply_to":"9aa7fdbe_a5f00892","updated":"2014-11-13 22:28:31.000000000","message":"Yar. I expect this sort of thinking is also related to why the stub above feels the need to set all the attributes from the example model.","commit_id":"1f2571b4895e520fe2e17c2cb8a81036c94320db"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9bb7ec89448ecc31b74ee67e2986420b4e618079","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"                return_value\u003dobjects.InstancePCIRequests(requests\u003d[]))"},{"line_number":1135,"context_line":"    def test_claim_and_audit(self, mock_get):"},{"line_number":1136,"context_line":"        prop \u003d property(lambda _: self.instance, None, None, \u0027\u0027)"},{"line_number":1137,"context_line":"        with mock.patch.object(objects.Migration, \u0027instance\u0027, prop):"},{"line_number":1138,"context_line":"            self.tracker.resize_claim(self.context, self.instance,"},{"line_number":1139,"context_line":"                    self.instance_type, self.limits)"},{"line_number":1140,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa7fdbe_c5ed0cb9","line":1137,"updated":"2014-10-23 20:06:29.000000000","message":"This is not the appropriate way to mock a property (you need to use mock.PropertyMock() if you do so), but regardless, you should not need to mock anything here at all. Instead, just supply a real o","commit_id":"1f2571b4895e520fe2e17c2cb8a81036c94320db"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"23f4b993f589618132fbfeb220b36ca4eaabafde","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"                return_value\u003dobjects.InstancePCIRequests(requests\u003d[]))"},{"line_number":1135,"context_line":"    def test_claim_and_audit(self, mock_get):"},{"line_number":1136,"context_line":"        prop \u003d property(lambda _: self.instance, None, None, \u0027\u0027)"},{"line_number":1137,"context_line":"        with mock.patch.object(objects.Migration, \u0027instance\u0027, prop):"},{"line_number":1138,"context_line":"            self.tracker.resize_claim(self.context, self.instance,"},{"line_number":1139,"context_line":"                    self.instance_type, self.limits)"},{"line_number":1140,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_2a50745d","line":1137,"in_reply_to":"9aa7fdbe_c5ed0cb9","updated":"2014-11-13 17:18:19.000000000","message":"Agreed with Jay, you don\u0027t need to mock a property, just mock what you need to do","commit_id":"1f2571b4895e520fe2e17c2cb8a81036c94320db"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"23f4b993f589618132fbfeb220b36ca4eaabafde","unresolved":false,"context_lines":[{"line_number":1168,"context_line":"                dest_type, self.limits)"},{"line_number":1169,"context_line":""},{"line_number":1170,"context_line":"        prop \u003d property(lambda _: instance, None, None, \u0027\u0027)"},{"line_number":1171,"context_line":"        with mock.patch.object(objects.Migration, \u0027instance\u0027, prop):"},{"line_number":1172,"context_line":""},{"line_number":1173,"context_line":"            self._assert(src_dict[\u0027memory_mb\u0027] + dest_dict[\u0027memory_mb\u0027]"},{"line_number":1174,"context_line":"                       + 2 * FAKE_VIRT_MEMORY_OVERHEAD, \u0027memory_mb_used\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_aacb841c","line":1171,"updated":"2014-11-13 17:18:19.000000000","message":"ditto above","commit_id":"1f2571b4895e520fe2e17c2cb8a81036c94320db"}]}
