)]}'
{"nova/virt/hardware.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"393af8289024247aec260a9cd6bd7ac9be0a6642","unresolved":false,"context_lines":[{"line_number":930,"context_line":"    return instance_cell"},{"line_number":931,"context_line":""},{"line_number":932,"context_line":""},{"line_number":933,"context_line":"def _get_flavor_image_meta(key, flavor, image_meta):"},{"line_number":934,"context_line":"    \"\"\"Extract both flavor- and image-based variants of metadata.\"\"\""},{"line_number":935,"context_line":"    flavor_key \u003d key"},{"line_number":936,"context_line":"    image_key \u003d key.replace(\u0027:\u0027, \u0027_\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_c561e73a","line":933,"updated":"2016-10-14 12:06:45.000000000","message":"We should just pass the key without the prefix.","commit_id":"3992c9c46d451aadf0c5ee9e8a1199fcaf4679d9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0189153de48e2cf3b6e11cb08643d2a3d9a8c793","unresolved":false,"context_lines":[{"line_number":930,"context_line":"    return instance_cell"},{"line_number":931,"context_line":""},{"line_number":932,"context_line":""},{"line_number":933,"context_line":"def _get_flavor_image_meta(key, flavor, image_meta):"},{"line_number":934,"context_line":"    \"\"\"Extract both flavor- and image-based variants of metadata.\"\"\""},{"line_number":935,"context_line":"    flavor_key \u003d key"},{"line_number":936,"context_line":"    image_key \u003d key.replace(\u0027:\u0027, \u0027_\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_4115c4e2","line":933,"in_reply_to":"fa6399be_1534eedb","updated":"2016-10-14 14:43:55.000000000","message":"Good call. Done.","commit_id":"3992c9c46d451aadf0c5ee9e8a1199fcaf4679d9"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"06dc5891a46e45cbca8da60df0929fa631744cc5","unresolved":false,"context_lines":[{"line_number":930,"context_line":"    return instance_cell"},{"line_number":931,"context_line":""},{"line_number":932,"context_line":""},{"line_number":933,"context_line":"def _get_flavor_image_meta(key, flavor, image_meta):"},{"line_number":934,"context_line":"    \"\"\"Extract both flavor- and image-based variants of metadata.\"\"\""},{"line_number":935,"context_line":"    flavor_key \u003d key"},{"line_number":936,"context_line":"    image_key \u003d key.replace(\u0027:\u0027, \u0027_\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_1534eedb","line":933,"in_reply_to":"fa6399be_c561e73a","updated":"2016-10-14 13:04:05.000000000","message":"+1","commit_id":"3992c9c46d451aadf0c5ee9e8a1199fcaf4679d9"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"393af8289024247aec260a9cd6bd7ac9be0a6642","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"    flavor_mask, image_mask \u003d _get_flavor_image_meta("},{"line_number":1135,"context_line":"        \u0027hw:cpu_realtime_mask\u0027, flavor, image)"},{"line_number":1136,"context_line":""},{"line_number":1137,"context_line":"    # TODO(sfinucan): We should probably raise an error here if the"},{"line_number":1138,"context_line":"    # incorrectly attempted to override the admin-set image mask with"},{"line_number":1139,"context_line":"    # their own. If nothing else, explain what\u0027s happening."},{"line_number":1140,"context_line":"    return image_mask or flavor_mask"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_65d01bf7","line":1137,"updated":"2016-10-14 12:06:45.000000000","message":"It\u0027s not something we want to do. An image might have some requirements related to the vCPUs running RT. Admin set in flavor a basic mask only.","commit_id":"3992c9c46d451aadf0c5ee9e8a1199fcaf4679d9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0189153de48e2cf3b6e11cb08643d2a3d9a8c793","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"    flavor_mask, image_mask \u003d _get_flavor_image_meta("},{"line_number":1135,"context_line":"        \u0027hw:cpu_realtime_mask\u0027, flavor, image)"},{"line_number":1136,"context_line":""},{"line_number":1137,"context_line":"    # TODO(sfinucan): We should probably raise an error here if the"},{"line_number":1138,"context_line":"    # incorrectly attempted to override the admin-set image mask with"},{"line_number":1139,"context_line":"    # their own. If nothing else, explain what\u0027s happening."},{"line_number":1140,"context_line":"    return image_mask or flavor_mask"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_61856858","line":1137,"in_reply_to":"fa6399be_65d01bf7","updated":"2016-10-14 14:43:55.000000000","message":"Done","commit_id":"3992c9c46d451aadf0c5ee9e8a1199fcaf4679d9"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"06dc5891a46e45cbca8da60df0929fa631744cc5","unresolved":false,"context_lines":[{"line_number":1299,"context_line":"                cpu_thread_policy\u003dcpu_thread_policy)"},{"line_number":1300,"context_line":"        numa_topology \u003d objects.InstanceNUMATopology(cells\u003d[single_cell])"},{"line_number":1301,"context_line":""},{"line_number":1302,"context_line":"    return numa_topology"},{"line_number":1303,"context_line":""},{"line_number":1304,"context_line":""},{"line_number":1305,"context_line":"def numa_fit_instance_to_host("}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_b5f502ee","line":1302,"updated":"2016-10-14 13:04:05.000000000","message":"I think we should not put it here. Will be better to left it in \u0027_add_cpu_pinning_constraint\u0027 because method \u0027numa_get_constraints\u0027 became too long","commit_id":"3992c9c46d451aadf0c5ee9e8a1199fcaf4679d9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0189153de48e2cf3b6e11cb08643d2a3d9a8c793","unresolved":false,"context_lines":[{"line_number":1299,"context_line":"                cpu_thread_policy\u003dcpu_thread_policy)"},{"line_number":1300,"context_line":"        numa_topology \u003d objects.InstanceNUMATopology(cells\u003d[single_cell])"},{"line_number":1301,"context_line":""},{"line_number":1302,"context_line":"    return numa_topology"},{"line_number":1303,"context_line":""},{"line_number":1304,"context_line":""},{"line_number":1305,"context_line":"def numa_fit_instance_to_host("}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_81327ca5","line":1302,"in_reply_to":"fa6399be_b5f502ee","updated":"2016-10-14 14:43:55.000000000","message":"I disagree :) While this does make the function longer, the way it was split up before was nonsensical and didn\u0027t actually encapsulate anything meaningful. You can see this yourself by moving \u0027_add_cpu_pinning_constraint\u0027 down below this function and delete about 10 lines - you\u0027ll get a less consise version of what we have here.","commit_id":"3992c9c46d451aadf0c5ee9e8a1199fcaf4679d9"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"eb6b6dbb4438ed06af7bd794fa3dc1cfad5c578d","unresolved":false,"context_lines":[{"line_number":1266,"context_line":"        # We currently support same pagesize for all cells."},{"line_number":1267,"context_line":"        [setattr(c, \u0027pagesize\u0027, pagesize) for c in numa_topology.cells]"},{"line_number":1268,"context_line":""},{"line_number":1269,"context_line":"    cpu_policy \u003d _get_cpu_policy_constraints(flavor, image_meta)"},{"line_number":1270,"context_line":"    cpu_thread_policy \u003d _get_cpu_thread_policy_constraints(flavor, image_meta)"},{"line_number":1271,"context_line":"    rt_mask \u003d _get_realtime_mask(flavor, image_meta)"},{"line_number":1272,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_7266e3bb","line":1269,"updated":"2016-10-17 13:09:20.000000000","message":"Please do not mix changes. As I indicated to you before, you should just implement and use the method \u0027_get_flavor_image_meta\u0027 in that commit.\n\nget_flavor_image_meta is a method which will be used by several methods which do not have relation. so first you implement and use that method then you factorize the code of cpu_pinning_constraints","commit_id":"e4b1ac4d4f588435c962a9114a93416698f11a21"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"7371cbae60b5b2f84454ff19c6475d38ca576db7","unresolved":false,"context_lines":[{"line_number":1285,"context_line":"    if cpu_policy \u003d\u003d fields.CPUAllocationPolicy.SHARED:"},{"line_number":1286,"context_line":"        if cpu_thread_policy:"},{"line_number":1287,"context_line":"            raise exception.CPUThreadPolicyConfigurationInvalid()"},{"line_number":1288,"context_line":"        return numa_topology"},{"line_number":1289,"context_line":""},{"line_number":1290,"context_line":"    if numa_topology:"},{"line_number":1291,"context_line":"        for cell in numa_topology.cells:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa6399be_4c644d21","line":1288,"updated":"2016-10-20 15:07:00.000000000","message":"(not related to this change) We should probably think more of what we should do on such case. So the user/admin especially set \u0027cpu_policy \u003d shared\u0027 which is the default but don\u0027t we have to create a topology in such case ? there are several other places like that.\n\nThe gain is to have such instances filtered/scheduled by the numa topology filter and well fitted on host topology","commit_id":"4ea356391302f6407e1e5a0d2ae22866481f117f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a9582faee7ab4473468d2407e7940f747e570718","unresolved":false,"context_lines":[{"line_number":1278,"context_line":"    if cpu_policy \u003d\u003d fields.CPUAllocationPolicy.SHARED:"},{"line_number":1279,"context_line":"        if cpu_thread_policy:"},{"line_number":1280,"context_line":"            raise exception.CPUThreadPolicyConfigurationInvalid()"},{"line_number":1281,"context_line":"        return numa_topology"},{"line_number":1282,"context_line":""},{"line_number":1283,"context_line":"    if numa_topology:"},{"line_number":1284,"context_line":"        for cell in numa_topology.cells:"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_645f980e","line":1281,"updated":"2016-11-24 16:57:52.000000000","message":"Nit: I quite like keeping to a single return, where possible, as its easier to see the structure of the code. That does mean a bit more indent, but that seems OK.","commit_id":"58db7d9c9e4d5508f84aaa60ab5abbf78c719033"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"aa089313bed74a553e7334c6734580d46e3c2a6b","unresolved":false,"context_lines":[{"line_number":1278,"context_line":"    if cpu_policy \u003d\u003d fields.CPUAllocationPolicy.SHARED:"},{"line_number":1279,"context_line":"        if cpu_thread_policy:"},{"line_number":1280,"context_line":"            raise exception.CPUThreadPolicyConfigurationInvalid()"},{"line_number":1281,"context_line":"        return numa_topology"},{"line_number":1282,"context_line":""},{"line_number":1283,"context_line":"    if numa_topology:"},{"line_number":1284,"context_line":"        for cell in numa_topology.cells:"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_890d9792","line":1281,"in_reply_to":"5a74a57a_645f980e","updated":"2016-11-25 10:01:13.000000000","message":"Yes it\u0027s true we should change that","commit_id":"58db7d9c9e4d5508f84aaa60ab5abbf78c719033"}]}
