)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"aeb4c9e85194ca5b51ee87a71c0dc4a5ef0875b7","unresolved":false,"context_lines":[{"line_number":10,"context_line":"the first disk \u003e\u003d 4G, if the hints are specified IPA will look at it"},{"line_number":11,"context_line":"to decide which device it should pick for the deployment. The initial"},{"line_number":12,"context_line":"patch supports the following hints: Size, model, WWN, serial, vendor."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I2b00b3fb3b61001033750dd8951f9353d6f2e361"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a80dd14_cef64ef9","line":13,"updated":"2015-03-11 20:09:16.000000000","message":"Isn\u0027t this associated with a blueprint?","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"6102de44af3f45f9bbaddb38d36d50340a18217e","unresolved":false,"context_lines":[{"line_number":10,"context_line":"the first disk \u003e\u003d 4G, if the hints are specified IPA will look at it"},{"line_number":11,"context_line":"to decide which device it should pick for the deployment. The initial"},{"line_number":12,"context_line":"patch supports the following hints: Size, model, WWN, serial, vendor."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I2b00b3fb3b61001033750dd8951f9353d6f2e361"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a80dd14_fa881124","line":13,"in_reply_to":"9a80dd14_cef64ef9","updated":"2015-03-12 09:54:36.000000000","message":"ops it\u0027s I will mark as such","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"}],"ironic_python_agent/hardware.py":[{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"9bf645c846ef9f658ef5382be7923345f9aacb89","unresolved":false,"context_lines":[{"line_number":286,"context_line":"                # to better deal with sizes."},{"line_number":287,"context_line":"                if \u0027size\u0027 in root_device_hints:"},{"line_number":288,"context_line":"                    if root_device_hints[\u0027size\u0027] !\u003d dev.size:"},{"line_number":289,"context_line":"                        continue"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"                if \u0027model\u0027 in root_device_hints:"},{"line_number":292,"context_line":"                    model \u003d udev.get(\u0027ID_MODEL\u0027, None)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_dea61353","line":289,"updated":"2015-03-11 12:42:09.000000000","message":"Should we log.debug mismatches here in the comparison (and in the ones below) when a hint value is supplied? I think it might prove useful when someone can\u0027t figure out why their hint isn\u0027t working as expected.","commit_id":"dd7f457863d617a935da0b70a5e84d242cbf0e89"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"eed9fe9464573d971b4b4bffc50324b00e180662","unresolved":false,"context_lines":[{"line_number":286,"context_line":"                # to better deal with sizes."},{"line_number":287,"context_line":"                if \u0027size\u0027 in root_device_hints:"},{"line_number":288,"context_line":"                    if root_device_hints[\u0027size\u0027] !\u003d dev.size:"},{"line_number":289,"context_line":"                        continue"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"                if \u0027model\u0027 in root_device_hints:"},{"line_number":292,"context_line":"                    model \u003d udev.get(\u0027ID_MODEL\u0027, None)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_6a6721eb","line":289,"in_reply_to":"9a80dd14_dea61353","updated":"2015-03-11 13:35:27.000000000","message":"That\u0027s a good point, I will add some debug logs here. Thanks for the suggestion","commit_id":"dd7f457863d617a935da0b70a5e84d242cbf0e89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"aeb4c9e85194ca5b51ee87a71c0dc4a5ef0875b7","unresolved":false,"context_lines":[{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def _get_device_vendor(self, dev):"},{"line_number":261,"context_line":"        try:"},{"line_number":262,"context_line":"            with open(\u0027/sys/class/block/%s/device/vendor\u0027 % dev[5:], \u0027r\u0027) as f:"},{"line_number":263,"context_line":"                return f.read().strip()"},{"line_number":264,"context_line":"        except IOError:"},{"line_number":265,"context_line":"            LOG.warning(\"Can\u0027t find the device vendor for device %s\", dev)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_312f4ba3","line":262,"updated":"2015-03-11 20:09:16.000000000","message":"I\u0027d prefer if \u0027/dev/\u0027 was a constant and uses here (instead of dev[5:]) and above in list_block_devices(), just in case it changes from /dev/ to something else.","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"6102de44af3f45f9bbaddb38d36d50340a18217e","unresolved":false,"context_lines":[{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def _get_device_vendor(self, dev):"},{"line_number":261,"context_line":"        try:"},{"line_number":262,"context_line":"            with open(\u0027/sys/class/block/%s/device/vendor\u0027 % dev[5:], \u0027r\u0027) as f:"},{"line_number":263,"context_line":"                return f.read().strip()"},{"line_number":264,"context_line":"        except IOError:"},{"line_number":265,"context_line":"            LOG.warning(\"Can\u0027t find the device vendor for device %s\", dev)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_456f82c5","line":262,"in_reply_to":"9a80dd14_312f4ba3","updated":"2015-03-12 09:54:36.000000000","message":"Done","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"aeb4c9e85194ca5b51ee87a71c0dc4a5ef0875b7","unresolved":false,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"            context \u003d pyudev.Context()"},{"line_number":294,"context_line":"            for dev in block_devices:"},{"line_number":295,"context_line":"                udev \u003d pyudev.Device.from_device_file(context, dev.name)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"                # TODO(lucasagomes): Add support for operators \u003c, \u003e, \u003d, etc..."},{"line_number":298,"context_line":"                # to better deal with sizes."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_9185575b","line":295,"updated":"2015-03-11 20:09:16.000000000","message":"looks like this could raise ValueError, EnvironmentError [1] Do we care?\n\n[1] http://pyudev.readthedocs.org/en/latest/api/pyudev.html#pyudev.Device","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"6102de44af3f45f9bbaddb38d36d50340a18217e","unresolved":false,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"            context \u003d pyudev.Context()"},{"line_number":294,"context_line":"            for dev in block_devices:"},{"line_number":295,"context_line":"                udev \u003d pyudev.Device.from_device_file(context, dev.name)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"                # TODO(lucasagomes): Add support for operators \u003c, \u003e, \u003d, etc..."},{"line_number":298,"context_line":"                # to better deal with sizes."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_fab651db","line":295,"in_reply_to":"9a80dd14_9185575b","updated":"2015-03-12 09:54:36.000000000","message":"I can add a try...except block here for that","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"aeb4c9e85194ca5b51ee87a71c0dc4a5ef0875b7","unresolved":false,"context_lines":[{"line_number":297,"context_line":"                # TODO(lucasagomes): Add support for operators \u003c, \u003e, \u003d, etc..."},{"line_number":298,"context_line":"                # to better deal with sizes."},{"line_number":299,"context_line":"                if \u0027size\u0027 in root_device_hints:"},{"line_number":300,"context_line":"                    if not match(\u0027size\u0027, dev.size, dev.name):"},{"line_number":301,"context_line":"                        continue"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"                if \u0027model\u0027 in root_device_hints:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_b15a5b81","line":300,"updated":"2015-03-11 20:09:16.000000000","message":"so this is a dumb question. is the value of \u0027size\u0027 in root_device_hints an integer or a string? dev.size is an integer.","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"6102de44af3f45f9bbaddb38d36d50340a18217e","unresolved":false,"context_lines":[{"line_number":297,"context_line":"                # TODO(lucasagomes): Add support for operators \u003c, \u003e, \u003d, etc..."},{"line_number":298,"context_line":"                # to better deal with sizes."},{"line_number":299,"context_line":"                if \u0027size\u0027 in root_device_hints:"},{"line_number":300,"context_line":"                    if not match(\u0027size\u0027, dev.size, dev.name):"},{"line_number":301,"context_line":"                        continue"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"                if \u0027model\u0027 in root_device_hints:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_fadd7115","line":300,"in_reply_to":"9a80dd14_b15a5b81","updated":"2015-03-12 09:54:36.000000000","message":"oh good point, since root_device_hints is a dict that supports integer I was assuming integer here, but I could try to normalise the values before checking them.","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"aeb4c9e85194ca5b51ee87a71c0dc4a5ef0875b7","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                    if not match(\u0027size\u0027, dev.size, dev.name):"},{"line_number":301,"context_line":"                        continue"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"                if \u0027model\u0027 in root_device_hints:"},{"line_number":304,"context_line":"                    model \u003d udev.get(\u0027ID_MODEL\u0027, None)"},{"line_number":305,"context_line":"                    if not match(\u0027model\u0027, model, dev.name):"},{"line_number":306,"context_line":"                        continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_b1d17bcf","line":303,"updated":"2015-03-11 20:09:16.000000000","message":"the strings are case-sensitive matches. Would it be better to do case-insensitive? (I don\u0027t know, just asking.)","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"6102de44af3f45f9bbaddb38d36d50340a18217e","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                    if not match(\u0027size\u0027, dev.size, dev.name):"},{"line_number":301,"context_line":"                        continue"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"                if \u0027model\u0027 in root_device_hints:"},{"line_number":304,"context_line":"                    model \u003d udev.get(\u0027ID_MODEL\u0027, None)"},{"line_number":305,"context_line":"                    if not match(\u0027model\u0027, model, dev.name):"},{"line_number":306,"context_line":"                        continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_dad6edf0","line":303,"in_reply_to":"9a80dd14_b1d17bcf","updated":"2015-03-12 09:54:36.000000000","message":"Yeah I will normalize the values","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"aeb4c9e85194ca5b51ee87a71c0dc4a5ef0875b7","unresolved":false,"context_lines":[{"line_number":324,"context_line":"                    if not match(\u0027vendor\u0027, vendor, dev.name):"},{"line_number":325,"context_line":"                        continue"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"                return dev.name"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"            else:"},{"line_number":330,"context_line":"                raise errors.DeviceNotFound(\"No suitable device was found for \""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_2e2feaa2","line":327,"updated":"2015-03-11 20:09:16.000000000","message":"if root_device_hints has something, but it doesn\u0027t have any of these keys, you\u0027re going to return the first device. Is that what you want?","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"6102de44af3f45f9bbaddb38d36d50340a18217e","unresolved":false,"context_lines":[{"line_number":324,"context_line":"                    if not match(\u0027vendor\u0027, vendor, dev.name):"},{"line_number":325,"context_line":"                        continue"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"                return dev.name"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"            else:"},{"line_number":330,"context_line":"                raise errors.DeviceNotFound(\"No suitable device was found for \""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_da7c2db8","line":327,"in_reply_to":"9a80dd14_2e2feaa2","updated":"2015-03-12 09:54:36.000000000","message":"No, if he specifies something on the root_device property means he want\u0027s to find something specific, if that can\u0027t be found we are going to fail with a DeviceNotFound error and deployment will fail.\n\nI find returning the first device in case it doesn\u0027t match any value misleading, say a user has 2 disks and one of them contains data and Ironic should not touch it at all. So the user uses root device hint to find the other disk to deploy the image onto, but, if the hints doesn\u0027t match for some reason and we have the behavior of picking the first device if no matches occur we could potentially screw up with the device Ironic should not touch.\n\n...\n\nFor invalid keys perhaps I should log saying that the key he input\u0027d is invalid. I will do that","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"aeb4c9e85194ca5b51ee87a71c0dc4a5ef0875b7","unresolved":false,"context_lines":[{"line_number":328,"context_line":""},{"line_number":329,"context_line":"            else:"},{"line_number":330,"context_line":"                raise errors.DeviceNotFound(\"No suitable device was found for \""},{"line_number":331,"context_line":"                    \"deployment following the hints %s\" % root_device_hints)"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def erase_block_device(self, block_device):"},{"line_number":334,"context_line":"        if self._ata_erase(block_device):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_b1441b75","line":331,"updated":"2015-03-11 20:09:16.000000000","message":"maybe s/following the/using these/","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"6102de44af3f45f9bbaddb38d36d50340a18217e","unresolved":false,"context_lines":[{"line_number":328,"context_line":""},{"line_number":329,"context_line":"            else:"},{"line_number":330,"context_line":"                raise errors.DeviceNotFound(\"No suitable device was found for \""},{"line_number":331,"context_line":"                    \"deployment following the hints %s\" % root_device_hints)"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def erase_block_device(self, block_device):"},{"line_number":334,"context_line":"        if self._ata_erase(block_device):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_fa4ad181","line":331,"in_reply_to":"9a80dd14_b1441b75","updated":"2015-03-12 09:54:36.000000000","message":"Done","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"ffb19f074563dd026067270d6f42bad119480877","unresolved":false,"context_lines":[{"line_number":258,"context_line":"                                       rotational\u003dbool(int(device[\u0027ROTA\u0027]))))"},{"line_number":259,"context_line":"        return devices"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    def _get_device_vendor(self, dev):"},{"line_number":262,"context_line":"        try:"},{"line_number":263,"context_line":"            devname \u003d os.path.basename(dev)"},{"line_number":264,"context_line":"            with open(\u0027/sys/class/block/%s/device/vendor\u0027 % devname, \u0027r\u0027) as f:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_860336b7","line":261,"updated":"2015-03-12 14:52:41.000000000","message":"May be a one-line docstring might be good for these methods.","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"2a624e495c0fdae26ff76ce144a1e9a9020f829e","unresolved":false,"context_lines":[{"line_number":258,"context_line":"                                       rotational\u003dbool(int(device[\u0027ROTA\u0027]))))"},{"line_number":259,"context_line":"        return devices"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    def _get_device_vendor(self, dev):"},{"line_number":262,"context_line":"        try:"},{"line_number":263,"context_line":"            devname \u003d os.path.basename(dev)"},{"line_number":264,"context_line":"            with open(\u0027/sys/class/block/%s/device/vendor\u0027 % devname, \u0027r\u0027) as f:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_37955240","line":261,"in_reply_to":"9a80dd14_860336b7","updated":"2015-03-12 15:39:01.000000000","message":"Done","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"ffb19f074563dd026067270d6f42bad119480877","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            # TODO(russellhaering): This isn\u0027t a valid assumption in"},{"line_number":277,"context_line":"            # all cases, is there a more reasonable default behavior?"},{"line_number":278,"context_line":"            block_devices.sort(key\u003dlambda device: device.size)"},{"line_number":279,"context_line":"            for device in block_devices:"},{"line_number":280,"context_line":"                if device.size \u003e\u003d (4 * pow(1024, 3)):"},{"line_number":281,"context_line":"                    return device.name"},{"line_number":282,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_0683c604","line":279,"updated":"2015-03-12 14:52:41.000000000","message":"may be it wasn\u0027t there before, but shouldn\u0027t we just errors.DeviceNotFound if we couldn\u0027t find any disks here","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"2a624e495c0fdae26ff76ce144a1e9a9020f829e","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            # TODO(russellhaering): This isn\u0027t a valid assumption in"},{"line_number":277,"context_line":"            # all cases, is there a more reasonable default behavior?"},{"line_number":278,"context_line":"            block_devices.sort(key\u003dlambda device: device.size)"},{"line_number":279,"context_line":"            for device in block_devices:"},{"line_number":280,"context_line":"                if device.size \u003e\u003d (4 * pow(1024, 3)):"},{"line_number":281,"context_line":"                    return device.name"},{"line_number":282,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_57c9e677","line":279,"in_reply_to":"9a80dd14_0683c604","updated":"2015-03-12 15:39:01.000000000","message":"Yeah, I will do that in a following up patch because I don\u0027t wanna touch this bit in this patch. I wanna keep as was before","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"ffb19f074563dd026067270d6f42bad119480877","unresolved":false,"context_lines":[{"line_number":297,"context_line":"                try:"},{"line_number":298,"context_line":"                    udev \u003d pyudev.Device.from_device_file(context, dev.name)"},{"line_number":299,"context_line":"                except (ValueError, EnvironmentError) as e:"},{"line_number":300,"context_line":"                    LOG.warning(\"Device %(dev)s is inaccessible, skipping... \""},{"line_number":301,"context_line":"                    \"Error: %(error)s\", {\u0027dev\u0027: dev, \u0027error\u0027: e})"},{"line_number":302,"context_line":"                    continue"},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_26728aad","line":300,"updated":"2015-03-12 14:52:41.000000000","message":"Since we are not dependent on udev for getting the vendor, should we just try if the root device hint was only vendor and we can do without udev.  In that case we can move the code for size, model, wwn, serial to else: block of try:.  But we should skip the disk if there was size, model, wwn or serial.","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"2a624e495c0fdae26ff76ce144a1e9a9020f829e","unresolved":false,"context_lines":[{"line_number":297,"context_line":"                try:"},{"line_number":298,"context_line":"                    udev \u003d pyudev.Device.from_device_file(context, dev.name)"},{"line_number":299,"context_line":"                except (ValueError, EnvironmentError) as e:"},{"line_number":300,"context_line":"                    LOG.warning(\"Device %(dev)s is inaccessible, skipping... \""},{"line_number":301,"context_line":"                    \"Error: %(error)s\", {\u0027dev\u0027: dev, \u0027error\u0027: e})"},{"line_number":302,"context_line":"                    continue"},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_37d1d2fb","line":300,"in_reply_to":"9a80dd14_26728aad","updated":"2015-03-12 15:39:01.000000000","message":"Was thinking about it, but the code might look very complicated with all those conditions, it may be an improvement later.","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b49abfea7ff83da76767db79338e3af9d77a7ad4","unresolved":false,"context_lines":[{"line_number":346,"context_line":"                    if not match(\u0027vendor\u0027, vendor, dev.name):"},{"line_number":347,"context_line":"                        continue"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"                return dev.name"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"            else:"},{"line_number":352,"context_line":"                raise errors.DeviceNotFound(\"No suitable device was found for \""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_4054c653","line":349,"updated":"2015-03-12 14:18:37.000000000","message":"I\u0027m not sure you answered my question, so I\u0027ll try again.\n\nroot_device_hints could have entries, but it could have eg: {\u0027foo\u0027:\u0027bar\u0027}. (parse_root_device_hints() doesn\u0027t remove that). In this case, you would end up returning the first device, right? Is that what you want? Or do you want to raise DeviceNotFound?","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ab67d77bee13c8a0a846f0700460c47ef3f0351b","unresolved":false,"context_lines":[{"line_number":346,"context_line":"                    if not match(\u0027vendor\u0027, vendor, dev.name):"},{"line_number":347,"context_line":"                        continue"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"                return dev.name"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"            else:"},{"line_number":352,"context_line":"                raise errors.DeviceNotFound(\"No suitable device was found for \""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_c31280b3","line":349,"in_reply_to":"9a80dd14_4054c653","updated":"2015-03-12 14:36:05.000000000","message":"Oh I see what you mean!\n\nThanks for pointing that out, yes I want it to raise DeviceNotFound and not return the first device.\n\nPerhaps I should fail on parse_root_device_hints(), will do that.","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"ffb19f074563dd026067270d6f42bad119480877","unresolved":false,"context_lines":[{"line_number":350,"context_line":""},{"line_number":351,"context_line":"            else:"},{"line_number":352,"context_line":"                raise errors.DeviceNotFound(\"No suitable device was found for \""},{"line_number":353,"context_line":"                    \"deployment using these hints %s\" % root_device_hints)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def erase_block_device(self, block_device):"},{"line_number":356,"context_line":"        if self._ata_erase(block_device):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_66e2c202","line":353,"updated":"2015-03-12 14:52:41.000000000","message":"nit: indentation.","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"2a624e495c0fdae26ff76ce144a1e9a9020f829e","unresolved":false,"context_lines":[{"line_number":350,"context_line":""},{"line_number":351,"context_line":"            else:"},{"line_number":352,"context_line":"                raise errors.DeviceNotFound(\"No suitable device was found for \""},{"line_number":353,"context_line":"                    \"deployment using these hints %s\" % root_device_hints)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def erase_block_device(self, block_device):"},{"line_number":356,"context_line":"        if self._ata_erase(block_device):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_f7357a46","line":353,"in_reply_to":"9a80dd14_66e2c202","updated":"2015-03-12 15:39:01.000000000","message":"it looks correct","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"04e8cbf4b81fb245b5c2e5e5579fdb8e4fcfbca7","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            with open(\u0027/sys/class/block/%s/device/vendor\u0027 % devname, \u0027r\u0027) as f:"},{"line_number":266,"context_line":"                return f.read().strip()"},{"line_number":267,"context_line":"        except IOError:"},{"line_number":268,"context_line":"            LOG.warning(\"Can\u0027t find the device vendor for device %s\", dev)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def get_os_install_device(self):"},{"line_number":271,"context_line":"        block_devices \u003d self.list_block_devices()"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_5cfb987a","line":268,"updated":"2015-03-13 13:07:18.000000000","message":"Need to use _LW() here.","commit_id":"5a529ca4893ff5ea0a5e4ccd28d31b7dca926933"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"87a72df7d32aa748df12884450535b1994c26ef6","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            with open(\u0027/sys/class/block/%s/device/vendor\u0027 % devname, \u0027r\u0027) as f:"},{"line_number":266,"context_line":"                return f.read().strip()"},{"line_number":267,"context_line":"        except IOError:"},{"line_number":268,"context_line":"            LOG.warning(\"Can\u0027t find the device vendor for device %s\", dev)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def get_os_install_device(self):"},{"line_number":271,"context_line":"        block_devices \u003d self.list_block_devices()"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_7c469c7c","line":268,"in_reply_to":"9a80dd14_5cfb987a","updated":"2015-03-13 13:11:44.000000000","message":"IPA is not set to use i18n unfortunately[1]\n\n[1] https://github.com/openstack/ironic-python-agent/blob/master/ironic_python_agent/extensions/standby.py#L56 \n\n(and all the other logs are not i18n)","commit_id":"5a529ca4893ff5ea0a5e4ccd28d31b7dca926933"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"50d6579ea7cdabde529ad8563368955400078909","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            with open(\u0027/sys/class/block/%s/device/vendor\u0027 % devname, \u0027r\u0027) as f:"},{"line_number":266,"context_line":"                return f.read().strip()"},{"line_number":267,"context_line":"        except IOError:"},{"line_number":268,"context_line":"            LOG.warning(\"Can\u0027t find the device vendor for device %s\", dev)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def get_os_install_device(self):"},{"line_number":271,"context_line":"        block_devices \u003d self.list_block_devices()"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_bfac86ee","line":268,"in_reply_to":"9a80dd14_7c469c7c","updated":"2015-03-13 13:21:08.000000000","message":"Ah, yep. You\u0027re correct. That\u0027s a larger change then.","commit_id":"5a529ca4893ff5ea0a5e4ccd28d31b7dca926933"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"5bafd4bcc99b372fdd97ab1f2e8ada325f945fed","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            with open(\u0027/sys/class/block/%s/device/vendor\u0027 % devname, \u0027r\u0027) as f:"},{"line_number":266,"context_line":"                return f.read().strip()"},{"line_number":267,"context_line":"        except IOError:"},{"line_number":268,"context_line":"            LOG.warning(\"Can\u0027t find the device vendor for device %s\", dev)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def get_os_install_device(self):"},{"line_number":271,"context_line":"        block_devices \u003d self.list_block_devices()"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_7f592e34","line":268,"in_reply_to":"9a80dd14_7c469c7c","updated":"2015-03-13 13:14:10.000000000","message":"yeah and i guess messages from ipa are translated by ironic before it goes to the user.\n\n(expectation is no human talks directly to ramdisk)","commit_id":"5a529ca4893ff5ea0a5e4ccd28d31b7dca926933"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"04e8cbf4b81fb245b5c2e5e5579fdb8e4fcfbca7","unresolved":false,"context_lines":[{"line_number":299,"context_line":"                    udev \u003d pyudev.Device.from_device_file(context, dev.name)"},{"line_number":300,"context_line":"                except (ValueError, EnvironmentError) as e:"},{"line_number":301,"context_line":"                    LOG.warning(\"Device %(dev)s is inaccessible, skipping... \""},{"line_number":302,"context_line":"                    \"Error: %(error)s\", {\u0027dev\u0027: dev, \u0027error\u0027: e})"},{"line_number":303,"context_line":"                    continue"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"                # TODO(lucasagomes): Add support for operators \u003c, \u003e, \u003d, etc..."}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_bcf57484","line":302,"updated":"2015-03-13 13:07:18.000000000","message":"_LW() again","commit_id":"5a529ca4893ff5ea0a5e4ccd28d31b7dca926933"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"47ede363ee8b0cf059165018a749c564a2519853","unresolved":false,"context_lines":[{"line_number":311,"context_line":"                    if not match(\u0027size\u0027, size, dev.name):"},{"line_number":312,"context_line":"                        continue"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"                if \u0027model\u0027 in root_device_hints:"},{"line_number":315,"context_line":"                    model \u003d udev.get(\u0027ID_MODEL\u0027, None)"},{"line_number":316,"context_line":"                    if not model:"},{"line_number":317,"context_line":"                        continue"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_bc48142e","line":314,"updated":"2015-03-13 13:04:57.000000000","message":"nit: repeated pattern L314-320, can be refactored.","commit_id":"5a529ca4893ff5ea0a5e4ccd28d31b7dca926933"}],"ironic_python_agent/tests/hardware.py":[{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"ffb19f074563dd026067270d6f42bad119480877","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        mocked_execute.assert_called_once_with("},{"line_number":190,"context_line":"            \u0027lsblk\u0027, \u0027-PbdioKNAME,MODEL,SIZE,ROTA,TYPE\u0027, check_exit_code\u003d[0])"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    @mock.patch.object(pyudev.Device, \u0027from_device_file\u0027)"},{"line_number":193,"context_line":"    @mock.patch.object(utils, \u0027parse_root_device_hints\u0027)"},{"line_number":194,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027)"},{"line_number":195,"context_line":"    def test_get_os_install_device_root_device_hints(self, mocked_execute,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_c6052ec3","line":192,"updated":"2015-03-12 14:52:41.000000000","message":"Shouldn\u0027t we have a test case for wwn, serial and  vendor (vendor especially because code path is different)","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"2a624e495c0fdae26ff76ce144a1e9a9020f829e","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        mocked_execute.assert_called_once_with("},{"line_number":190,"context_line":"            \u0027lsblk\u0027, \u0027-PbdioKNAME,MODEL,SIZE,ROTA,TYPE\u0027, check_exit_code\u003d[0])"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    @mock.patch.object(pyudev.Device, \u0027from_device_file\u0027)"},{"line_number":193,"context_line":"    @mock.patch.object(utils, \u0027parse_root_device_hints\u0027)"},{"line_number":194,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027)"},{"line_number":195,"context_line":"    def test_get_os_install_device_root_device_hints(self, mocked_execute,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_b77942fe","line":192,"in_reply_to":"9a80dd14_c6052ec3","updated":"2015-03-12 15:39:01.000000000","message":"Done","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b49abfea7ff83da76767db79338e3af9d77a7ad4","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        mock_pyudev.return_value \u003d {\u0027ID_MODEL\u0027: model}"},{"line_number":202,"context_line":"        mocked_execute.return_value \u003d (BLK_DEVICE_TEMPLATE, \u0027\u0027)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        self.assertEqual(self.hardware.get_os_install_device(), \u0027/dev/sdb\u0027)"},{"line_number":205,"context_line":"        mocked_execute.assert_called_once_with("},{"line_number":206,"context_line":"            \u0027lsblk\u0027, \u0027-PbdioKNAME,MODEL,SIZE,ROTA,TYPE\u0027, check_exit_code\u003d[0])"},{"line_number":207,"context_line":"        mock_root_device.assert_called_once_with()"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_ddf17d6b","line":204,"updated":"2015-03-12 14:18:37.000000000","message":"shouldn\u0027t it be the other way: \u003cexpected\u003e, \u003cactual\u003e?","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ab67d77bee13c8a0a846f0700460c47ef3f0351b","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        mock_pyudev.return_value \u003d {\u0027ID_MODEL\u0027: model}"},{"line_number":202,"context_line":"        mocked_execute.return_value \u003d (BLK_DEVICE_TEMPLATE, \u0027\u0027)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        self.assertEqual(self.hardware.get_os_install_device(), \u0027/dev/sdb\u0027)"},{"line_number":205,"context_line":"        mocked_execute.assert_called_once_with("},{"line_number":206,"context_line":"            \u0027lsblk\u0027, \u0027-PbdioKNAME,MODEL,SIZE,ROTA,TYPE\u0027, check_exit_code\u003d[0])"},{"line_number":207,"context_line":"        mock_root_device.assert_called_once_with()"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_2310bca7","line":204,"in_reply_to":"9a80dd14_ddf17d6b","updated":"2015-03-12 14:36:05.000000000","message":"Done. It was C\u0026P from other tests","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"94b1d2c36a03adfce0852d06f7b8f655ab342608","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":13,"context_line":"# limitations under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import __builtin__"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":"from oslotest import base as test_base"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_7ae16529","line":15,"updated":"2015-03-12 18:52:01.000000000","message":"Based on line 28, I don\u0027t think should import this.  For Python 3 compatibility.","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"457783ec652f21ea7e6d0b07b8c471f21c7046c0","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":13,"context_line":"# limitations under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import __builtin__"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":"from oslotest import base as test_base"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_36efea88","line":15,"in_reply_to":"9a80dd14_7ae16529","updated":"2015-03-13 10:42:06.000000000","message":"Done","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"94b1d2c36a03adfce0852d06f7b8f655ab342608","unresolved":false,"context_lines":[{"line_number":238,"context_line":"                    mock.call(mock.ANY, \u0027/dev/sdd\u0027)]"},{"line_number":239,"context_line":"        mock_pyudev.assert_has_calls(expected)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    @mock.patch.object(__builtin__, \u0027open\u0027)"},{"line_number":242,"context_line":"    def test__get_device_vendor(self, mock_open):"},{"line_number":243,"context_line":"        fileobj \u003d mock.MagicMock(spec\u003dfile, read\u003dlambda *_: \u0027fake-vendor\u0027)"},{"line_number":244,"context_line":"        mock_open.return_value.__enter__.return_value \u003d fileobj"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_7ab88511","line":241,"updated":"2015-03-12 18:52:01.000000000","message":"Maybe this:\n\n    def test__get_device_vendor(self):\n        with mock.patch(\n                OPEN_FUNCTION_NAME, mock.mock_open(read_data\u003d\u0027fake-vendor\u0027),\n                create\u003dTrue) as mock_open:\n            vendor \u003d self.hardware._get_device_vendor(\u0027/dev/sdfake\u0027)\n            mock_open.assert_called_once_with(\n                \u0027/sys/class/block/sdfake/device/vendor\u0027, \u0027r\u0027)\n            self.assertEqual(\u0027fake-vendor\u0027, vendor)","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"457783ec652f21ea7e6d0b07b8c471f21c7046c0","unresolved":false,"context_lines":[{"line_number":238,"context_line":"                    mock.call(mock.ANY, \u0027/dev/sdd\u0027)]"},{"line_number":239,"context_line":"        mock_pyudev.assert_has_calls(expected)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    @mock.patch.object(__builtin__, \u0027open\u0027)"},{"line_number":242,"context_line":"    def test__get_device_vendor(self, mock_open):"},{"line_number":243,"context_line":"        fileobj \u003d mock.MagicMock(spec\u003dfile, read\u003dlambda *_: \u0027fake-vendor\u0027)"},{"line_number":244,"context_line":"        mock_open.return_value.__enter__.return_value \u003d fileobj"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_76b3229a","line":241,"in_reply_to":"9a80dd14_7ab88511","updated":"2015-03-13 10:42:06.000000000","message":"Done","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"26f05ed0bd5c8e8dd9235d7eb9cdd185799c5bf9","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    @mock.patch.object(__builtin__, \u0027open\u0027)"},{"line_number":242,"context_line":"    def test__get_device_vendor(self, mock_open):"},{"line_number":243,"context_line":"        fileobj \u003d mock.MagicMock(spec\u003dfile, read\u003dlambda *_: \u0027fake-vendor\u0027)"},{"line_number":244,"context_line":"        mock_open.return_value.__enter__.return_value \u003d fileobj"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        vendor \u003d self.hardware._get_device_vendor(\u0027/dev/sdfake\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_975fd4e4","line":243,"updated":"2015-03-12 18:33:06.000000000","message":"mock.mock_open() might be cleaner.\nhttp://www.voidspace.org.uk/python/mock/helpers.html#mock-open","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"457783ec652f21ea7e6d0b07b8c471f21c7046c0","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    @mock.patch.object(__builtin__, \u0027open\u0027)"},{"line_number":242,"context_line":"    def test__get_device_vendor(self, mock_open):"},{"line_number":243,"context_line":"        fileobj \u003d mock.MagicMock(spec\u003dfile, read\u003dlambda *_: \u0027fake-vendor\u0027)"},{"line_number":244,"context_line":"        mock_open.return_value.__enter__.return_value \u003d fileobj"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        vendor \u003d self.hardware._get_device_vendor(\u0027/dev/sdfake\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_96b89676","line":243,"in_reply_to":"9a80dd14_975fd4e4","updated":"2015-03-13 10:42:06.000000000","message":"Done","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"}],"ironic_python_agent/tests/utils.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b49abfea7ff83da76767db79338e3af9d77a7ad4","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        result \u003d utils.parse_root_device_hints()"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        self.assertEqual(sorted(expected), sorted(result))"},{"line_number":282,"context_line":"        self.assertEqual(sorted(expected.values()), sorted(result.values()))"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    @mock.patch.object(utils, \u0027get_agent_params\u0027)"},{"line_number":285,"context_line":"    def test_parse_root_device_hints_no_hints(self, mock_get_params):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_bd8f6922","line":282,"updated":"2015-03-12 14:18:37.000000000","message":"Can\u0027t we just compare the dictionaries? self.assertEqual(expected, result)?","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ab67d77bee13c8a0a846f0700460c47ef3f0351b","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        result \u003d utils.parse_root_device_hints()"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        self.assertEqual(sorted(expected), sorted(result))"},{"line_number":282,"context_line":"        self.assertEqual(sorted(expected.values()), sorted(result.values()))"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    @mock.patch.object(utils, \u0027get_agent_params\u0027)"},{"line_number":285,"context_line":"    def test_parse_root_device_hints_no_hints(self, mock_get_params):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_e363043f","line":282,"in_reply_to":"9a80dd14_bd8f6922","updated":"2015-03-12 14:36:05.000000000","message":"Done","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b49abfea7ff83da76767db79338e3af9d77a7ad4","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            \u0027ipa-api-url\u0027: \u0027http://1.2.3.4:1234\u0027"},{"line_number":297,"context_line":"        }"},{"line_number":298,"context_line":"        result \u003d utils.parse_root_device_hints()"},{"line_number":299,"context_line":"        self.assertEqual(12345, result[\u0027size\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_3dd1b9fb","line":299,"updated":"2015-03-12 14:18:37.000000000","message":"is it worth adding a test to show that an exception can be raised?","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ab67d77bee13c8a0a846f0700460c47ef3f0351b","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            \u0027ipa-api-url\u0027: \u0027http://1.2.3.4:1234\u0027"},{"line_number":297,"context_line":"        }"},{"line_number":298,"context_line":"        result \u003d utils.parse_root_device_hints()"},{"line_number":299,"context_line":"        self.assertEqual(12345, result[\u0027size\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_4354d053","line":299,"in_reply_to":"9a80dd14_3dd1b9fb","updated":"2015-03-12 14:36:05.000000000","message":"Done","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"}],"ironic_python_agent/utils.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"aeb4c9e85194ca5b51ee87a71c0dc4a5ef0875b7","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    if not root_device:"},{"line_number":157,"context_line":"        return {}"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    return dict((item.split(\u0027\u003d\u0027) for item in root_device.split(\u0027,\u0027)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_ae359a47","line":159,"updated":"2015-03-11 20:09:16.000000000","message":"if the hints string is incorrectly formatted, this will raise an exception. Is that OK?","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"6102de44af3f45f9bbaddb38d36d50340a18217e","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    if not root_device:"},{"line_number":157,"context_line":"        return {}"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    return dict((item.split(\u0027\u003d\u0027) for item in root_device.split(\u0027,\u0027)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_5a3f5dd6","line":159,"in_reply_to":"9a80dd14_ae359a47","updated":"2015-03-12 09:54:36.000000000","message":"Yeah, because that\u0027s an unexpected behavior. Ironic should validate the root_device in the node properties and produce this string, if it\u0027s incorrectly formated means Ironic is doing something wrong here. So raise an exception for that seems a good thing.","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"ffb19f074563dd026067270d6f42bad119480877","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"VALID_ROOT_DEVICE \u003d (\u0027size\u0027, \u0027model\u0027, \u0027wwn\u0027, \u0027serial\u0027, \u0027vendor\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def get_ordereddict(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_a38bcc66","line":29,"updated":"2015-03-12 14:52:41.000000000","message":"VALID_ROOT_DEVICE_HINTS sounds better","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"2a624e495c0fdae26ff76ce144a1e9a9020f829e","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"VALID_ROOT_DEVICE \u003d (\u0027size\u0027, \u0027model\u0027, \u0027wwn\u0027, \u0027serial\u0027, \u0027vendor\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def get_ordereddict(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_7777ca02","line":29,"in_reply_to":"9a80dd14_a38bcc66","updated":"2015-03-12 15:39:01.000000000","message":"Done","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b49abfea7ff83da76767db79338e3af9d77a7ad4","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"def normalize(string):"},{"line_number":150,"context_line":"    \"\"\"Normalise a .\"\"\""},{"line_number":151,"context_line":"    # Since we can\u0027t use space on the kernel cmdline, Ironic will"},{"line_number":152,"context_line":"    # urlencode the values."},{"line_number":153,"context_line":"    return parse.unquote(string).lower().strip()"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_d9a192aa","line":150,"updated":"2015-03-12 14:18:37.000000000","message":"Return a normalised string?\n\nmaybe you should call the method \u0027normalise\u0027 just to bug people ;)","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ab67d77bee13c8a0a846f0700460c47ef3f0351b","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"def normalize(string):"},{"line_number":150,"context_line":"    \"\"\"Normalise a .\"\"\""},{"line_number":151,"context_line":"    # Since we can\u0027t use space on the kernel cmdline, Ironic will"},{"line_number":152,"context_line":"    # urlencode the values."},{"line_number":153,"context_line":"    return parse.unquote(string).lower().strip()"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_834ec8bf","line":150,"in_reply_to":"9a80dd14_d9a192aa","updated":"2015-03-12 14:36:05.000000000","message":"Done","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b49abfea7ff83da76767db79338e3af9d77a7ad4","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    :returns: A dict with the hints or an empty dict if no hints are"},{"line_number":163,"context_line":"              passed."},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    \"\"\""},{"line_number":166,"context_line":"    root_device \u003d get_agent_params().get(\u0027root_device\u0027, None)"},{"line_number":167,"context_line":"    if not root_device:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_99c47a41","line":164,"updated":"2015-03-12 14:18:37.000000000","message":":raises ...some exception if the string is incorrectly formatted or if size isn\u0027t an integral value.","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"ffb19f074563dd026067270d6f42bad119480877","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    # Find invalid hints for logging"},{"line_number":173,"context_line":"    invalid_hints \u003d set(hints) - set(VALID_ROOT_DEVICE)"},{"line_number":174,"context_line":"    if invalid_hints:"},{"line_number":175,"context_line":"        LOG.warning(\u0027The following hints: \"%(invalid_hints)s\" are invalid \u0027"},{"line_number":176,"context_line":"                    \u0027and will be ignored. Valid hints are: \"%(valid_hints)s\"\u0027,"},{"line_number":177,"context_line":"                    {\u0027invalid_hints\u0027: \u0027, \u0027.join(invalid_hints),"},{"line_number":178,"context_line":"                     \u0027valid_hints\u0027: \u0027, \u0027.join(VALID_ROOT_DEVICE)})"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_060d8690","line":175,"updated":"2015-03-12 14:52:41.000000000","message":"i am not sure how useful is it to log things to agent ramdisks log. they are never going to reach the operator it was trigger from ironic i think.","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"2a624e495c0fdae26ff76ce144a1e9a9020f829e","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    # Find invalid hints for logging"},{"line_number":173,"context_line":"    invalid_hints \u003d set(hints) - set(VALID_ROOT_DEVICE)"},{"line_number":174,"context_line":"    if invalid_hints:"},{"line_number":175,"context_line":"        LOG.warning(\u0027The following hints: \"%(invalid_hints)s\" are invalid \u0027"},{"line_number":176,"context_line":"                    \u0027and will be ignored. Valid hints are: \"%(valid_hints)s\"\u0027,"},{"line_number":177,"context_line":"                    {\u0027invalid_hints\u0027: \u0027, \u0027.join(invalid_hints),"},{"line_number":178,"context_line":"                     \u0027valid_hints\u0027: \u0027, \u0027.join(VALID_ROOT_DEVICE)})"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_b795c2e5","line":175,"in_reply_to":"9a80dd14_060d8690","updated":"2015-03-12 15:39:01.000000000","message":"Right, I will error out here if there are invalid options so operators should be able to catch that","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b49abfea7ff83da76767db79338e3af9d77a7ad4","unresolved":false,"context_lines":[{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    # TODO(lucasagomes): Once we add operators and units (\u003e, \u003c, !\u003d,"},{"line_number":184,"context_line":"    # MiB, GB etc...) we should convert it to bytes and transform into"},{"line_number":185,"context_line":"    # an integer."},{"line_number":186,"context_line":"    if \u0027size\u0027 in hints:"},{"line_number":187,"context_line":"        # NOTE(lucasagomes): Ironic should validate before passing to"},{"line_number":188,"context_line":"        # the deploy ramdisk"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_d94a7282","line":185,"updated":"2015-03-12 14:18:37.000000000","message":"you\u0027re transforming into an integer here, so that part doesn\u0027t need to be in the comments.","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ab67d77bee13c8a0a846f0700460c47ef3f0351b","unresolved":false,"context_lines":[{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    # TODO(lucasagomes): Once we add operators and units (\u003e, \u003c, !\u003d,"},{"line_number":184,"context_line":"    # MiB, GB etc...) we should convert it to bytes and transform into"},{"line_number":185,"context_line":"    # an integer."},{"line_number":186,"context_line":"    if \u0027size\u0027 in hints:"},{"line_number":187,"context_line":"        # NOTE(lucasagomes): Ironic should validate before passing to"},{"line_number":188,"context_line":"        # the deploy ramdisk"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_63fd543b","line":185,"in_reply_to":"9a80dd14_d94a7282","updated":"2015-03-12 14:36:05.000000000","message":"Done","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b49abfea7ff83da76767db79338e3af9d77a7ad4","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        # the deploy ramdisk"},{"line_number":189,"context_line":"        hints[\u0027size\u0027] \u003d int(hints[\u0027size\u0027])"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    return hints"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_d9635218","line":191,"updated":"2015-03-12 14:18:37.000000000","message":"You don\u0027t want to remove the invalid hints from this?","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"ffb19f074563dd026067270d6f42bad119480877","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        # the deploy ramdisk"},{"line_number":189,"context_line":"        hints[\u0027size\u0027] \u003d int(hints[\u0027size\u0027])"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    return hints"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_233fdcd7","line":191,"in_reply_to":"9a80dd14_d9635218","updated":"2015-03-12 14:52:41.000000000","message":"+1 i think we should check if we have some valid hints left and should error out in that case.","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ab67d77bee13c8a0a846f0700460c47ef3f0351b","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        # the deploy ramdisk"},{"line_number":189,"context_line":"        hints[\u0027size\u0027] \u003d int(hints[\u0027size\u0027])"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    return hints"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_63ab941e","line":191,"in_reply_to":"9a80dd14_d9635218","updated":"2015-03-12 14:36:05.000000000","message":"Based on your comment at hardware.py I think we should raise an exception if invalid options r being passed","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c19a6187c84457c29ca5ca8b2035d2825640322f","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"SUPPORTED_ROOT_DEVICE_HINTS \u003d set((\u0027size\u0027, \u0027model\u0027, \u0027wwn\u0027, \u0027serial\u0027, \u0027vendor\u0027))"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def get_ordereddict(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_f5b3ade6","line":29,"updated":"2015-03-12 17:44:50.000000000","message":"\u0027ROOT_DEVICE_HINTS\u0027 is probably fine too, BUT DON\u0027T CHANGE IT ;)","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c19a6187c84457c29ca5ca8b2035d2825640322f","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"def normalize(string):"},{"line_number":150,"context_line":"    \"\"\"Return a normalized string.\"\"\""},{"line_number":151,"context_line":"    # Since we can\u0027t use space on the kernel cmdline, Ironic will"},{"line_number":152,"context_line":"    # urlencode the values."},{"line_number":153,"context_line":"    return parse.unquote(string).lower().strip()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_15d121fb","line":150,"updated":"2015-03-12 17:44:50.000000000","message":"Darn, I liked \u0027normalise\u0027. I wanted the method to be normalise() ;)","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"67ed859452513148936907b3e1a5b79ac322e156","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"def normalize(string):"},{"line_number":150,"context_line":"    \"\"\"Return a normalized string.\"\"\""},{"line_number":151,"context_line":"    # Since we can\u0027t use space on the kernel cmdline, Ironic will"},{"line_number":152,"context_line":"    # urlencode the values."},{"line_number":153,"context_line":"    return parse.unquote(string).lower().strip()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_b0b943cd","line":150,"in_reply_to":"9a80dd14_15d121fb","updated":"2015-03-12 17:55:25.000000000","message":"American English for the win! :D  Until lucas changes it....","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"457783ec652f21ea7e6d0b07b8c471f21c7046c0","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"def normalize(string):"},{"line_number":150,"context_line":"    \"\"\"Return a normalized string.\"\"\""},{"line_number":151,"context_line":"    # Since we can\u0027t use space on the kernel cmdline, Ironic will"},{"line_number":152,"context_line":"    # urlencode the values."},{"line_number":153,"context_line":"    return parse.unquote(string).lower().strip()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_560a9e8a","line":150,"in_reply_to":"9a80dd14_b0b943cd","updated":"2015-03-13 10:42:06.000000000","message":"I thought normalize was most used everywhere","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c19a6187c84457c29ca5ca8b2035d2825640322f","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    :returns: A dict with the hints or an empty dict if no hints are"},{"line_number":163,"context_line":"              passed."},{"line_number":164,"context_line":"    :raises:"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    \"\"\""},{"line_number":167,"context_line":"    root_device \u003d get_agent_params().get(\u0027root_device\u0027, None)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_5520f9f6","line":164,"updated":"2015-03-12 17:44:50.000000000","message":"errors.DeviceNotFound if there are unsupported hints (or something like that).","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"457783ec652f21ea7e6d0b07b8c471f21c7046c0","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    :returns: A dict with the hints or an empty dict if no hints are"},{"line_number":163,"context_line":"              passed."},{"line_number":164,"context_line":"    :raises:"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    \"\"\""},{"line_number":167,"context_line":"    root_device \u003d get_agent_params().get(\u0027root_device\u0027, None)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_16eca6ba","line":164,"in_reply_to":"9a80dd14_5520f9f6","updated":"2015-03-13 10:42:06.000000000","message":"Done","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"67ed859452513148936907b3e1a5b79ac322e156","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    :raises:"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    \"\"\""},{"line_number":167,"context_line":"    root_device \u003d get_agent_params().get(\u0027root_device\u0027, None)"},{"line_number":168,"context_line":"    if not root_device:"},{"line_number":169,"context_line":"        return {}"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_559399f9","line":167,"updated":"2015-03-12 17:55:25.000000000","message":"nit: The None is redundant, if \u0027get_agent_params\u0027 is a dict.  None is the default value if not found.","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"457783ec652f21ea7e6d0b07b8c471f21c7046c0","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    :raises:"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    \"\"\""},{"line_number":167,"context_line":"    root_device \u003d get_agent_params().get(\u0027root_device\u0027, None)"},{"line_number":168,"context_line":"    if not root_device:"},{"line_number":169,"context_line":"        return {}"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_f6ee32b4","line":167,"in_reply_to":"9a80dd14_559399f9","updated":"2015-03-13 10:42:06.000000000","message":"Done","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c19a6187c84457c29ca5ca8b2035d2825640322f","unresolved":false,"context_lines":[{"line_number":173,"context_line":"    # Find invalid hints for logging"},{"line_number":174,"context_line":"    not_supported \u003d set(hints) - SUPPORTED_ROOT_DEVICE_HINTS"},{"line_number":175,"context_line":"    if not_supported:"},{"line_number":176,"context_line":"        error_msg \u003d (\u0027No device can be found because he following hints: \u0027"},{"line_number":177,"context_line":"                     \u0027\"%(not_supported)s\" are not supported by this version \u0027"},{"line_number":178,"context_line":"                     \u0027of IPA. Supported hints are: \"%(supported)s\"\u0027,"},{"line_number":179,"context_line":"                    {\u0027not_supported\u0027: \u0027, \u0027.join(not_supported),"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_f501ed6a","line":176,"updated":"2015-03-12 17:44:50.000000000","message":"s/because he/because the/","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"67ed859452513148936907b3e1a5b79ac322e156","unresolved":false,"context_lines":[{"line_number":173,"context_line":"    # Find invalid hints for logging"},{"line_number":174,"context_line":"    not_supported \u003d set(hints) - SUPPORTED_ROOT_DEVICE_HINTS"},{"line_number":175,"context_line":"    if not_supported:"},{"line_number":176,"context_line":"        error_msg \u003d (\u0027No device can be found because he following hints: \u0027"},{"line_number":177,"context_line":"                     \u0027\"%(not_supported)s\" are not supported by this version \u0027"},{"line_number":178,"context_line":"                     \u0027of IPA. Supported hints are: \"%(supported)s\"\u0027,"},{"line_number":179,"context_line":"                    {\u0027not_supported\u0027: \u0027, \u0027.join(not_supported),"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_705d0b15","line":176,"updated":"2015-03-12 17:55:25.000000000","message":"s/he following/the following/","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"457783ec652f21ea7e6d0b07b8c471f21c7046c0","unresolved":false,"context_lines":[{"line_number":173,"context_line":"    # Find invalid hints for logging"},{"line_number":174,"context_line":"    not_supported \u003d set(hints) - SUPPORTED_ROOT_DEVICE_HINTS"},{"line_number":175,"context_line":"    if not_supported:"},{"line_number":176,"context_line":"        error_msg \u003d (\u0027No device can be found because he following hints: \u0027"},{"line_number":177,"context_line":"                     \u0027\"%(not_supported)s\" are not supported by this version \u0027"},{"line_number":178,"context_line":"                     \u0027of IPA. Supported hints are: \"%(supported)s\"\u0027,"},{"line_number":179,"context_line":"                    {\u0027not_supported\u0027: \u0027, \u0027.join(not_supported),"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_9637b64c","line":176,"in_reply_to":"9a80dd14_705d0b15","updated":"2015-03-13 10:42:06.000000000","message":"Done","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"457783ec652f21ea7e6d0b07b8c471f21c7046c0","unresolved":false,"context_lines":[{"line_number":173,"context_line":"    # Find invalid hints for logging"},{"line_number":174,"context_line":"    not_supported \u003d set(hints) - SUPPORTED_ROOT_DEVICE_HINTS"},{"line_number":175,"context_line":"    if not_supported:"},{"line_number":176,"context_line":"        error_msg \u003d (\u0027No device can be found because he following hints: \u0027"},{"line_number":177,"context_line":"                     \u0027\"%(not_supported)s\" are not supported by this version \u0027"},{"line_number":178,"context_line":"                     \u0027of IPA. Supported hints are: \"%(supported)s\"\u0027,"},{"line_number":179,"context_line":"                    {\u0027not_supported\u0027: \u0027, \u0027.join(not_supported),"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_7632425f","line":176,"in_reply_to":"9a80dd14_f501ed6a","updated":"2015-03-13 10:42:06.000000000","message":"Done","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c19a6187c84457c29ca5ca8b2035d2825640322f","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                     \u0027of IPA. Supported hints are: \"%(supported)s\"\u0027,"},{"line_number":179,"context_line":"                    {\u0027not_supported\u0027: \u0027, \u0027.join(not_supported),"},{"line_number":180,"context_line":"                     \u0027supported\u0027: \u0027, \u0027.join(SUPPORTED_ROOT_DEVICE_HINTS)})"},{"line_number":181,"context_line":"        raise errors.DeviceNotFound(error_msg)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    # Normalise the values"},{"line_number":184,"context_line":"    hints \u003d {k: normalize(v) for k, v in hints.iteritems()}"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_1502013e","line":181,"updated":"2015-03-12 17:44:50.000000000","message":"I\u0027m not crazy about this error being here because this is parse_root_device_hints(), not eg find_device(), but I guess it can be cleaned up later.","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c19a6187c84457c29ca5ca8b2035d2825640322f","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        # the deploy ramdisk"},{"line_number":189,"context_line":"        hints[\u0027size\u0027] \u003d int(hints[\u0027size\u0027])"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    return hints"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_95635119","line":191,"updated":"2015-03-12 17:44:50.000000000","message":"I\u0027m fine with this, but I\u0027m not sure that\u0027s what Ramesh wanted. I *think* he wanted to error out if after stripping out the invalid hints, there are 0 hints left.\n\nThat\u0027s a good question though. Ignore unsupported hints, or consider that an error.","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"457783ec652f21ea7e6d0b07b8c471f21c7046c0","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        # the deploy ramdisk"},{"line_number":189,"context_line":"        hints[\u0027size\u0027] \u003d int(hints[\u0027size\u0027])"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    return hints"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_36c8ca21","line":191,"in_reply_to":"9a80dd14_95635119","updated":"2015-03-13 10:42:06.000000000","message":"Yes, I think we should consider that an error. Since this field is all about picking a very specific type of device ignoring part of the hints sounds misleading to me. Plus, Ironic also check for valid hints[1], so in case Ironic supports more hints than the ramdisk this will at least tell the operator that the ramdisk image is out-of-date\n\n[1] https://review.openstack.org/#/c/163794/","commit_id":"5dfbb5578733d41aa0e0efca6afa519d3e07dada"}],"requirements.txt":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"aeb4c9e85194ca5b51ee87a71c0dc4a5ef0875b7","unresolved":false,"context_lines":[{"line_number":18,"context_line":"stevedore\u003e\u003d1.1.0  # Apache-2.0"},{"line_number":19,"context_line":"WSME\u003e\u003d0.6"},{"line_number":20,"context_line":"oslotest\u003e\u003d1.2.0  # Apache-2.0"},{"line_number":21,"context_line":"pyudev"}],"source_content_type":"text/plain","patch_set":4,"id":"9a80dd14_aeb4baf2","line":21,"updated":"2015-03-11 20:09:16.000000000","message":"does the ordering matter? I thought it did, but when I look in global-requirements, they seem to be mostly in alpha order.\n\nMaybe this should be before requests?","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"6102de44af3f45f9bbaddb38d36d50340a18217e","unresolved":false,"context_lines":[{"line_number":18,"context_line":"stevedore\u003e\u003d1.1.0  # Apache-2.0"},{"line_number":19,"context_line":"WSME\u003e\u003d0.6"},{"line_number":20,"context_line":"oslotest\u003e\u003d1.2.0  # Apache-2.0"},{"line_number":21,"context_line":"pyudev"}],"source_content_type":"text/plain","patch_set":4,"id":"9a80dd14_a53cbec0","line":21,"in_reply_to":"9a80dd14_aeb4baf2","updated":"2015-03-12 09:54:36.000000000","message":"hmm, I don\u0027t know honestly, I\u0027ve always added new dependencies at the end of the file. But ok I will sort it.\n\nThanks","commit_id":"c0ce6446fd0709aa646e450380d86497a5afadd4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b49abfea7ff83da76767db79338e3af9d77a7ad4","unresolved":false,"context_lines":[{"line_number":18,"context_line":"stevedore\u003e\u003d1.1.0  # Apache-2.0"},{"line_number":19,"context_line":"WSME\u003e\u003d0.6"},{"line_number":20,"context_line":"oslotest\u003e\u003d1.2.0  # Apache-2.0"},{"line_number":21,"context_line":"pyudev"}],"source_content_type":"text/plain","patch_set":7,"id":"9a80dd14_99555ac8","line":21,"updated":"2015-03-12 14:18:37.000000000","message":"hi, it was this email thread that I was thinking of [1]. I assumed that the global-requirements was in the \u0027right\u0027 order and that this was the order we should use, but it looks like there are only a few packages where the order matters and I don\u0027t see anything explicitly saying to use the order from global, so I think it is OK for this to be added to the end of the list.\n\n[1] http://lists.openstack.org/pipermail/openstack-dev/2014-September/044736.html","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"2a624e495c0fdae26ff76ce144a1e9a9020f829e","unresolved":false,"context_lines":[{"line_number":18,"context_line":"stevedore\u003e\u003d1.1.0  # Apache-2.0"},{"line_number":19,"context_line":"WSME\u003e\u003d0.6"},{"line_number":20,"context_line":"oslotest\u003e\u003d1.2.0  # Apache-2.0"},{"line_number":21,"context_line":"pyudev"}],"source_content_type":"text/plain","patch_set":7,"id":"9a80dd14_323ac0cd","line":21,"in_reply_to":"9a80dd14_26ec4a8f","updated":"2015-03-12 15:39:01.000000000","message":"Right, well I don\u0027t know I don\u0027t think it really matters the order things are in this file. If may be a bit nicer if someone is reading this file to see the dependencies in ordered alphabetically  but most of the time we just grep it to see if a given dependency is included, and \"pip install -r requirements.txt\" also doesn\u0027t care about the order.","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"8fccd533f72943651960282d340c9a9c202da4ce","unresolved":false,"context_lines":[{"line_number":18,"context_line":"stevedore\u003e\u003d1.1.0  # Apache-2.0"},{"line_number":19,"context_line":"WSME\u003e\u003d0.6"},{"line_number":20,"context_line":"oslotest\u003e\u003d1.2.0  # Apache-2.0"},{"line_number":21,"context_line":"pyudev"}],"source_content_type":"text/plain","patch_set":7,"id":"9a80dd14_7220b8f7","line":21,"in_reply_to":"9a80dd14_323ac0cd","updated":"2015-03-12 15:57:07.000000000","message":"I think the order might matter.  At least in ironic/test-requirements it has a comment about ordering matter.\n\n $ cat test-requirements.txt \n # The order of packages is significant, because pip processes them in the order\n # of appearance. Changing the order has an impact on the overall integration\n # process, which may cause wedges in the gate later.","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ba7d92e93b19867b5dfcd999f94846e8f5b3f9ce","unresolved":false,"context_lines":[{"line_number":18,"context_line":"stevedore\u003e\u003d1.1.0  # Apache-2.0"},{"line_number":19,"context_line":"WSME\u003e\u003d0.6"},{"line_number":20,"context_line":"oslotest\u003e\u003d1.2.0  # Apache-2.0"},{"line_number":21,"context_line":"pyudev"}],"source_content_type":"text/plain","patch_set":7,"id":"9a80dd14_a6d3d536","line":21,"in_reply_to":"9a80dd14_7220b8f7","updated":"2015-03-12 15:58:20.000000000","message":"oh dear *start crying*","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9074067efc711b8ca80877fbc6d8446505722c1c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"stevedore\u003e\u003d1.1.0  # Apache-2.0"},{"line_number":19,"context_line":"WSME\u003e\u003d0.6"},{"line_number":20,"context_line":"oslotest\u003e\u003d1.2.0  # Apache-2.0"},{"line_number":21,"context_line":"pyudev"}],"source_content_type":"text/plain","patch_set":7,"id":"9a80dd14_26ec4a8f","line":21,"in_reply_to":"9a80dd14_83816891","updated":"2015-03-12 14:51:25.000000000","message":"Yeah, so I\u0027m not actually sure it should be \u0027sorted\u0027 or not. ie, my question is should it use the same ordering as in global-requirements? I don\u0027t know the answer to that.","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ab67d77bee13c8a0a846f0700460c47ef3f0351b","unresolved":false,"context_lines":[{"line_number":18,"context_line":"stevedore\u003e\u003d1.1.0  # Apache-2.0"},{"line_number":19,"context_line":"WSME\u003e\u003d0.6"},{"line_number":20,"context_line":"oslotest\u003e\u003d1.2.0  # Apache-2.0"},{"line_number":21,"context_line":"pyudev"}],"source_content_type":"text/plain","patch_set":7,"id":"9a80dd14_83816891","line":21,"in_reply_to":"9a80dd14_99555ac8","updated":"2015-03-12 14:36:05.000000000","message":"I forgot on this review to sort by name, I will do on the next","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"1ead209ce7f76aaea7e430ebde5753cd336f8ab0","unresolved":false,"context_lines":[{"line_number":18,"context_line":"stevedore\u003e\u003d1.1.0  # Apache-2.0"},{"line_number":19,"context_line":"WSME\u003e\u003d0.6"},{"line_number":20,"context_line":"oslotest\u003e\u003d1.2.0  # Apache-2.0"},{"line_number":21,"context_line":"pyudev"}],"source_content_type":"text/plain","patch_set":7,"id":"9a80dd14_8967c2b6","line":21,"in_reply_to":"9a80dd14_a6d3d536","updated":"2015-03-12 16:14:25.000000000","message":"ha ha. yes, the order does matter, that\u0027s why there\u0027s that comment at the top. cuz people tried to sort them alphabetically. If you look at the email thread I mentioned in my first comment, you\u0027ll see that although the order matters, it only matters for a few of the packages. The rest can go in whatever order. The problem is knowing which order to put them in. I *thought* we were supposed to use the same ordering as in global-requirements, but I don\u0027t know if that is true or not.\n\nputting pyudev at the end is fine if all the tests/gate work, it just isn\u0027t in the same order as global-requirements.","commit_id":"4012f72f3397beae95bf2068a579f3d532015758"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"47ede363ee8b0cf059165018a749c564a2519853","unresolved":false,"context_lines":[{"line_number":13,"context_line":"oslo.utils\u003e\u003d1.2.0                       # Apache-2.0"},{"line_number":14,"context_line":"pecan\u003e\u003d0.8.0"},{"line_number":15,"context_line":"psutil\u003e\u003d1.1.1,\u003c2.0.0"},{"line_number":16,"context_line":"pyudev"},{"line_number":17,"context_line":"requests\u003e\u003d2.2.0,!\u003d2.4.0"},{"line_number":18,"context_line":"six\u003e\u003d1.9.0"},{"line_number":19,"context_line":"stevedore\u003e\u003d1.1.0  # Apache-2.0"}],"source_content_type":"text/plain","patch_set":9,"id":"9a80dd14_dc3068eb","line":16,"updated":"2015-03-13 13:04:57.000000000","message":"not sure if you wanted to add the version you had tested with.","commit_id":"5a529ca4893ff5ea0a5e4ccd28d31b7dca926933"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7d937dac3ed41cad3ed108e72fad8fba0e175c1a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"oslo.utils\u003e\u003d1.2.0                       # Apache-2.0"},{"line_number":14,"context_line":"pecan\u003e\u003d0.8.0"},{"line_number":15,"context_line":"psutil\u003e\u003d1.1.1,\u003c2.0.0"},{"line_number":16,"context_line":"pyudev"},{"line_number":17,"context_line":"requests\u003e\u003d2.2.0,!\u003d2.4.0"},{"line_number":18,"context_line":"six\u003e\u003d1.9.0"},{"line_number":19,"context_line":"stevedore\u003e\u003d1.1.0  # Apache-2.0"}],"source_content_type":"text/plain","patch_set":9,"id":"9a80dd14_dceea8b4","line":16,"in_reply_to":"9a80dd14_dc3068eb","updated":"2015-03-13 13:07:22.000000000","message":"I can\u0027t :( this has to match with the one in global-requirements[1], so I would need to cap the version there first and then do it here\n\n[1] https://github.com/openstack/requirements/blob/master/global-requirements.txt#L136","commit_id":"5a529ca4893ff5ea0a5e4ccd28d31b7dca926933"}]}
