)]}'
{"cinder/openstack/common/scheduler/base_weight.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"bffcbe4e383c995b40ffbac554f46c0d1a69d175","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from cinder.openstack.common.scheduler import base_handler"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def normalize(weight_list, minval\u003dNone, maxval\u003dNone):"},{"line_number":28,"context_line":"    \"\"\"Normalize the values in a list between 0 and 1.0."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    The normalization is made regarding the lower and upper values present in"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_a60b2d7c","line":27,"updated":"2015-02-27 10:41:51.000000000","message":"To be able to handle floag(inf) correctly, this normalize() method can be altered a bit.","commit_id":"e149261804a7fa61fc17c8deb2b6ea7c36039911"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"4b1ba0d15e3ca5fa1dfd9917eeb292eaa547cb35","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from cinder.openstack.common.scheduler import base_handler"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def normalize(weight_list, minval\u003dNone, maxval\u003dNone):"},{"line_number":28,"context_line":"    \"\"\"Normalize the values in a list between 0 and 1.0."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    The normalization is made regarding the lower and upper values present in"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_6ae497ac","line":27,"in_reply_to":"ba7be1f8_a60b2d7c","updated":"2015-02-27 11:51:56.000000000","message":"Huang, good comments, but we need to change it in oslo-incubator first to land it in Cinder","commit_id":"e149261804a7fa61fc17c8deb2b6ea7c36039911"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"bffcbe4e383c995b40ffbac554f46c0d1a69d175","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    If all the values are equal, they are normalized to 0."},{"line_number":35,"context_line":"    \"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    if not weight_list:"},{"line_number":38,"context_line":"        return ()"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_e6244510","line":36,"updated":"2015-02-27 10:41:51.000000000","message":"copy_list \u003d weight_list.copy()\n    inf_cnt \u003d 0\n    if maxval is None:\n        maxval \u003d max(weight_list)\n        while maxval \u003d\u003d float(inf):\n            inf_cnt+\u003d1\n            # remove inf\n            copy_list.pop(maxval)\n            maxval \u003d max(copy_list)\n        \n        while inf_cnt\u003e0:\n            # replace inf with the 2nd/3rd/4th... biggest value+1\n            copy_list.push(maxval+1)\n            inf_cnt-\u003d1","commit_id":"e149261804a7fa61fc17c8deb2b6ea7c36039911"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"bffcbe4e383c995b40ffbac554f46c0d1a69d175","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    If all the values are equal, they are normalized to 0."},{"line_number":35,"context_line":"    \"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    if not weight_list:"},{"line_number":38,"context_line":"        return ()"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_c61021ab","line":36,"updated":"2015-02-27 10:41:51.000000000","message":"if not weight_list:\n        return ()","commit_id":"e149261804a7fa61fc17c8deb2b6ea7c36039911"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"d7334b264c290bde8d3953705b5f745275b0d5ab","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    If all the values are equal, they are normalized to 0."},{"line_number":35,"context_line":"    \"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    if not weight_list:"},{"line_number":38,"context_line":"        return ()"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_76cd5286","line":36,"in_reply_to":"ba7be1f8_e6244510","updated":"2015-02-27 16:28:33.000000000","message":"I have opened a bug against incubator for this:  https://bugs.launchpad.net/oslo-incubator/+bug/1426437  Will see if we can get it fixed.","commit_id":"e149261804a7fa61fc17c8deb2b6ea7c36039911"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"bffcbe4e383c995b40ffbac554f46c0d1a69d175","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    if maxval is None:"},{"line_number":41,"context_line":"        maxval \u003d max(weight_list)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    if minval is None:"},{"line_number":44,"context_line":"        minval \u003d min(weight_list)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    maxval \u003d float(maxval)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_06223901","line":43,"updated":"2015-02-27 10:41:51.000000000","message":"minval will have to do same as maxval","commit_id":"e149261804a7fa61fc17c8deb2b6ea7c36039911"}],"cinder/scheduler/weights/capacity.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"bffcbe4e383c995b40ffbac554f46c0d1a69d175","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            # NOTE(jsbryant): Can\u0027t use \u0027else float(inf)\u0027 as originally coded"},{"line_number":84,"context_line":"            # here as it breaks the normalization code in the oslo.scheduler,"},{"line_number":85,"context_line":"            # need to use a very large number instead."},{"line_number":86,"context_line":"            free \u003d -1 if CONF.capacity_weight_multiplier \u003e 0 else 99999999999"},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            total \u003d float(total_space)"},{"line_number":89,"context_line":"            if host_state.thin_provisioning_support:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_861629a6","line":86,"updated":"2015-02-27 10:41:51.000000000","message":"99,999,999,999 may not be big enough if some backend reports a capacity larger than 93ZB... How unlikely it can be, this can still be a timed bomb.","commit_id":"e149261804a7fa61fc17c8deb2b6ea7c36039911"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"4b1ba0d15e3ca5fa1dfd9917eeb292eaa547cb35","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            # NOTE(jsbryant): Can\u0027t use \u0027else float(inf)\u0027 as originally coded"},{"line_number":84,"context_line":"            # here as it breaks the normalization code in the oslo.scheduler,"},{"line_number":85,"context_line":"            # need to use a very large number instead."},{"line_number":86,"context_line":"            free \u003d -1 if CONF.capacity_weight_multiplier \u003e 0 else 99999999999"},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            total \u003d float(total_space)"},{"line_number":89,"context_line":"            if host_state.thin_provisioning_support:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_2a88dfc5","line":86,"in_reply_to":"ba7be1f8_861629a6","updated":"2015-02-27 11:51:56.000000000","message":"Could we use here something like int.max_val or float.max_val?","commit_id":"e149261804a7fa61fc17c8deb2b6ea7c36039911"}]}
