)]}'
{"nova/compute/resource_tracker.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d71e2328872d7d714321f3c4a0ca8ab4960b6496","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    def resize_claim(self, context, instance, instance_type,"},{"line_number":151,"context_line":"                     image_meta\u003dNone, limits\u003dNone):"},{"line_number":152,"context_line":"        return self._move_claim(context, instance, instance_type,"},{"line_number":153,"context_line":"                                 image_meta\u003dimage_meta, limits\u003dlimits)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _move_claim(self, context, instance, move_flavor, move_type\u003dNone,"},{"line_number":156,"context_line":"                    image_meta\u003dNone, limits\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_9db869e7","line":153,"updated":"2015-07-06 16:58:48.000000000","message":"nit: alignment","commit_id":"c513643aa950ebdbe6ad0c806ee5eac0a8be6dc0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d71e2328872d7d714321f3c4a0ca8ab4960b6496","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        return self._move_claim(context, instance, instance_type,"},{"line_number":153,"context_line":"                                 image_meta\u003dimage_meta, limits\u003dlimits)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _move_claim(self, context, instance, move_flavor, move_type\u003dNone,"},{"line_number":156,"context_line":"                    image_meta\u003dNone, limits\u003dNone):"},{"line_number":157,"context_line":"        \"\"\"Indicate that resources are needed for a move to this host."},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_2890fdeb","line":155,"updated":"2015-07-06 16:58:48.000000000","message":"I think \"new_instance_type\" is a better, more accurate variable name (throughout this file) than \"move_flavor\"","commit_id":"c513643aa950ebdbe6ad0c806ee5eac0a8be6dc0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d71e2328872d7d714321f3c4a0ca8ab4960b6496","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        :param context: security context"},{"line_number":163,"context_line":"        :param instance: instance object to reserve resources for"},{"line_number":164,"context_line":"        :param instance_type: new instance_type being resized to"},{"line_number":165,"context_line":"        :param image_meta: instance image metadata"},{"line_number":166,"context_line":"        :param move_type: the type of mig"},{"line_number":167,"context_line":"        :param limits: Dict of oversubscription limits for memory, disk,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_88e7c9ab","line":164,"updated":"2015-07-06 16:58:48.000000000","message":"s/instance_type/move_flavor/?\n\nThough, really, I think new_instance_type is a better and more accurate name for the variable...","commit_id":"c513643aa950ebdbe6ad0c806ee5eac0a8be6dc0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d71e2328872d7d714321f3c4a0ca8ab4960b6496","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        :param instance: instance object to reserve resources for"},{"line_number":164,"context_line":"        :param instance_type: new instance_type being resized to"},{"line_number":165,"context_line":"        :param image_meta: instance image metadata"},{"line_number":166,"context_line":"        :param move_type: the type of mig"},{"line_number":167,"context_line":"        :param limits: Dict of oversubscription limits for memory, disk,"},{"line_number":168,"context_line":"        and CPUs"},{"line_number":169,"context_line":"        :returns: A Claim ticket representing the reserved resources.  This"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_fddad516","line":166,"updated":"2015-07-06 16:58:48.000000000","message":"What type of data is this parameter? What are the expected allowed values? Perhaps it would be good to have an enum field on the Migration object\u0027s migration_type field?","commit_id":"c513643aa950ebdbe6ad0c806ee5eac0a8be6dc0"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8c610e077cacd1f6142d4a488d09deaf69e61df0","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        :param instance: instance object to reserve resources for"},{"line_number":164,"context_line":"        :param instance_type: new instance_type being resized to"},{"line_number":165,"context_line":"        :param image_meta: instance image metadata"},{"line_number":166,"context_line":"        :param move_type: the type of mig"},{"line_number":167,"context_line":"        :param limits: Dict of oversubscription limits for memory, disk,"},{"line_number":168,"context_line":"        and CPUs"},{"line_number":169,"context_line":"        :returns: A Claim ticket representing the reserved resources.  This"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_f7fc0640","line":166,"in_reply_to":"ba3cc151_fddad516","updated":"2015-07-07 13:10:23.000000000","message":"Done (to all above)","commit_id":"c513643aa950ebdbe6ad0c806ee5eac0a8be6dc0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"be2a1ab3f70ac5303c23fe55539113d694f63656","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"},{"line_number":150,"context_line":"    def resize_claim(self, context, instance, instance_type,"},{"line_number":151,"context_line":"                     image_meta\u003dNone, limits\u003dNone):"},{"line_number":152,"context_line":"        return self._move_claim(context, instance, instance_type,"},{"line_number":153,"context_line":"                                image_meta\u003dimage_meta, limits\u003dlimits)"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba3cc151_088a4464","line":151,"updated":"2015-07-09 06:27:25.000000000","message":"please have the doc string here","commit_id":"8341dbe178b04352e97069f8861ca065b9d3b89c"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"6f28163427388f907a83d49f6114c9e355e536a3","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"},{"line_number":150,"context_line":"    def resize_claim(self, context, instance, instance_type,"},{"line_number":151,"context_line":"                     image_meta\u003dNone, limits\u003dNone):"},{"line_number":152,"context_line":"        return self._move_claim(context, instance, instance_type,"},{"line_number":153,"context_line":"                                image_meta\u003dimage_meta, limits\u003dlimits)"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba3cc151_9aabf374","line":151,"in_reply_to":"ba3cc151_088a4464","updated":"2015-07-09 08:28:19.000000000","message":"The one that is now in _move_claim? I don\u0027t think that\u0027s where it should be. in the end we\u0027ll have two more methods like this (for evacuate and live migrate, and they will also just be calling _move_claim with different stuff passed in, so I can add a short docstring here explaining how we call _move_claim. but the general docstring should I think stay where it is","commit_id":"8341dbe178b04352e97069f8861ca065b9d3b89c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"863c19a0a7c007a1edd0bc9f6de4eaaeed1b5059","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        \"\"\"Indicate that resources are needed for a move to this host."},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        Move can be either a migrate/resize, live-migrate or an evacuate"},{"line_number":160,"context_line":"        operation."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        :param context: security context"},{"line_number":163,"context_line":"        :param instance: instance object to reserve resources for"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_e374da68","line":160,"updated":"2015-07-09 09:22:13.000000000","message":"nit : since you provide the other name for migrate (ie. resize), maybe saying \"or an evacuate/rebuild\" is worth it?","commit_id":"5e398926782ddbed9539e6712af0bf203c1b380e"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"b7c1e61f2e5dd7786bd5a323d60ff20d96eb5a48","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        \"\"\"Indicate that resources are needed for a move to this host."},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        Move can be either a migrate/resize, live-migrate or an evacuate"},{"line_number":160,"context_line":"        operation."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        :param context: security context"},{"line_number":163,"context_line":"        :param instance: instance object to reserve resources for"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_27f08066","line":160,"in_reply_to":"ba3cc151_e374da68","updated":"2015-07-09 13:38:28.000000000","message":"Done","commit_id":"5e398926782ddbed9539e6712af0bf203c1b380e"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"863c19a0a7c007a1edd0bc9f6de4eaaeed1b5059","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        :param instance_type: new instance_type being resized to"},{"line_number":165,"context_line":"        :param image_meta: instance image metadata"},{"line_number":166,"context_line":"        :param move_type: move type - can be one of \u0027migration\u0027, \u0027resize\u0027,"},{"line_number":167,"context_line":"                         \u0027live-migration\u0027, \u0027evacuate\u0027"},{"line_number":168,"context_line":"        :param limits: Dict of oversubscription limits for memory, disk,"},{"line_number":169,"context_line":"        and CPUs"},{"line_number":170,"context_line":"        :returns: A Claim ticket representing the reserved resources.  This"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_c3eaf6d7","line":167,"updated":"2015-07-09 09:22:13.000000000","message":"I just wonder if we should fence just at the beginning of the method against the enum... Something like :\n\n  if move_type not in MOVE_TYPES:\n     raise exc.InvalidMove()\n\nI can see you added migration.decide_type() but it defaults to \u0027migration\u0027 which is a bit uncomfortable to me.","commit_id":"5e398926782ddbed9539e6712af0bf203c1b380e"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"b7c1e61f2e5dd7786bd5a323d60ff20d96eb5a48","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        :param instance_type: new instance_type being resized to"},{"line_number":165,"context_line":"        :param image_meta: instance image metadata"},{"line_number":166,"context_line":"        :param move_type: move type - can be one of \u0027migration\u0027, \u0027resize\u0027,"},{"line_number":167,"context_line":"                         \u0027live-migration\u0027, \u0027evacuate\u0027"},{"line_number":168,"context_line":"        :param limits: Dict of oversubscription limits for memory, disk,"},{"line_number":169,"context_line":"        and CPUs"},{"line_number":170,"context_line":"        :returns: A Claim ticket representing the reserved resources.  This"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_0a7d436c","line":167,"in_reply_to":"ba3cc151_c3eaf6d7","updated":"2015-07-09 13:38:28.000000000","message":"well None is a valid value and if it\u0027s None than the migration type will be decided by the instance_types passed. this is also why I didn\u0027t just assign it.\n\nThis is also the response to Jay as to why there is a separate method for this.\n\nI mean - I really don\u0027t care either way guys - it\u0027s assigning a value to a field... it\u0027s beyond trivial. Just let me know how you want it done and I\u0027ll do it.","commit_id":"5e398926782ddbed9539e6712af0bf203c1b380e"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"eeb0d11e98d3ad3ffac80b9f994e05676843f968","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        migration.dest_node \u003d self.nodename"},{"line_number":215,"context_line":"        migration.dest_host \u003d self.driver.get_host_ip_addr()"},{"line_number":216,"context_line":"        migration.old_instance_type_id \u003d instance.flavor.id"},{"line_number":217,"context_line":"        migration.new_instance_type_id \u003d new_instance_type[\u0027id\u0027]"},{"line_number":218,"context_line":"        migration.status \u003d \u0027pre-migrating\u0027"},{"line_number":219,"context_line":"        migration.instance_uuid \u003d instance.uuid"},{"line_number":220,"context_line":"        migration.source_compute \u003d instance.host"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_8ed08020","line":217,"updated":"2015-07-09 15:27:30.000000000","message":"how about change to object model directly?","commit_id":"5e398926782ddbed9539e6712af0bf203c1b380e"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"3554ffa1125e9540daa2069f305a6e212b85dead","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        migration.dest_node \u003d self.nodename"},{"line_number":215,"context_line":"        migration.dest_host \u003d self.driver.get_host_ip_addr()"},{"line_number":216,"context_line":"        migration.old_instance_type_id \u003d instance.flavor.id"},{"line_number":217,"context_line":"        migration.new_instance_type_id \u003d new_instance_type[\u0027id\u0027]"},{"line_number":218,"context_line":"        migration.status \u003d \u0027pre-migrating\u0027"},{"line_number":219,"context_line":"        migration.instance_uuid \u003d instance.uuid"},{"line_number":220,"context_line":"        migration.source_compute \u003d instance.host"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_a4c1e381","line":217,"in_reply_to":"ba3cc151_8ed08020","updated":"2015-07-10 11:40:04.000000000","message":"not sure I understand the question...","commit_id":"5e398926782ddbed9539e6712af0bf203c1b380e"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"30cebeeffc233eebdd5e39d093e1c604c8d3ad9c","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        migration.dest_node \u003d self.nodename"},{"line_number":215,"context_line":"        migration.dest_host \u003d self.driver.get_host_ip_addr()"},{"line_number":216,"context_line":"        migration.old_instance_type_id \u003d instance.flavor.id"},{"line_number":217,"context_line":"        migration.new_instance_type_id \u003d new_instance_type[\u0027id\u0027]"},{"line_number":218,"context_line":"        migration.status \u003d \u0027pre-migrating\u0027"},{"line_number":219,"context_line":"        migration.instance_uuid \u003d instance.uuid"},{"line_number":220,"context_line":"        migration.source_compute \u003d instance.host"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_a76bfa1e","line":217,"in_reply_to":"ba3cc151_a4c1e381","updated":"2015-07-10 11:54:15.000000000","message":"change to new_instance_type.id .. sorry, bad english","commit_id":"5e398926782ddbed9539e6712af0bf203c1b380e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3ec16a265e69766645afd0617dd7c470ed8f83be","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"},{"line_number":151,"context_line":"    def resize_claim(self, context, instance, instance_type,"},{"line_number":152,"context_line":"                     image_meta\u003dNone, limits\u003dNone):"},{"line_number":153,"context_line":"        \"\"\"Create a claim for a resize or cold-migration move.\"\"\""},{"line_number":154,"context_line":"        return self._move_claim(context, instance, instance_type,"},{"line_number":155,"context_line":"                                image_meta\u003dimage_meta, limits\u003dlimits)"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9a41bdd9_13076e1d","line":153,"updated":"2015-07-13 08:28:22.000000000","message":"Please add the docstring here\nIn general the public methods should have the doctring","commit_id":"a3ddffbd113806104dec14586479eabbad728f42"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"089cd179395a8f56b9f469fbac0b4f145c088739","unresolved":false,"context_lines":[{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        :param context: security context"},{"line_number":165,"context_line":"        :param instance: instance object to reserve resources for"},{"line_number":166,"context_line":"        :param instance_type: new instance_type being resized to"},{"line_number":167,"context_line":"        :param image_meta: instance image metadata"},{"line_number":168,"context_line":"        :param move_type: move type - can be one of \u0027migration\u0027, \u0027resize\u0027,"},{"line_number":169,"context_line":"                         \u0027live-migration\u0027, \u0027evacuate\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a41bdd9_18cc7088","line":166,"updated":"2015-07-13 05:51:54.000000000","message":"s/instance_type/new_instance_type/\n\nFor live-migration and evacuate, there isn\u0027t new instance_type, so we expect this is None? or the instance\u0027s original instance_type? if this is original, then we shouldn\u0027t call it as new_instance_type. \n\nMaybe you already have plan, I just didn\u0027t get answer from following patchsets yet.","commit_id":"a3ddffbd113806104dec14586479eabbad728f42"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"845762b7bf496df241e38cddcf3bbf3afb5c671e","unresolved":false,"context_lines":[{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        :param context: security context"},{"line_number":165,"context_line":"        :param instance: instance object to reserve resources for"},{"line_number":166,"context_line":"        :param instance_type: new instance_type being resized to"},{"line_number":167,"context_line":"        :param image_meta: instance image metadata"},{"line_number":168,"context_line":"        :param move_type: move type - can be one of \u0027migration\u0027, \u0027resize\u0027,"},{"line_number":169,"context_line":"                         \u0027live-migration\u0027, \u0027evacuate\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a41bdd9_b63a3035","line":166,"in_reply_to":"9a41bdd9_18cc7088","updated":"2015-07-13 08:42:39.000000000","message":"so as for the docstring name - It should be renamed.\n\nas for making it a None by default - so far none of the code needs that - but it seems that the very patch I am working on right now will - so I will be adding it in a separate patch.","commit_id":"a3ddffbd113806104dec14586479eabbad728f42"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"089cd179395a8f56b9f469fbac0b4f145c088739","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        if move_type in (\u0027live-migration\u0027, \u0027evacuation\u0027):"},{"line_number":225,"context_line":"            migration.migration_type \u003d move_type"},{"line_number":226,"context_line":"        else:"},{"line_number":227,"context_line":"            migration.migration_type \u003d migration_obj._determine_migration_type("},{"line_number":228,"context_line":"                migration)"},{"line_number":229,"context_line":"        migration.create()"},{"line_number":230,"context_line":"        return migration"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a41bdd9_d38d8b7c","line":227,"updated":"2015-07-13 05:51:54.000000000","message":"emm...an private method.\n\nMaybe we can just move this in to migration.create().","commit_id":"a3ddffbd113806104dec14586479eabbad728f42"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"845762b7bf496df241e38cddcf3bbf3afb5c671e","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        if move_type in (\u0027live-migration\u0027, \u0027evacuation\u0027):"},{"line_number":225,"context_line":"            migration.migration_type \u003d move_type"},{"line_number":226,"context_line":"        else:"},{"line_number":227,"context_line":"            migration.migration_type \u003d migration_obj._determine_migration_type("},{"line_number":228,"context_line":"                migration)"},{"line_number":229,"context_line":"        migration.create()"},{"line_number":230,"context_line":"        return migration"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a41bdd9_b31482f5","line":227,"in_reply_to":"9a41bdd9_d38d8b7c","updated":"2015-07-13 08:42:39.000000000","message":"Done","commit_id":"a3ddffbd113806104dec14586479eabbad728f42"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"33327f4303c08757fcf059802f169fba956b31f1","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        return claim"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def _create_migration(self, context, instance, new_instance_type,"},{"line_number":204,"context_line":"                          move_type\u003dNone):"},{"line_number":205,"context_line":"        \"\"\"Create a migration record for the upcoming resize.  This should"},{"line_number":206,"context_line":"        be done while the COMPUTE_RESOURCES_SEMAPHORE is held so the resource"},{"line_number":207,"context_line":"        claim will not be lost if the audit process starts."}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_b0ebd0db","line":204,"range":{"start_line":204,"start_character":26,"end_line":204,"end_character":40},"updated":"2015-08-25 14:23:51.000000000","message":"So, the only reason that migration_type is nullable in the DB is because we need to account for the migrations already present before we added the field. For those migrations, they can only be resize or cold-migrate, and we can detect that based on the instance_type change (or not).\n\nCan we default this to something reasonable or just make it non-optional so that we don\u0027t run the risk of creating new records with this as nullable?","commit_id":"86507c57136e940015942320ee4cbd53515b20dc"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"9d652dd9bd002f71f5d030f109a8b906cd09bb83","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                     image_meta\u003dNone, limits\u003dNone):"},{"line_number":166,"context_line":"        \"\"\"Create a claim for a resize or cold-migration move.\"\"\""},{"line_number":167,"context_line":"        return self._move_claim(context, instance, instance_type,"},{"line_number":168,"context_line":"                                image_meta\u003dimage_meta, limits\u003dlimits)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def _move_claim(self, context, instance, new_instance_type, move_type\u003dNone,"},{"line_number":171,"context_line":"                    image_meta\u003dNone, limits\u003dNone):"}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_4a20db9b","line":168,"updated":"2015-08-27 08:36:54.000000000","message":"nit: since we know this is a resize claim, why not adding the arg move_type\u003dresize ?","commit_id":"a414212820fbf60747a94513af391063c8368826"}],"nova/objects/migration.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d71e2328872d7d714321f3c4a0ca8ab4960b6496","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        if (not self.obj_attr_is_set(\u0027id\u0027) and not"},{"line_number":121,"context_line":"                self.obj_attr_is_set(\u0027migration_type\u0027)):"},{"line_number":122,"context_line":"            self.migration_type \u003d (migration_type or"},{"line_number":123,"context_line":"                _determine_migration_type(self))"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_683cc52f","line":123,"updated":"2015-07-06 16:58:48.000000000","message":"This is really kind of an odd programming style.\n\nHow about just setting the object\u0027s migration_type attribute directly when you want to (evacuate, live-migrate, from what I can tell) and let the existing calls to _determine_migration_type() handle the other cases?","commit_id":"c513643aa950ebdbe6ad0c806ee5eac0a8be6dc0"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8c610e077cacd1f6142d4a488d09deaf69e61df0","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        if (not self.obj_attr_is_set(\u0027id\u0027) and not"},{"line_number":121,"context_line":"                self.obj_attr_is_set(\u0027migration_type\u0027)):"},{"line_number":122,"context_line":"            self.migration_type \u003d (migration_type or"},{"line_number":123,"context_line":"                _determine_migration_type(self))"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_b7ee7e89","line":123,"in_reply_to":"ba3cc151_683cc52f","updated":"2015-07-07 13:10:23.000000000","message":"Done","commit_id":"c513643aa950ebdbe6ad0c806ee5eac0a8be6dc0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"be2a1ab3f70ac5303c23fe55539113d694f63656","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                self.migration_type \u003d migration_type"},{"line_number":124,"context_line":"            else:"},{"line_number":125,"context_line":"                self.migration_type \u003d _determine_migration_type(self)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":129,"context_line":"class MigrationList(base.ObjectListBase, base.NovaObject):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba3cc151_e86a8080","line":126,"updated":"2015-07-09 06:27:25.000000000","message":"do we need an else here in the event that the above does not apply?","commit_id":"8341dbe178b04352e97069f8861ca065b9d3b89c"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"6f28163427388f907a83d49f6114c9e355e536a3","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                self.migration_type \u003d migration_type"},{"line_number":124,"context_line":"            else:"},{"line_number":125,"context_line":"                self.migration_type \u003d _determine_migration_type(self)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":129,"context_line":"class MigrationList(base.ObjectListBase, base.NovaObject):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba3cc151_5adfab0c","line":126,"in_reply_to":"ba3cc151_e86a8080","updated":"2015-07-09 08:28:19.000000000","message":"well we declare it a no-op (see doc string) if the above does not apply so I think this is appropriate","commit_id":"8341dbe178b04352e97069f8861ca065b9d3b89c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"863c19a0a7c007a1edd0bc9f6de4eaaeed1b5059","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        return objects.Instance.get_by_uuid(self._context, self.instance_uuid)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def decide_type(self, migration_type\u003dNone):"},{"line_number":119,"context_line":"        \"\"\"Set a migration type on a new object, otherwise a no-op\"\"\""},{"line_number":120,"context_line":"        if (not self.obj_attr_is_set(\u0027id\u0027) and not"},{"line_number":121,"context_line":"                self.obj_attr_is_set(\u0027migration_type\u0027)):"},{"line_number":122,"context_line":"            if migration_type in (\u0027live-migration\u0027, \u0027evacuation\u0027):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_a3c25232","line":119,"updated":"2015-07-09 09:22:13.000000000","message":"hum, _determine_migration_type() defaults migration_type field to \u0027migration\u0027 in L126, so this is not a no-op, right ?","commit_id":"5e398926782ddbed9539e6712af0bf203c1b380e"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"b7c1e61f2e5dd7786bd5a323d60ff20d96eb5a48","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        return objects.Instance.get_by_uuid(self._context, self.instance_uuid)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def decide_type(self, migration_type\u003dNone):"},{"line_number":119,"context_line":"        \"\"\"Set a migration type on a new object, otherwise a no-op\"\"\""},{"line_number":120,"context_line":"        if (not self.obj_attr_is_set(\u0027id\u0027) and not"},{"line_number":121,"context_line":"                self.obj_attr_is_set(\u0027migration_type\u0027)):"},{"line_number":122,"context_line":"            if migration_type in (\u0027live-migration\u0027, \u0027evacuation\u0027):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_4ad58b40","line":119,"in_reply_to":"ba3cc151_a3c25232","updated":"2015-07-09 13:38:28.000000000","message":"it\u0027s a no-op if the field is already set on an object","commit_id":"5e398926782ddbed9539e6712af0bf203c1b380e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"33327f4303c08757fcf059802f169fba956b31f1","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                                              reason\u003d\u0027already created\u0027)"},{"line_number":102,"context_line":"        updates \u003d self.obj_get_changes()"},{"line_number":103,"context_line":"        if \u0027migration_type\u0027 not in updates:"},{"line_number":104,"context_line":"            updates[\u0027migration_type\u0027] \u003d _determine_migration_type(self)"},{"line_number":105,"context_line":"        db_migration \u003d db.migration_create(self._context, updates)"},{"line_number":106,"context_line":"        self._from_db_object(self._context, self, db_migration)"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_f0f6288e","line":104,"updated":"2015-08-25 14:23:51.000000000","message":"I guess this is the answer to the previous concern, although it seems a little more obscure to do it here. Why can\u0027t we go ahead and set it in the RT?","commit_id":"86507c57136e940015942320ee4cbd53515b20dc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"759e27e95964e7fd700a538c495b3da7a6b87b5b","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                                              reason\u003d\u0027already created\u0027)"},{"line_number":102,"context_line":"        updates \u003d self.obj_get_changes()"},{"line_number":103,"context_line":"        if \u0027migration_type\u0027 not in updates:"},{"line_number":104,"context_line":"            updates[\u0027migration_type\u0027] \u003d _determine_migration_type(self)"},{"line_number":105,"context_line":"        db_migration \u003d db.migration_create(self._context, updates)"},{"line_number":106,"context_line":"        self._from_db_object(self._context, self, db_migration)"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_df69afbf","line":104,"in_reply_to":"fa1b9901_b9d5fbe5","updated":"2015-08-25 15:28:19.000000000","message":"Yeah, agree. I only expected that to be used for calculating the type of the old/existing migrations, hence the _ prefix.","commit_id":"86507c57136e940015942320ee4cbd53515b20dc"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"df8a836d91035d20d41900835c3c45a20e40e576","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                                              reason\u003d\u0027already created\u0027)"},{"line_number":102,"context_line":"        updates \u003d self.obj_get_changes()"},{"line_number":103,"context_line":"        if \u0027migration_type\u0027 not in updates:"},{"line_number":104,"context_line":"            updates[\u0027migration_type\u0027] \u003d _determine_migration_type(self)"},{"line_number":105,"context_line":"        db_migration \u003d db.migration_create(self._context, updates)"},{"line_number":106,"context_line":"        self._from_db_object(self._context, self, db_migration)"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_b9d5fbe5","line":104,"in_reply_to":"fa1b9901_f0f6288e","updated":"2015-08-25 15:18:17.000000000","message":"I remember now - Jay wanted me to move this here since using _determine in RT is frowned upon because of the _ .\n\nI think we should 1) raise here if it\u0027s not set 2) make _determine a class method that we can use outside and use it in the RT\n\nThoughts?","commit_id":"86507c57136e940015942320ee4cbd53515b20dc"}],"nova/tests/unit/objects/test_migration.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"be2a1ab3f70ac5303c23fe55539113d694f63656","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                                new_instance_type_id\u003d1)"},{"line_number":238,"context_line":"        mig.migration_type \u003d \u0027evacuate\u0027"},{"line_number":239,"context_line":"        mig.decide_type(\u0027live-migration\u0027)"},{"line_number":240,"context_line":"        self.assertEqual(\u0027evacuate\u0027, mig.migration_type)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"class TestMigrationObject(test_objects._LocalTest,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba3cc151_c831bca3","line":240,"updated":"2015-07-09 06:27:25.000000000","message":"this test fails","commit_id":"8341dbe178b04352e97069f8861ca065b9d3b89c"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"6f28163427388f907a83d49f6114c9e355e536a3","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                                new_instance_type_id\u003d1)"},{"line_number":238,"context_line":"        mig.migration_type \u003d \u0027evacuate\u0027"},{"line_number":239,"context_line":"        mig.decide_type(\u0027live-migration\u0027)"},{"line_number":240,"context_line":"        self.assertEqual(\u0027evacuate\u0027, mig.migration_type)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"class TestMigrationObject(test_objects._LocalTest,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba3cc151_1a8123c3","line":240,"in_reply_to":"ba3cc151_c831bca3","updated":"2015-07-09 08:28:19.000000000","message":"sigh :( - Done","commit_id":"8341dbe178b04352e97069f8861ca065b9d3b89c"}]}
