)]}'
{"ironic/nova/virt/ironic/ironic_driver_fields.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"12b0a05caa8ed5ec9a1def996fa81fcd4eb296ed","unresolved":false,"context_lines":[{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class DriverFieldsFactory(object):"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def __new__(cls, node):"},{"line_number":36,"context_line":"        if \u0027pxe\u0027 in node.driver:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2Fc3o%3D","line":33,"updated":"2014-04-14 14:21:22.000000000","message":"Wow :) Any particular reason this cannot be a function (with __init__ moved to GenericDriverFields)? This way of inheritance seems a bit confusing to me","commit_id":"68a37755468b7c2a9bf67acccccbe8ccd2b02d9c"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"075212064bda60e526d6912adc5e1f98cba3474f","unresolved":false,"context_lines":[{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class DriverFieldsFactory(object):"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def __new__(cls, node):"},{"line_number":36,"context_line":"        if \u0027pxe\u0027 in node.driver:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FcGo%3D","line":33,"in_reply_to":"AAAAW3%2F%2Fc3o%3D","updated":"2014-04-14 15:25:43.000000000","message":"heh, well was just following some design pattern. But might be overkill, I will refactor this part and have a factory() function to do it.","commit_id":"68a37755468b7c2a9bf67acccccbe8ccd2b02d9c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"aab8d3105cbe45094841b9435146e2fdb79326b1","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    :returns: The correct instance for a given node."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    \"\"\""},{"line_number":39,"context_line":"    if \u0027pxe\u0027 in node.driver:"},{"line_number":40,"context_line":"        return PXEDriverFields(node)"},{"line_number":41,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2Fav0%3D","line":38,"updated":"2014-04-14 18:04:43.000000000","message":"Could you please enhance the docstring? For example, I am not familiar with this part of the code and it required me to read the whole module to understand. Also :rtype: is GenericDriverFields, \"correct instance\" ~ \"instance, associated with node\u0027s driver\" or something.\n\nName \"factory\" is also arguable, it does not return a factory :) I would just call it driver_fields or driver_fields_for_node, like this, but I don\u0027t insist here.","commit_id":"76777131a3af9ff0a0883a0194a877144e0563bb"}],"ironic/nova/virt/ironic/patcher.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c16c1dbd26a6b26e39d46029c240e0fb34c61312","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        values \u003d []"},{"line_number":58,"context_line":"        extra_specs \u003d flavor[\u0027extra_specs\u0027]"},{"line_number":59,"context_line":"        for key in [\u0027baremetal:deploy_kernel_id\u0027,"},{"line_number":60,"context_line":"                    \u0027baremetal:deploy_ramdisk_id\u0027]:"},{"line_number":61,"context_line":"            try:"},{"line_number":62,"context_line":"                values.append(extra_specs[key])"},{"line_number":63,"context_line":"            except KeyError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAW3%2F%2FUss%3D","line":60,"updated":"2014-04-15 11:23:49.000000000","message":"As always, I prefer tuples to lists in situations like this, but it does not require new versions of patch :)","commit_id":"f6b9fe6ea2c201b418532c1b03d0e1636fccd9fb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c16c1dbd26a6b26e39d46029c240e0fb34c61312","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                msg \u003d (_(\"\u0027%s\u0027 not found in flavor\u0027s extra_specs\") % key)"},{"line_number":65,"context_line":"                LOG.error(msg)"},{"line_number":66,"context_line":"                raise exception.InvalidParameterValue(message\u003dmsg)"},{"line_number":67,"context_line":"        return values"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def get_deploy_patch(self, instance, image_meta, flavor):"},{"line_number":70,"context_line":"        \"\"\"Build a patch to add the required fields to deploy a node."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAW3%2F%2FUrk%3D","line":67,"updated":"2014-04-15 11:23:49.000000000","message":"try:\n return tuple(extra_specs[key] for key in (\"...\", \"...\"))\nexcept KeyError as ex:\n  # str(ex) is a wrong key\nWould be much better to me, but again does not deserve -1","commit_id":"f6b9fe6ea2c201b418532c1b03d0e1636fccd9fb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c16c1dbd26a6b26e39d46029c240e0fb34c61312","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            if field in driver_info:"},{"line_number":113,"context_line":"                patch.append({\u0027op\u0027: \u0027remove\u0027,"},{"line_number":114,"context_line":"                              \u0027path\u0027: \u0027/driver_info/%s\u0027 % field})"},{"line_number":115,"context_line":"        return patch"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAW3%2F%2FUqk%3D","line":115,"updated":"2014-04-15 11:23:49.000000000","message":"Again, I would argue, that list comprehension would be shorter and easier to read.","commit_id":"f6b9fe6ea2c201b418532c1b03d0e1636fccd9fb"}]}
