)]}'
{"ironic/common/driver_factory.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7f02b1ea878d4fd6baf57d3c35340d1ab9922563","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    :param driver_or_hw_type: classic driver or hardware type instance object."},{"line_number":153,"context_line":"    :param interface_type: type of the interface (e.g. \u0027boot\u0027)."},{"line_number":154,"context_line":"    :param is_hardware_type: True if ``driver_or_hw_type`` is a hardware type."},{"line_number":155,"context_line":"    :returns: an entrypoint name of the calculated default implementation"},{"line_number":156,"context_line":"              or None if no default implementation can be found."},{"line_number":157,"context_line":"    :raises: InterfaceNotFoundInEntrypoint if the entry point was not found."}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_16828352","line":154,"range":{"start_line":154,"start_character":4,"end_line":154,"end_character":78},"updated":"2017-01-11 13:08:47.000000000","message":"if you want this function to be useful from outside, I think this should be calculated using isinstance inside the function instead of being passed in.","commit_id":"7cea0abdfaa91b4df72e5c3176ec6d9b3eafd4af"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"4f106fc572b8e745bd9cff46020c022f01511e38","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    :param driver_or_hw_type: classic driver or hardware type instance object."},{"line_number":153,"context_line":"    :param interface_type: type of the interface (e.g. \u0027boot\u0027)."},{"line_number":154,"context_line":"    :param is_hardware_type: True if ``driver_or_hw_type`` is a hardware type."},{"line_number":155,"context_line":"    :returns: an entrypoint name of the calculated default implementation"},{"line_number":156,"context_line":"              or None if no default implementation can be found."},{"line_number":157,"context_line":"    :raises: InterfaceNotFoundInEntrypoint if the entry point was not found."}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_e669ca8d","line":154,"range":{"start_line":154,"start_character":4,"end_line":154,"end_character":78},"in_reply_to":"ba5201f7_16828352","updated":"2017-01-11 15:00:10.000000000","message":"That\u0027s fine, but it will mean check_and_update_interfaces calculates it twice (which is why I shuffled things). I guess it\u0027s probably lightweight enough.","commit_id":"7cea0abdfaa91b4df72e5c3176ec6d9b3eafd4af"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7f02b1ea878d4fd6baf57d3c35340d1ab9922563","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        # Order of the supported list matters"},{"line_number":181,"context_line":"        for impl_class in supported:"},{"line_number":182,"context_line":"            try:"},{"line_number":183,"context_line":"                return enabled[impl_class]"},{"line_number":184,"context_line":"            except KeyError:"},{"line_number":185,"context_line":"                pass"},{"line_number":186,"context_line":"    return impl_name"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_f667bfb4","line":185,"range":{"start_line":182,"start_character":0,"end_line":185,"end_character":20},"updated":"2017-01-11 13:08:47.000000000","message":"nit: I wonder whether the flow of this function will be more readable if we only leave one \"return\" and use break here instead:\n\n try:\n   impl_name \u003d enabled[ipml_class]\n except KeyError:\n   continue\n else:\n   break","commit_id":"7cea0abdfaa91b4df72e5c3176ec6d9b3eafd4af"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"4f106fc572b8e745bd9cff46020c022f01511e38","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        # Order of the supported list matters"},{"line_number":181,"context_line":"        for impl_class in supported:"},{"line_number":182,"context_line":"            try:"},{"line_number":183,"context_line":"                return enabled[impl_class]"},{"line_number":184,"context_line":"            except KeyError:"},{"line_number":185,"context_line":"                pass"},{"line_number":186,"context_line":"    return impl_name"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_06a88e76","line":185,"range":{"start_line":182,"start_character":0,"end_line":185,"end_character":20},"in_reply_to":"ba5201f7_f667bfb4","updated":"2017-01-11 15:00:10.000000000","message":"Good point, somewhat agree, check out the next patchset.","commit_id":"7cea0abdfaa91b4df72e5c3176ec6d9b3eafd4af"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7f02b1ea878d4fd6baf57d3c35340d1ab9922563","unresolved":false,"context_lines":[{"line_number":220,"context_line":"    result \u003d False"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    # Walk through all dynamic interfaces and check/update them"},{"line_number":223,"context_line":"    for iface in factories.keys():"},{"line_number":224,"context_line":"        field_name \u003d \u0027%s_interface\u0027 % iface"},{"line_number":225,"context_line":"        # NOTE(dtantsur): objects raise NotImplementedError on accessing fields"},{"line_number":226,"context_line":"        # that are known, but missing from an object. Thus, we cannot just use"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_96dd9372","line":223,"range":{"start_line":223,"start_character":26,"end_line":223,"end_character":33},"updated":"2017-01-11 13:08:47.000000000","message":"keys() is redundant","commit_id":"7cea0abdfaa91b4df72e5c3176ec6d9b3eafd4af"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"4f106fc572b8e745bd9cff46020c022f01511e38","unresolved":false,"context_lines":[{"line_number":220,"context_line":"    result \u003d False"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    # Walk through all dynamic interfaces and check/update them"},{"line_number":223,"context_line":"    for iface in factories.keys():"},{"line_number":224,"context_line":"        field_name \u003d \u0027%s_interface\u0027 % iface"},{"line_number":225,"context_line":"        # NOTE(dtantsur): objects raise NotImplementedError on accessing fields"},{"line_number":226,"context_line":"        # that are known, but missing from an object. Thus, we cannot just use"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_46a7f6bc","line":223,"range":{"start_line":223,"start_character":26,"end_line":223,"end_character":33},"in_reply_to":"ba5201f7_96dd9372","updated":"2017-01-11 15:00:10.000000000","message":"Yeah, reading this again I\u0027m just going to make factories a list anyway.","commit_id":"7cea0abdfaa91b4df72e5c3176ec6d9b3eafd4af"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8f880c4cafdbe159559d66a7cb0803628baa839f","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                                  hardware_type.AbstractHardwareType)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    if is_hardware_type:"},{"line_number":215,"context_line":"        factories \u003d _INTERFACE_LOADERS.keys()"},{"line_number":216,"context_line":"    else:"},{"line_number":217,"context_line":"        # Only network and storage interfaces are dynamic for classic drivers"},{"line_number":218,"context_line":"        factories \u003d [\u0027network\u0027, \u0027storage\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a3c09a3_c980f98d","line":215,"updated":"2017-01-18 12:06:24.000000000","message":"nit: keys() is redundant, iterating over a dict gives you keys anyway","commit_id":"472abf43b03ee5ce8aaf25a89732a318cd9cf680"}]}
