)]}'
{"python/tests/unit/test_maasdriver_calculate_bytes.py":[{"author":{"_account_id":28664,"name":"Ahmad Mahmoudi","email":"ahmad.mahmoudi@att.com","username":"ahmad"},"change_message_id":"988d84d1fc06f11fd9e175f5829d1d42ccb4ac76","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    def test_calculate_mi_label(self):"},{"line_number":161,"context_line":"        \u0027\u0027\u0027Convert mebibyte labels to x * 2^20 bytes.\u0027\u0027\u0027"},{"line_number":162,"context_line":"        size_str \u003d \u002715mi\u0027"},{"line_number":163,"context_line":"        drive_size \u003d 20 * 1024 * 1024"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        drive \u003d BlockDevice(None, size\u003ddrive_size, available_size\u003ddrive_size)"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ff570b3c_29ecc08d","line":163,"range":{"start_line":163,"start_character":8,"end_line":163,"end_character":37},"updated":"2020-06-01 20:40:18.000000000","message":"why don\u0027t we use math.pow(2,20. both python2.7 and python3.x have the math module and power function to calculate \"to the power of\".\nAlso, these test functions do not calculate the disk size the same way the ApplyNodeStorage.calculate_bytes() calculate.\nthis function use 2^20, the ApplyNodeStorage.calculate_bytes() calculate disk space as 2*10^6.\nI don\u0027t see anywhere in this ps to augment the ApplyNodeStorage.calculate_bytes()function to account for 2^x.\nThe current method does not look for:\n\n    * mi|Mi|mib|MiB: Mebibytes or 2^20 * the numeric\n    * gi|Gi|gib|GiB: Gibibytes or 2^30 * the numeric\n    * ti|Ti|tib|TiB: Tibibytes or 2^40 * the numeric","commit_id":"408f12b55df0f388ac0035f126074106bc0642b0"},{"author":{"_account_id":28719,"name":"Phil Sphicas","email":"phil.sphicas@att.com","username":"ps3910"},"change_message_id":"bfc95cf0f79e98cc8278de11836d0779ef899e2a","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    def test_calculate_mi_label(self):"},{"line_number":161,"context_line":"        \u0027\u0027\u0027Convert mebibyte labels to x * 2^20 bytes.\u0027\u0027\u0027"},{"line_number":162,"context_line":"        size_str \u003d \u002715mi\u0027"},{"line_number":163,"context_line":"        drive_size \u003d 20 * 1024 * 1024"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        drive \u003d BlockDevice(None, size\u003ddrive_size, available_size\u003ddrive_size)"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ff570b3c_da6981be","line":163,"range":{"start_line":163,"start_character":8,"end_line":163,"end_character":37},"in_reply_to":"ff570b3c_29ecc08d","updated":"2020-06-02 07:15:36.000000000","message":"Done","commit_id":"408f12b55df0f388ac0035f126074106bc0642b0"},{"author":{"_account_id":28719,"name":"Phil Sphicas","email":"phil.sphicas@att.com","username":"ps3910"},"change_message_id":"c566f2047ea1c7beea811895abe92b6216899fee","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    def test_calculate_mi_label(self):"},{"line_number":161,"context_line":"        \u0027\u0027\u0027Convert mebibyte labels to x * 2^20 bytes.\u0027\u0027\u0027"},{"line_number":162,"context_line":"        size_str \u003d \u002715mi\u0027"},{"line_number":163,"context_line":"        drive_size \u003d 20 * 1024 * 1024"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        drive \u003d BlockDevice(None, size\u003ddrive_size, available_size\u003ddrive_size)"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ff570b3c_66b702f7","line":163,"range":{"start_line":163,"start_character":8,"end_line":163,"end_character":37},"in_reply_to":"ff570b3c_29ecc08d","updated":"2020-06-01 21:23:26.000000000","message":"These are new test cases matching for the suffixes containing \u0027i\u0027. The new functionality is added to calculate_bytes in lines 2237-2242 here:\n\nhttps://review.opendev.org/#/c/731368/5/python/drydock_provisioner/drivers/node/maasdriver/actions/node.py\n\nExisting functionality is not changed. I replicated the style of the original functions and test cases.","commit_id":"408f12b55df0f388ac0035f126074106bc0642b0"}]}
