)]}'
{"nova/scheduler/client/report.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8218c10d8bc4ff80b531d7492eaa501a6880d82c","unresolved":false,"context_lines":[{"line_number":90,"context_line":"def _convert_mb_to_ceil_gb(mb_value):"},{"line_number":91,"context_line":"    gb_int \u003d 0"},{"line_number":92,"context_line":"    if mb_value:"},{"line_number":93,"context_line":"        gb_float \u003d mb_value / 1024.0"},{"line_number":94,"context_line":"        # ensure we reserve/allocate enough space by rounding up to nearest GB"},{"line_number":95,"context_line":"        gb_int \u003d int(math.ceil(gb_float))"},{"line_number":96,"context_line":"    return gb_int"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a461143_3847a978","line":93,"range":{"start_line":93,"start_character":30,"end_line":93,"end_character":36},"updated":"2017-02-02 21:05:58.000000000","message":"Okay, thanks to that float, it\u0027s both working on py2 and py3.","commit_id":"c2e1133be15254747c207cce7805bf56f3cca6fa"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8218c10d8bc4ff80b531d7492eaa501a6880d82c","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    if mb_value:"},{"line_number":93,"context_line":"        gb_float \u003d mb_value / 1024.0"},{"line_number":94,"context_line":"        # ensure we reserve/allocate enough space by rounding up to nearest GB"},{"line_number":95,"context_line":"        gb_int \u003d int(math.ceil(gb_float))"},{"line_number":96,"context_line":"    return gb_int"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a461143_782051b1","line":95,"range":{"start_line":95,"start_character":17,"end_line":95,"end_character":21},"updated":"2017-02-02 21:05:58.000000000","message":"and thanks to that, it also works even if math.ceil returns a float in py2 while it returns an int in py3.\n\nAll good.","commit_id":"c2e1133be15254747c207cce7805bf56f3cca6fa"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8218c10d8bc4ff80b531d7492eaa501a6880d82c","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    # It would be better to claim disk in MB, but that is hard now."},{"line_number":153,"context_line":"    swap_in_gb \u003d _convert_mb_to_ceil_gb(instance.flavor.swap)"},{"line_number":154,"context_line":"    disk \u003d ((0 if is_bfv else instance.flavor.root_gb) +"},{"line_number":155,"context_line":"            swap_in_gb + instance.flavor.ephemeral_gb)"},{"line_number":156,"context_line":"    alloc_dict \u003d {"},{"line_number":157,"context_line":"        MEMORY_MB: instance.flavor.memory_mb,"},{"line_number":158,"context_line":"        VCPU: instance.flavor.vcpus,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a461143_18358d45","line":155,"updated":"2017-02-02 21:05:58.000000000","message":"So, new allocations will be good. But how can we make sure that previous allocations are removed lately?","commit_id":"c2e1133be15254747c207cce7805bf56f3cca6fa"}],"nova/tests/unit/scheduler/client/test_report.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8218c10d8bc4ff80b531d7492eaa501a6880d82c","unresolved":false,"context_lines":[{"line_number":1106,"context_line":"        inst \u003d objects.Instance("},{"line_number":1107,"context_line":"            uuid\u003duuids.inst,"},{"line_number":1108,"context_line":"            flavor\u003dobjects.Flavor(root_gb\u003d10,"},{"line_number":1109,"context_line":"                                  swap\u003d1023,"},{"line_number":1110,"context_line":"                                  ephemeral_gb\u003d100,"},{"line_number":1111,"context_line":"                                  memory_mb\u003d1024,"},{"line_number":1112,"context_line":"                                  vcpus\u003d2))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a461143_586d5531","line":1109,"updated":"2017-02-02 21:05:58.000000000","message":"I would have preferred also a regression unittest for making sure that swap is MB by verifying the helper module but meh, it\u0027s a nit.","commit_id":"c2e1133be15254747c207cce7805bf56f3cca6fa"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dfa23198d5c253aadb83fb6e363f412ad284fb74","unresolved":false,"context_lines":[{"line_number":1106,"context_line":"        inst \u003d objects.Instance("},{"line_number":1107,"context_line":"            uuid\u003duuids.inst,"},{"line_number":1108,"context_line":"            flavor\u003dobjects.Flavor(root_gb\u003d10,"},{"line_number":1109,"context_line":"                                  swap\u003d1023,"},{"line_number":1110,"context_line":"                                  ephemeral_gb\u003d100,"},{"line_number":1111,"context_line":"                                  memory_mb\u003d1024,"},{"line_number":1112,"context_line":"                                  vcpus\u003d2))"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a430d35_e062fe15","line":1109,"in_reply_to":"3a461143_586d5531","updated":"2017-02-03 10:23:41.000000000","message":"Yeah, I wanted to get to band practice.","commit_id":"c2e1133be15254747c207cce7805bf56f3cca6fa"}]}
