)]}'
{"ironic_python_agent/disk_partitioner.py":[{"author":{"_account_id":8003,"name":"Aleksandr Gordeev","email":"agordeev@mirantis.com","username":"agordeev"},"change_message_id":"3729d5b3e96528a0d8bfe2fd626ecf4faa41bfc9","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class DiskPartitioner(object):"},{"line_number":26,"context_line":"    def parse_unit(self, s):"},{"line_number":27,"context_line":"        m \u003d re.search(\u0027^([0-9]+([%s][0-9]+)?)MiB\u0027 %"},{"line_number":28,"context_line":"                      locale.localeconv()[\u0027decimal_point\u0027], s)"},{"line_number":29,"context_line":"        if m:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAW3%2F%2F9Qw%3D","line":26,"updated":"2014-04-09 09:04:06.000000000","message":"this method is doing the same job as in LVMPartitioner. Could it be moved to utils.py ?\n\nLet\u0027s keep code DRYer","commit_id":"5436e1a582c6d5d49062ccdcf39c22beb64a03b9"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"062c65f30bc2a73e4ea7fcb29cfda6c5b3903923","unresolved":false,"context_lines":[{"line_number":1,"context_line":"\"\"\""},{"line_number":2,"context_line":"Copyright 2014 Mirantis, Inc."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2F3Gw%3D","line":1,"updated":"2014-04-09 21:11:05.000000000","message":"please  use # to prefix the license and attribution header, not \"\"\"\n\n\"\"\" creates a python doc block, which will get parsed by sphinx and turned into user-visible documentation strings.","commit_id":"e2c9be53f719f22eb5977c986b69fb4d1e58319c"},{"author":{"_account_id":8003,"name":"Aleksandr Gordeev","email":"agordeev@mirantis.com","username":"agordeev"},"change_message_id":"b4a709494241a69aba1a104d60f2492f6125bd41","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        utils.execute(\u0027parted\u0027, \u0027-s\u0027, dev, \u0027mklabel\u0027, \u0027gpt\u0027,"},{"line_number":58,"context_line":"                      check_exit_code\u003d[0])"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def mkpart(self, dev, begin, end, fs_type\u003dNone):"},{"line_number":61,"context_line":"        # check if fs_type is valid"},{"line_number":62,"context_line":"        if fs_type and fs_type not in (\u0027fat16\u0027, \u0027fat32\u0027, \u0027ext2\u0027,"},{"line_number":63,"context_line":"                                       \u0027linux-swap\u0027, \u0027reiserfs\u0027):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAW3%2F%2Fxs8%3D","line":60,"updated":"2014-04-10 13:46:27.000000000","message":"I think parted shouldn\u0027t be used for making the fs. The manual said the same.\n\nSo i don\u0027t see any reason to provide fs_type option and any line of code that bears with it. So it should be removed.","commit_id":"5290d82ae881f5672a72df981900dcd03b346533"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"7934880662f8ee8445b86dd38b0ef687ab47f177","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def wipe(self, dev):"},{"line_number":52,"context_line":"        # wipes partition table either gpt or msdos on a drive"},{"line_number":53,"context_line":"        utils.execute(\u0027sgdisk\u0027, \u0027--zap-all\u0027, dev, check_exit_code\u003d[0])"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def gpt(self, dev):"},{"line_number":56,"context_line":"        # creates gpt partition table on a drive"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2Fncw%3D","line":53,"updated":"2014-04-11 17:56:03.000000000","message":"Can we do this with parted? Would rather not have the agent using a mix of different partitioning tools -- everything else in the agent already uses parted.","commit_id":"51c37d51ec04b003a943b4a1a517134615fa8da9"},{"author":{"_account_id":3009,"name":"Vladimir Kozhukalov","email":"kozhukalov@gmail.com","username":"kozhukalov"},"change_message_id":"7d9f6273c8929935f0a39751f0bfcdce67b61c7a","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def wipe(self, dev):"},{"line_number":52,"context_line":"        # wipes partition table either gpt or msdos on a drive"},{"line_number":53,"context_line":"        utils.execute(\u0027sgdisk\u0027, \u0027--zap-all\u0027, dev, check_exit_code\u003d[0])"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def gpt(self, dev):"},{"line_number":56,"context_line":"        # creates gpt partition table on a drive"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2FWE0%3D","line":53,"in_reply_to":"AAAAW3%2F%2Fncw%3D","updated":"2014-04-15 09:19:00.000000000","message":"parted does not have such a capability. I can remove sgdisk and use bare dd command to wipe partition table. sgdisk just provides an extremely convenient way to do that.","commit_id":"51c37d51ec04b003a943b4a1a517134615fa8da9"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"7934880662f8ee8445b86dd38b0ef687ab47f177","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        # wipes partition table either gpt or msdos on a drive"},{"line_number":53,"context_line":"        utils.execute(\u0027sgdisk\u0027, \u0027--zap-all\u0027, dev, check_exit_code\u003d[0])"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def gpt(self, dev):"},{"line_number":56,"context_line":"        # creates gpt partition table on a drive"},{"line_number":57,"context_line":"        utils.execute(\u0027parted\u0027, \u0027-s\u0027, dev, \u0027mklabel\u0027, \u0027gpt\u0027,"},{"line_number":58,"context_line":"                      check_exit_code\u003d[0])"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2FncM%3D","line":55,"updated":"2014-04-11 17:56:03.000000000","message":"We should probably have an mbr method as well?","commit_id":"51c37d51ec04b003a943b4a1a517134615fa8da9"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"7934880662f8ee8445b86dd38b0ef687ab47f177","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def rmpart(self, dev, num):"},{"line_number":76,"context_line":"        if not filter(lambda x: x[\u0027fstype\u0027] !\u003d \u0027free\u0027 and x[\u0027num\u0027] \u003d\u003d num,"},{"line_number":77,"context_line":"                      self.info(dev)[\u0027parts\u0027]):"},{"line_number":78,"context_line":"            raise errors.PartitionNotFoundError(\u0027Partition %s not found\u0027 % num)"},{"line_number":79,"context_line":"        utils.execute(\u0027parted\u0027, \u0027-s\u0027, dev, \u0027rm\u0027, str(num), check_exit_code\u003d[0])"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2FncA%3D","line":77,"updated":"2014-04-11 17:56:03.000000000","message":"nit: indentation seems off","commit_id":"51c37d51ec04b003a943b4a1a517134615fa8da9"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cd8097d17a3e1d3af134ef7588a59ecdff63e192","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        # check if begin and end are inside one of free spaces available"},{"line_number":72,"context_line":"        if not filter(lambda x: x[\u0027fstype\u0027] \u003d\u003d \u0027free\u0027 and"},{"line_number":73,"context_line":"            begin \u003e\u003d x[\u0027begin\u0027] and end \u003c\u003d x[\u0027end\u0027], self.info(dev)[\u0027parts\u0027]):"},{"line_number":74,"context_line":"                raise errors.WrongPartitionSpecError(\u0027Invalid boundaries: \u0027"},{"line_number":75,"context_line":"                    \u0027begin and end are not inside available free space\u0027)"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAW3%2F%2FUW0%3D","line":73,"updated":"2014-04-15 11:57:32.000000000","message":"if not any(x[\u0027fstype\u0027] \u003d\u003d \u0027free\u0027 and begin \u003e\u003d x[\u0027begin\u0027] and end \u003c\u003d x[\u0027end\u0027]\n              for x in self.info(dev)[\u0027parts\u0027])","commit_id":"851b03639125b51ed3901abd917e8a0e16bf4f79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cd8097d17a3e1d3af134ef7588a59ecdff63e192","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def rmpart(self, dev, num):"},{"line_number":81,"context_line":"        if not filter(lambda x: x[\u0027fstype\u0027] !\u003d \u0027free\u0027 and x[\u0027num\u0027] \u003d\u003d num,"},{"line_number":82,"context_line":"                        self.info(dev)[\u0027parts\u0027]):"},{"line_number":83,"context_line":"            raise errors.PartitionNotFoundError(\u0027Partition %s not found\u0027 % num)"},{"line_number":84,"context_line":"        utils.execute(\u0027parted\u0027, \u0027-s\u0027, dev, \u0027rm\u0027, str(num), check_exit_code\u003d[0])"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAW3%2F%2FUWA%3D","line":82,"updated":"2014-04-15 11:57:32.000000000","message":"The same as above","commit_id":"851b03639125b51ed3901abd917e8a0e16bf4f79"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"5223a6d9de521c84f60f7163b47aea57717abf9f","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def wipe(self, dev):"},{"line_number":52,"context_line":"        # wipes partition table either gpt or msdos on a drive"},{"line_number":53,"context_line":"        utils.execute(\u0027sgdisk\u0027, \u0027--zap-all\u0027, dev, check_exit_code\u003d[0])"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def gpt(self, dev):"},{"line_number":56,"context_line":"        # creates gpt partition table on a drive"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAW3%2F%2FOUI%3D","line":53,"updated":"2014-04-15 23:40:27.000000000","message":"Why can\u0027t you use parted mklabel or mktable to do this? I think it\u0027s possible to achieve this goal with parted.\n\nAn empty partition table is functionally equivalent to a wiped table, correct? \n\nIf this is the only way to do it, we need to add sgdisk to the apt-get install line in the Dockerfile in the root of the repo. If you don\u0027t know how those work, ping me in IRC and I\u0027ll be glad to show you.","commit_id":"4b54487c44a6f87137d3c8b92735b0ab1137b62a"},{"author":{"_account_id":3009,"name":"Vladimir Kozhukalov","email":"kozhukalov@gmail.com","username":"kozhukalov"},"change_message_id":"df5d40dc6050ea83cc1e129e9c0ad3fcf5408ee5","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def wipe(self, dev):"},{"line_number":52,"context_line":"        # wipes partition table either gpt or msdos on a drive"},{"line_number":53,"context_line":"        utils.execute(\u0027sgdisk\u0027, \u0027--zap-all\u0027, dev, check_exit_code\u003d[0])"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def gpt(self, dev):"},{"line_number":56,"context_line":"        # creates gpt partition table on a drive"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2F9zY%3D","line":53,"in_reply_to":"AAAAW3%2F%2FOUI%3D","updated":"2014-04-16 08:03:56.000000000","message":"Jay, thanks very much.\nFirst time I did not understand what you had meant. There is no any reference about wiping table in parted manual, so I just didn\u0027t know that making new table is equivalent to wiping an old one. \nHave tried you way and it works. Great.","commit_id":"4b54487c44a6f87137d3c8b92735b0ab1137b62a"}],"ironic_python_agent/disk_utils.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed642dc2edecd48a0b969071aafa55459e675ac4","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    gpt(dev)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def gpt(dev):"},{"line_number":56,"context_line":"    # creates gpt partition table on a drive"},{"line_number":57,"context_line":"    utils.execute(\u0027parted\u0027, \u0027-s\u0027, dev, \u0027mklabel\u0027, \u0027gpt\u0027,"},{"line_number":58,"context_line":"                  check_exit_code\u003d[0])"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAXH%2F%2FzfY%3D","line":55,"updated":"2014-04-17 10:17:55.000000000","message":"Let us call it like `make_gpt` (or mkgpt, if you want to be consistent with how functions are called here), current name is a bit confusing","commit_id":"d68da1fe4823dc3093a2e2bd14deec98d85466af"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed642dc2edecd48a0b969071aafa55459e675ac4","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                  check_exit_code\u003d[0])"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def msdos(dev):"},{"line_number":62,"context_line":"    # creates msdos partition table on a drive"},{"line_number":63,"context_line":"    utils.execute(\u0027parted\u0027, \u0027-s\u0027, dev, \u0027mklabel\u0027, \u0027msdos\u0027,"},{"line_number":64,"context_line":"                  check_exit_code\u003d[0])"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAXH%2F%2FzfQ%3D","line":61,"updated":"2014-04-17 10:17:55.000000000","message":"ditto","commit_id":"d68da1fe4823dc3093a2e2bd14deec98d85466af"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed642dc2edecd48a0b969071aafa55459e675ac4","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                  check_exit_code\u003d[0])"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def mkpart(dev, begin, end):"},{"line_number":68,"context_line":"    # check begin \u003e\u003d end"},{"line_number":69,"context_line":"    if begin \u003e\u003d end:"},{"line_number":70,"context_line":"        raise errors.WrongPartitionSpecError("}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAXH%2F%2Fzew%3D","line":67,"updated":"2014-04-17 10:17:55.000000000","message":"If you decide to rename gpt -\u003e make_gpt, this should also be expanded to make_part or even make_partition","commit_id":"d68da1fe4823dc3093a2e2bd14deec98d85466af"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ed642dc2edecd48a0b969071aafa55459e675ac4","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        \u0027mkpart\u0027, \u0027primary\u0027, str(begin), str(end), check_exit_code\u003d[0])"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def rmpart(dev, num):"},{"line_number":86,"context_line":"    if not any(x[\u0027fstype\u0027] !\u003d \u0027free\u0027 and x[\u0027num\u0027] \u003d\u003d num"},{"line_number":87,"context_line":"               for x in info(dev)[\u0027parts\u0027]):"},{"line_number":88,"context_line":"        raise errors.PartitionNotFoundError(\u0027Partition %s not found\u0027 % num)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAXH%2F%2Fzes%3D","line":85,"updated":"2014-04-17 10:17:55.000000000","message":"ditto","commit_id":"d68da1fe4823dc3093a2e2bd14deec98d85466af"}],"ironic_python_agent/tests/disk_partitioner.py":[{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"7934880662f8ee8445b86dd38b0ef687ab47f177","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        mock_info.return_value \u003d {"},{"line_number":141,"context_line":"            \u0027parts\u0027: ["},{"line_number":142,"context_line":"                {\u0027begin\u0027: 1, \u0027end\u0027: 100, \u0027size\u0027: 100,"},{"line_number":143,"context_line":"                    \u0027num\u0027: 1, \u0027fstype\u0027: \u0027ext2\u0027},"},{"line_number":144,"context_line":"                {\u0027begin\u0027: 100, \u0027end\u0027: 200, \u0027size\u0027: 100,"},{"line_number":145,"context_line":"                    \u0027num\u0027: 2, \u0027fstype\u0027: \u0027ext2\u0027},"},{"line_number":146,"context_line":"            ]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2FnbY%3D","line":143,"updated":"2014-04-11 17:56:03.000000000","message":"nit: This is very strangely formatted and difficult to read. Perhaps put each k:v pair on it\u0027s own line?","commit_id":"51c37d51ec04b003a943b4a1a517134615fa8da9"}],"ironic_python_agent/utils.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"28cd522e010575a6e526ae73cab0721810e3fc75","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def parse_unit(s, unit, ceil\u003dTrue):"},{"line_number":46,"context_line":"    # Converts \u0027123.45unit\u0027 string into 124 if ceil is True"},{"line_number":47,"context_line":"    # and into 123 if it is not"},{"line_number":48,"context_line":"    flt \u003d locale.atof(s.split(unit)[0])"},{"line_number":49,"context_line":"    if ceil:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAXH%2F%2Fz7I%3D","line":46,"updated":"2014-04-17 08:58:03.000000000","message":"Please use docstring.","commit_id":"2bd06756338dd48a05d6b80574aab9f64aeb7f25"}]}
