)]}'
{"nova/cmd/manage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4feba09ee292f741f0036f394bde32931b66a98","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        # Added in Rocky"},{"line_number":421,"context_line":"        instance_mapping_obj.populate_queued_for_delete,"},{"line_number":422,"context_line":"        # Added in Stein"},{"line_number":423,"context_line":"        compute_node_obj.refresh_empty_ratio,"},{"line_number":424,"context_line":"    )"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_716e2b2e","line":423,"range":{"start_line":423,"start_character":25,"end_line":423,"end_character":32},"updated":"2018-12-04 19:19:52.000000000","message":"nit: \"migrate_empty_ratio\" is probably more fitting, refresh doesn\u0027t make much sense to me for what this does.","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7404e7f457234ade0ae14774553ee049b12782e3","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        # Added in Rocky"},{"line_number":421,"context_line":"        instance_mapping_obj.populate_queued_for_delete,"},{"line_number":422,"context_line":"        # Added in Stein"},{"line_number":423,"context_line":"        compute_node_obj.refresh_empty_ratio,"},{"line_number":424,"context_line":"    )"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_912187b5","line":423,"range":{"start_line":423,"start_character":25,"end_line":423,"end_character":32},"in_reply_to":"3f79a3b5_716e2b2e","updated":"2018-12-04 19:26:25.000000000","message":"Done","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"}],"nova/objects/compute_node.py":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"642d6aaf219c28161dbffccce637aa37ed2d0216","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        for t in [\u0027cpu\u0027, \u0027disk\u0027, \u0027ram\u0027]:"},{"line_number":55,"context_line":"            r \u003d getattr(CONF, \"%s_allocation_ratio\" % t)"},{"line_number":56,"context_line":"            init_x_ratio \u003d getattr(CONF, \"initial_%s_allocation_ratio\" % t)"},{"line_number":57,"context_line":"            conf_alloc_ratio \u003d r if r else init_x_ratio"},{"line_number":58,"context_line":"            current_ratio \u003d getattr(cn, \u0027%s_allocation_ratio\u0027 % t)"},{"line_number":59,"context_line":"            if current_ratio in (0.0, None):"},{"line_number":60,"context_line":"                setattr(cn, \u0027%s_allocation_ratio\u0027 % t, conf_alloc_ratio)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_01315058","line":57,"range":{"start_line":57,"start_character":11,"end_line":57,"end_character":55},"updated":"2018-11-06 06:53:39.000000000","message":"very smart","commit_id":"fe3069fb279a0ef716c6bac23980e857f7e55db7"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"642d6aaf219c28161dbffccce637aa37ed2d0216","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    cns \u003d _get_node_empty_ratio(context, max_count)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # NOTE(yikun): If it\u0027s an existing record with 0.0 or None values,"},{"line_number":52,"context_line":"    # we need to do what the compute does, which is use the configure"},{"line_number":53,"context_line":"    # \u0027xxx_allocation_ratio\u0027 confi if it\u0027s not None, and fallback to"},{"line_number":54,"context_line":"    # using the \u0027initial_xxx_allocation_ratio\u0027 otherwise."},{"line_number":55,"context_line":"    processed \u003d 0"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_9e63bd18","line":52,"range":{"start_line":52,"start_character":19,"end_line":52,"end_character":41},"updated":"2018-11-06 06:53:39.000000000","message":"what does this mean?","commit_id":"e42a421de316a4829cc2818fd56feb8b15633d3f"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"982a116cd23b17acc2568b856cf76c1b0874bfd6","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    cns \u003d _get_node_empty_ratio(context, max_count)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # NOTE(yikun): If it\u0027s an existing record with 0.0 or None values,"},{"line_number":52,"context_line":"    # we need to do what the compute does, which is use the configure"},{"line_number":53,"context_line":"    # \u0027xxx_allocation_ratio\u0027 confi if it\u0027s not None, and fallback to"},{"line_number":54,"context_line":"    # using the \u0027initial_xxx_allocation_ratio\u0027 otherwise."},{"line_number":55,"context_line":"    processed \u003d 0"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_79427b0f","line":52,"range":{"start_line":52,"start_character":19,"end_line":52,"end_character":41},"in_reply_to":"3f79a3b5_9e63bd18","updated":"2018-11-06 07:21:30.000000000","message":"Done","commit_id":"e42a421de316a4829cc2818fd56feb8b15633d3f"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"642d6aaf219c28161dbffccce637aa37ed2d0216","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # NOTE(yikun): If it\u0027s an existing record with 0.0 or None values,"},{"line_number":52,"context_line":"    # we need to do what the compute does, which is use the configure"},{"line_number":53,"context_line":"    # \u0027xxx_allocation_ratio\u0027 confi if it\u0027s not None, and fallback to"},{"line_number":54,"context_line":"    # using the \u0027initial_xxx_allocation_ratio\u0027 otherwise."},{"line_number":55,"context_line":"    processed \u003d 0"},{"line_number":56,"context_line":"    for cn in cns:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_3e8629b9","line":53,"range":{"start_line":53,"start_character":30,"end_line":53,"end_character":34},"updated":"2018-11-06 06:53:39.000000000","message":"typo","commit_id":"e42a421de316a4829cc2818fd56feb8b15633d3f"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"982a116cd23b17acc2568b856cf76c1b0874bfd6","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # NOTE(yikun): If it\u0027s an existing record with 0.0 or None values,"},{"line_number":52,"context_line":"    # we need to do what the compute does, which is use the configure"},{"line_number":53,"context_line":"    # \u0027xxx_allocation_ratio\u0027 confi if it\u0027s not None, and fallback to"},{"line_number":54,"context_line":"    # using the \u0027initial_xxx_allocation_ratio\u0027 otherwise."},{"line_number":55,"context_line":"    processed \u003d 0"},{"line_number":56,"context_line":"    for cn in cns:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_194b4729","line":53,"range":{"start_line":53,"start_character":30,"end_line":53,"end_character":34},"in_reply_to":"3f79a3b5_3e8629b9","updated":"2018-11-06 07:21:30.000000000","message":"Done","commit_id":"e42a421de316a4829cc2818fd56feb8b15633d3f"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"642d6aaf219c28161dbffccce637aa37ed2d0216","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    # NOTE(yikun): If it\u0027s an existing record with 0.0 or None values,"},{"line_number":52,"context_line":"    # we need to do what the compute does, which is use the configure"},{"line_number":53,"context_line":"    # \u0027xxx_allocation_ratio\u0027 confi if it\u0027s not None, and fallback to"},{"line_number":54,"context_line":"    # using the \u0027initial_xxx_allocation_ratio\u0027 otherwise."},{"line_number":55,"context_line":"    processed \u003d 0"},{"line_number":56,"context_line":"    for cn in cns:"},{"line_number":57,"context_line":"        for t in [\u0027cpu\u0027, \u0027disk\u0027, \u0027ram\u0027]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_9eae5d2f","line":54,"range":{"start_line":54,"start_character":6,"end_line":54,"end_character":11},"updated":"2018-11-06 06:53:39.000000000","message":"use","commit_id":"e42a421de316a4829cc2818fd56feb8b15633d3f"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"982a116cd23b17acc2568b856cf76c1b0874bfd6","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    # NOTE(yikun): If it\u0027s an existing record with 0.0 or None values,"},{"line_number":52,"context_line":"    # we need to do what the compute does, which is use the configure"},{"line_number":53,"context_line":"    # \u0027xxx_allocation_ratio\u0027 confi if it\u0027s not None, and fallback to"},{"line_number":54,"context_line":"    # using the \u0027initial_xxx_allocation_ratio\u0027 otherwise."},{"line_number":55,"context_line":"    processed \u003d 0"},{"line_number":56,"context_line":"    for cn in cns:"},{"line_number":57,"context_line":"        for t in [\u0027cpu\u0027, \u0027disk\u0027, \u0027ram\u0027]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_39488329","line":54,"range":{"start_line":54,"start_character":6,"end_line":54,"end_character":11},"in_reply_to":"3f79a3b5_9eae5d2f","updated":"2018-11-06 07:21:30.000000000","message":"Done","commit_id":"e42a421de316a4829cc2818fd56feb8b15633d3f"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"642d6aaf219c28161dbffccce637aa37ed2d0216","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    for cn in cns:"},{"line_number":57,"context_line":"        for t in [\u0027cpu\u0027, \u0027disk\u0027, \u0027ram\u0027]:"},{"line_number":58,"context_line":"            r \u003d getattr(CONF, \"%s_allocation_ratio\" % t)"},{"line_number":59,"context_line":"            init_x_ratio \u003d getattr(CONF, \"initial_%s_allocation_ratio\" % t)"},{"line_number":60,"context_line":"            conf_alloc_ratio \u003d r if r else init_x_ratio"},{"line_number":61,"context_line":"            current_ratio \u003d getattr(cn, \u0027%s_allocation_ratio\u0027 % t)"},{"line_number":62,"context_line":"            if current_ratio in (0.0, None):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_be41d964","line":59,"range":{"start_line":59,"start_character":12,"end_line":59,"end_character":75},"updated":"2018-11-06 06:53:39.000000000","message":"does this cost much? I mean could it perform better if we load these just once outsied the loop rather than load them in each loop?","commit_id":"e42a421de316a4829cc2818fd56feb8b15633d3f"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"982a116cd23b17acc2568b856cf76c1b0874bfd6","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    for cn in cns:"},{"line_number":57,"context_line":"        for t in [\u0027cpu\u0027, \u0027disk\u0027, \u0027ram\u0027]:"},{"line_number":58,"context_line":"            r \u003d getattr(CONF, \"%s_allocation_ratio\" % t)"},{"line_number":59,"context_line":"            init_x_ratio \u003d getattr(CONF, \"initial_%s_allocation_ratio\" % t)"},{"line_number":60,"context_line":"            conf_alloc_ratio \u003d r if r else init_x_ratio"},{"line_number":61,"context_line":"            current_ratio \u003d getattr(cn, \u0027%s_allocation_ratio\u0027 % t)"},{"line_number":62,"context_line":"            if current_ratio in (0.0, None):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_79f03bdb","line":59,"range":{"start_line":59,"start_character":12,"end_line":59,"end_character":75},"in_reply_to":"3f79a3b5_be41d964","updated":"2018-11-06 07:21:30.000000000","message":"I think no, it\u0027s just var accessing cost, we already load file when we start compute service.","commit_id":"e42a421de316a4829cc2818fd56feb8b15633d3f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7404e7f457234ade0ae14774553ee049b12782e3","unresolved":false,"context_lines":[{"line_number":32,"context_line":"CONF \u003d nova.conf.CONF"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"@sa_api.pick_context_manager_reader"},{"line_number":36,"context_line":"def _get_node_empty_ratio(context, max_count):"},{"line_number":37,"context_line":"    return context.session.query(models.ComputeNode).filter(or_("},{"line_number":38,"context_line":"        models.ComputeNode.ram_allocation_ratio \u003d\u003d \u00270.0\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_4c96f8a1","line":35,"updated":"2018-12-04 19:26:25.000000000","message":"I\u0027m not sure that we need this given it\u0027s called from refresh_empty_ratio which will already set the writer session on the context.","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a119d0a967ec9568794f3b3eceb067797c02a8ff","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"@sa_api.pick_context_manager_reader"},{"line_number":36,"context_line":"def _get_node_empty_ratio(context, max_count):"},{"line_number":37,"context_line":"    return context.session.query(models.ComputeNode).filter(or_("},{"line_number":38,"context_line":"        models.ComputeNode.ram_allocation_ratio \u003d\u003d \u00270.0\u0027,"},{"line_number":39,"context_line":"        models.ComputeNode.cpu_allocation_ratio \u003d\u003d \u00270.0\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_2c7cdc72","line":36,"updated":"2018-12-04 19:27:32.000000000","message":"nit: normally these migration methods go at the bottom of the module.","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4feba09ee292f741f0036f394bde32931b66a98","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    cns \u003d _get_node_empty_ratio(context, max_count)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # NOTE(yikun): If it\u0027s an existing record with 0.0 or None values,"},{"line_number":52,"context_line":"    # we need to refresh this record, which is use the configure"},{"line_number":53,"context_line":"    # \u0027xxx_allocation_ratio\u0027 config if it\u0027s unset, and fallback to"},{"line_number":54,"context_line":"    # use the \u0027initial_xxx_allocation_ratio\u0027 otherwise."},{"line_number":55,"context_line":"    processed \u003d 0"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_d1cdbf2d","line":52,"range":{"start_line":52,"start_character":38,"end_line":52,"end_character":64},"updated":"2018-12-04 19:19:52.000000000","message":"\"using the\"","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7404e7f457234ade0ae14774553ee049b12782e3","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    cns \u003d _get_node_empty_ratio(context, max_count)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # NOTE(yikun): If it\u0027s an existing record with 0.0 or None values,"},{"line_number":52,"context_line":"    # we need to refresh this record, which is use the configure"},{"line_number":53,"context_line":"    # \u0027xxx_allocation_ratio\u0027 config if it\u0027s unset, and fallback to"},{"line_number":54,"context_line":"    # use the \u0027initial_xxx_allocation_ratio\u0027 otherwise."},{"line_number":55,"context_line":"    processed \u003d 0"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_0c048012","line":52,"range":{"start_line":52,"start_character":38,"end_line":52,"end_character":64},"in_reply_to":"3f79a3b5_d1cdbf2d","updated":"2018-12-04 19:26:25.000000000","message":"Done","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4feba09ee292f741f0036f394bde32931b66a98","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # NOTE(yikun): If it\u0027s an existing record with 0.0 or None values,"},{"line_number":52,"context_line":"    # we need to refresh this record, which is use the configure"},{"line_number":53,"context_line":"    # \u0027xxx_allocation_ratio\u0027 config if it\u0027s unset, and fallback to"},{"line_number":54,"context_line":"    # use the \u0027initial_xxx_allocation_ratio\u0027 otherwise."},{"line_number":55,"context_line":"    processed \u003d 0"},{"line_number":56,"context_line":"    for cn in cns:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_f1e1db98","line":53,"range":{"start_line":53,"start_character":44,"end_line":53,"end_character":49},"updated":"2018-12-04 19:19:52.000000000","message":"set","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7404e7f457234ade0ae14774553ee049b12782e3","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # NOTE(yikun): If it\u0027s an existing record with 0.0 or None values,"},{"line_number":52,"context_line":"    # we need to refresh this record, which is use the configure"},{"line_number":53,"context_line":"    # \u0027xxx_allocation_ratio\u0027 config if it\u0027s unset, and fallback to"},{"line_number":54,"context_line":"    # use the \u0027initial_xxx_allocation_ratio\u0027 otherwise."},{"line_number":55,"context_line":"    processed \u003d 0"},{"line_number":56,"context_line":"    for cn in cns:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_ac0a2c1c","line":53,"range":{"start_line":53,"start_character":44,"end_line":53,"end_character":49},"in_reply_to":"3f79a3b5_f1e1db98","updated":"2018-12-04 19:26:25.000000000","message":"Done","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4feba09ee292f741f0036f394bde32931b66a98","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    # we need to refresh this record, which is use the configure"},{"line_number":53,"context_line":"    # \u0027xxx_allocation_ratio\u0027 config if it\u0027s unset, and fallback to"},{"line_number":54,"context_line":"    # use the \u0027initial_xxx_allocation_ratio\u0027 otherwise."},{"line_number":55,"context_line":"    processed \u003d 0"},{"line_number":56,"context_line":"    for cn in cns:"},{"line_number":57,"context_line":"        for t in [\u0027cpu\u0027, \u0027disk\u0027, \u0027ram\u0027]:"},{"line_number":58,"context_line":"            r \u003d getattr(CONF, \"%s_allocation_ratio\" % t)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_318d13da","line":55,"updated":"2018-12-04 19:19:52.000000000","message":"Do we even need this? Can\u0027t we just use len(cns)?","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7404e7f457234ade0ae14774553ee049b12782e3","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    # we need to refresh this record, which is use the configure"},{"line_number":53,"context_line":"    # \u0027xxx_allocation_ratio\u0027 config if it\u0027s unset, and fallback to"},{"line_number":54,"context_line":"    # use the \u0027initial_xxx_allocation_ratio\u0027 otherwise."},{"line_number":55,"context_line":"    processed \u003d 0"},{"line_number":56,"context_line":"    for cn in cns:"},{"line_number":57,"context_line":"        for t in [\u0027cpu\u0027, \u0027disk\u0027, \u0027ram\u0027]:"},{"line_number":58,"context_line":"            r \u003d getattr(CONF, \"%s_allocation_ratio\" % t)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_cc05280f","line":55,"in_reply_to":"3f79a3b5_318d13da","updated":"2018-12-04 19:26:25.000000000","message":"Done","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4feba09ee292f741f0036f394bde32931b66a98","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    processed \u003d 0"},{"line_number":56,"context_line":"    for cn in cns:"},{"line_number":57,"context_line":"        for t in [\u0027cpu\u0027, \u0027disk\u0027, \u0027ram\u0027]:"},{"line_number":58,"context_line":"            r \u003d getattr(CONF, \"%s_allocation_ratio\" % t)"},{"line_number":59,"context_line":"            init_x_ratio \u003d getattr(CONF, \"initial_%s_allocation_ratio\" % t)"},{"line_number":60,"context_line":"            conf_alloc_ratio \u003d r if r else init_x_ratio"},{"line_number":61,"context_line":"            current_ratio \u003d getattr(cn, \u0027%s_allocation_ratio\u0027 % t)"},{"line_number":62,"context_line":"            if current_ratio in (0.0, None):"},{"line_number":63,"context_line":"                setattr(cn, \u0027%s_allocation_ratio\u0027 % t, conf_alloc_ratio)"},{"line_number":64,"context_line":"        context.session.add(cn)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_51b9af78","line":61,"range":{"start_line":58,"start_character":12,"end_line":61,"end_character":66},"updated":"2018-12-04 19:19:52.000000000","message":"This could all move inside the if condition on L62.","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7404e7f457234ade0ae14774553ee049b12782e3","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    processed \u003d 0"},{"line_number":56,"context_line":"    for cn in cns:"},{"line_number":57,"context_line":"        for t in [\u0027cpu\u0027, \u0027disk\u0027, \u0027ram\u0027]:"},{"line_number":58,"context_line":"            r \u003d getattr(CONF, \"%s_allocation_ratio\" % t)"},{"line_number":59,"context_line":"            init_x_ratio \u003d getattr(CONF, \"initial_%s_allocation_ratio\" % t)"},{"line_number":60,"context_line":"            conf_alloc_ratio \u003d r if r else init_x_ratio"},{"line_number":61,"context_line":"            current_ratio \u003d getattr(cn, \u0027%s_allocation_ratio\u0027 % t)"},{"line_number":62,"context_line":"            if current_ratio in (0.0, None):"},{"line_number":63,"context_line":"                setattr(cn, \u0027%s_allocation_ratio\u0027 % t, conf_alloc_ratio)"},{"line_number":64,"context_line":"        context.session.add(cn)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_6c141443","line":61,"range":{"start_line":58,"start_character":12,"end_line":61,"end_character":66},"in_reply_to":"3f79a3b5_51b9af78","updated":"2018-12-04 19:26:25.000000000","message":"Done","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"379dd4dcb163b096f5a333c5b423e0fa3bc9d295","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        models.ComputeNode.ram_allocation_ratio \u003d\u003d null(),"},{"line_number":484,"context_line":"        models.ComputeNode.cpu_allocation_ratio \u003d\u003d null(),"},{"line_number":485,"context_line":"        models.ComputeNode.disk_allocation_ratio \u003d\u003d null()"},{"line_number":486,"context_line":"    )).limit(max_count).all()"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"@sa_api.pick_context_manager_writer"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_6bd382d5","line":486,"updated":"2018-12-05 15:39:22.000000000","message":"Note this will migrate deleted records as well. That is fine, but more work that may not really be useful...","commit_id":"87171f1f01084a0f335ba53bdf25faa6d0cdd071"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"368bb20890057459eb7589a38429ea58f5f7d75e","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        models.ComputeNode.ram_allocation_ratio \u003d\u003d null(),"},{"line_number":484,"context_line":"        models.ComputeNode.cpu_allocation_ratio \u003d\u003d null(),"},{"line_number":485,"context_line":"        models.ComputeNode.disk_allocation_ratio \u003d\u003d null()"},{"line_number":486,"context_line":"    )).limit(max_count).all()"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"@sa_api.pick_context_manager_writer"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_ebb6b28c","line":486,"in_reply_to":"3f79a3b5_6bd382d5","updated":"2018-12-05 15:41:27.000000000","message":"True, good catch, I can add a deleted filter on this.","commit_id":"87171f1f01084a0f335ba53bdf25faa6d0cdd071"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d9338bcd13c6161f42330a5167dfd3023f231f6b","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        models.ComputeNode.ram_allocation_ratio \u003d\u003d null(),"},{"line_number":484,"context_line":"        models.ComputeNode.cpu_allocation_ratio \u003d\u003d null(),"},{"line_number":485,"context_line":"        models.ComputeNode.disk_allocation_ratio \u003d\u003d null()"},{"line_number":486,"context_line":"    )).limit(max_count).all()"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"@sa_api.pick_context_manager_writer"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_618de134","line":486,"in_reply_to":"3f79a3b5_ebb6b28c","updated":"2018-12-05 16:36:44.000000000","message":"Done","commit_id":"87171f1f01084a0f335ba53bdf25faa6d0cdd071"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"379dd4dcb163b096f5a333c5b423e0fa3bc9d295","unresolved":false,"context_lines":[{"line_number":503,"context_line":"                conf_alloc_ratio \u003d r if r else init_x_ratio"},{"line_number":504,"context_line":"                setattr(cn, \u0027%s_allocation_ratio\u0027 % t, conf_alloc_ratio)"},{"line_number":505,"context_line":"        context.session.add(cn)"},{"line_number":506,"context_line":"    return (len(cns),) * 2"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_0bc52e09","line":506,"updated":"2018-12-05 15:39:22.000000000","message":"This seems oddly obscure to me. I had to type it into a python REPL shell to remember what the behavior would be...","commit_id":"87171f1f01084a0f335ba53bdf25faa6d0cdd071"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"368bb20890057459eb7589a38429ea58f5f7d75e","unresolved":false,"context_lines":[{"line_number":503,"context_line":"                conf_alloc_ratio \u003d r if r else init_x_ratio"},{"line_number":504,"context_line":"                setattr(cn, \u0027%s_allocation_ratio\u0027 % t, conf_alloc_ratio)"},{"line_number":505,"context_line":"        context.session.add(cn)"},{"line_number":506,"context_line":"    return (len(cns),) * 2"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_4b9d66fb","line":506,"in_reply_to":"3f79a3b5_0bc52e09","updated":"2018-12-05 15:41:27.000000000","message":"Heh, that\u0027s my fault. I\u0027ll expand it for readability.","commit_id":"87171f1f01084a0f335ba53bdf25faa6d0cdd071"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d9338bcd13c6161f42330a5167dfd3023f231f6b","unresolved":false,"context_lines":[{"line_number":503,"context_line":"                conf_alloc_ratio \u003d r if r else init_x_ratio"},{"line_number":504,"context_line":"                setattr(cn, \u0027%s_allocation_ratio\u0027 % t, conf_alloc_ratio)"},{"line_number":505,"context_line":"        context.session.add(cn)"},{"line_number":506,"context_line":"    return (len(cns),) * 2"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_818a7d1b","line":506,"in_reply_to":"3f79a3b5_4b9d66fb","updated":"2018-12-05 16:36:44.000000000","message":"Done","commit_id":"87171f1f01084a0f335ba53bdf25faa6d0cdd071"}],"nova/tests/functional/db/test_compute_node.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4feba09ee292f741f0036f394bde32931b66a98","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            self.assertEqual(CONF.initial_ram_allocation_ratio,"},{"line_number":191,"context_line":"                             cn[\u0027ram_allocation_ratio\u0027])"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def test_refresh_empty_ratio(self):"},{"line_number":194,"context_line":"        self.flags(cpu_allocation_ratio\u003d32.0)"},{"line_number":195,"context_line":"        self.flags(ram_allocation_ratio\u003d3.0)"},{"line_number":196,"context_line":"        self.flags(disk_allocation_ratio\u003d2.0)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_d1693ff5","line":193,"range":{"start_line":193,"start_character":8,"end_line":193,"end_character":32},"updated":"2018-12-04 19:19:52.000000000","message":"We probably don\u0027t need this test *and* test_refresh_empty_ratio_limit, so just combine them (I\u0027d probably just remove this test, and rename test_refresh_empty_ratio_limit to test_refresh_empty_ratio).","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7404e7f457234ade0ae14774553ee049b12782e3","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            self.assertEqual(CONF.initial_ram_allocation_ratio,"},{"line_number":191,"context_line":"                             cn[\u0027ram_allocation_ratio\u0027])"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def test_refresh_empty_ratio(self):"},{"line_number":194,"context_line":"        self.flags(cpu_allocation_ratio\u003d32.0)"},{"line_number":195,"context_line":"        self.flags(ram_allocation_ratio\u003d3.0)"},{"line_number":196,"context_line":"        self.flags(disk_allocation_ratio\u003d2.0)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_0c1d6060","line":193,"range":{"start_line":193,"start_character":8,"end_line":193,"end_character":32},"in_reply_to":"3f79a3b5_d1693ff5","updated":"2018-12-04 19:26:25.000000000","message":"Done","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4feba09ee292f741f0036f394bde32931b66a98","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        cns \u003d db.compute_node_get_all(self.context)"},{"line_number":252,"context_line":"        for cn in cns:"},{"line_number":253,"context_line":"            self.assertEqual(cn[\u0027cpu_allocation_ratio\u0027], 32.0)"},{"line_number":254,"context_line":"            self.assertEqual(cn[\u0027ram_allocation_ratio\u0027], 4.0)"},{"line_number":255,"context_line":"            self.assertEqual(cn[\u0027disk_allocation_ratio\u0027], 3.0)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def test_refresh_empty_ratio_limit(self):"},{"line_number":258,"context_line":"        # we have 5 records to process"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_515e8f50","line":255,"range":{"start_line":253,"start_character":12,"end_line":255,"end_character":62},"updated":"2018-12-04 19:19:52.000000000","message":"nit: swap the arguments because the signature is:\n\nassertEqual(expected, actual)\n\nIt matters for the MismatchError output if the assertion fails.","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7404e7f457234ade0ae14774553ee049b12782e3","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        cns \u003d db.compute_node_get_all(self.context)"},{"line_number":252,"context_line":"        for cn in cns:"},{"line_number":253,"context_line":"            self.assertEqual(cn[\u0027cpu_allocation_ratio\u0027], 32.0)"},{"line_number":254,"context_line":"            self.assertEqual(cn[\u0027ram_allocation_ratio\u0027], 4.0)"},{"line_number":255,"context_line":"            self.assertEqual(cn[\u0027disk_allocation_ratio\u0027], 3.0)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def test_refresh_empty_ratio_limit(self):"},{"line_number":258,"context_line":"        # we have 5 records to process"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_ec4ee46b","line":255,"range":{"start_line":253,"start_character":12,"end_line":255,"end_character":62},"in_reply_to":"3f79a3b5_515e8f50","updated":"2018-12-04 19:26:25.000000000","message":"Done","commit_id":"7e26ac24544219ee1cd36bfb6324b40a906c2447"}]}
