)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"db3a356b6184d407c5113ae73d15045e63f777d7","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This allows the agent to call a method on all hardware managers"},{"line_number":10,"context_line":"that support the hardware and return a list of their responses. This"},{"line_number":11,"context_line":"will be useful for implementing get_clean_steps() in cleaning."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I76bf8ec18df1dc16c4b9d942800b8a1efcde9e65"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a80dd14_41bf8c60","line":12,"updated":"2015-03-11 22:06:41.000000000","message":"Should there be a link to a blue print? Or maybe you don\u0027t do that in IPA.","commit_id":"310e5efac9f7bd46400c11898978956e8590d8bd"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"9f97429ee3b2b4e3a638653efe70f4dad5daec11","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This allows the agent to call a method on all hardware managers"},{"line_number":10,"context_line":"that support the hardware and return a list of their responses. This"},{"line_number":11,"context_line":"will be useful for implementing get_clean_steps() in cleaning."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I76bf8ec18df1dc16c4b9d942800b8a1efcde9e65"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a80dd14_aa5d7d4a","line":12,"in_reply_to":"9a80dd14_41bf8c60","updated":"2015-03-11 23:33:04.000000000","message":"Hmm I think so, since this is all the Ironic project. It\u0027s not strictly for cleaning, but why not?","commit_id":"310e5efac9f7bd46400c11898978956e8590d8bd"}],"ironic_python_agent/hardware.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"db3a356b6184d407c5113ae73d15045e63f777d7","unresolved":false,"context_lines":[{"line_number":379,"context_line":"    return _global_managers"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"def dispatch_to_all_managers(method, *args, **kwargs):"},{"line_number":383,"context_line":"    \"\"\"Dispatch a method to all hardware managers."},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"    Dispatches the given method in priority order as sorted by"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_a4ae96e5","line":382,"updated":"2015-03-11 22:06:41.000000000","message":"I feel like some of this code can be combined with code from dispatch_to_managers.\n\nMaybe some method eg _dispatch_to_managers(num_managers, method, *args, **kwargs) where num_managers \u003d 0 or -1 for \u0027all\u0027?","commit_id":"310e5efac9f7bd46400c11898978956e8590d8bd"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"9f97429ee3b2b4e3a638653efe70f4dad5daec11","unresolved":false,"context_lines":[{"line_number":379,"context_line":"    return _global_managers"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"def dispatch_to_all_managers(method, *args, **kwargs):"},{"line_number":383,"context_line":"    \"\"\"Dispatch a method to all hardware managers."},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"    Dispatches the given method in priority order as sorted by"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_0a7cc9b4","line":382,"updated":"2015-03-11 23:33:04.000000000","message":"I think they\u0027re very similar, but different enough that trying to combine them just results in more confusing code. They do different things with the return code, and I\u0027m generally opposed to functions that could return a single item or a list of items. dispatch_to_managers expects to not get to the end of the for loop, where as dispatch_to_all_managers does expect to finish the loop. If they were much longer, I\u0027d consider trying to combine them, but they\u0027re quite small.","commit_id":"310e5efac9f7bd46400c11898978956e8590d8bd"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"db3a356b6184d407c5113ae73d15045e63f777d7","unresolved":false,"context_lines":[{"line_number":393,"context_line":"    :param **kwargs: keyword arguments to dispatched method"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"    :returns: result of successful dispatch of method. Empty if no responses"},{"line_number":396,"context_line":"        are returned or all managers raise IncompatibleHardwareMethodError."},{"line_number":397,"context_line":"    \"\"\""},{"line_number":398,"context_line":"    responses \u003d []"},{"line_number":399,"context_line":"    managers \u003d _get_managers()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_2131b80b","line":396,"updated":"2015-03-11 22:06:41.000000000","message":"Is this a list of responses? Does it include the manager that was used to get the response?","commit_id":"310e5efac9f7bd46400c11898978956e8590d8bd"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"9f97429ee3b2b4e3a638653efe70f4dad5daec11","unresolved":false,"context_lines":[{"line_number":393,"context_line":"    :param **kwargs: keyword arguments to dispatched method"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"    :returns: result of successful dispatch of method. Empty if no responses"},{"line_number":396,"context_line":"        are returned or all managers raise IncompatibleHardwareMethodError."},{"line_number":397,"context_line":"    \"\"\""},{"line_number":398,"context_line":"    responses \u003d []"},{"line_number":399,"context_line":"    managers \u003d _get_managers()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_8ad439be","line":396,"in_reply_to":"9a80dd14_2131b80b","updated":"2015-03-11 23:33:04.000000000","message":"It is a list (I\u0027ll add). If doesn\u0027t include which manager returned the responses. If that\u0027s required info, it can be included in the response.","commit_id":"310e5efac9f7bd46400c11898978956e8590d8bd"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"db3a356b6184d407c5113ae73d15045e63f777d7","unresolved":false,"context_lines":[{"line_number":403,"context_line":"                response \u003d getattr(manager, method)(*args, **kwargs)"},{"line_number":404,"context_line":"                if response:"},{"line_number":405,"context_line":"                    responses.append(response)"},{"line_number":406,"context_line":"            except (errors.IncompatibleHardwareMethodError,):"},{"line_number":407,"context_line":"                LOG.debug(\u0027HardwareManager {0} does not support {1}\u0027"},{"line_number":408,"context_line":"                          .format(manager, method))"},{"line_number":409,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_e105e014","line":406,"updated":"2015-03-11 22:06:41.000000000","message":"don\u0027t need the \u0027,\u0027?","commit_id":"310e5efac9f7bd46400c11898978956e8590d8bd"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"9f97429ee3b2b4e3a638653efe70f4dad5daec11","unresolved":false,"context_lines":[{"line_number":403,"context_line":"                response \u003d getattr(manager, method)(*args, **kwargs)"},{"line_number":404,"context_line":"                if response:"},{"line_number":405,"context_line":"                    responses.append(response)"},{"line_number":406,"context_line":"            except (errors.IncompatibleHardwareMethodError,):"},{"line_number":407,"context_line":"                LOG.debug(\u0027HardwareManager {0} does not support {1}\u0027"},{"line_number":408,"context_line":"                          .format(manager, method))"},{"line_number":409,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_4af16169","line":406,"in_reply_to":"9a80dd14_e105e014","updated":"2015-03-11 23:33:04.000000000","message":"Done","commit_id":"310e5efac9f7bd46400c11898978956e8590d8bd"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"53a62d2f247548c14dd9fca88fc2bb06cd694c0d","unresolved":false,"context_lines":[{"line_number":395,"context_line":"    :returns: list of results from the hardware managers that support the call"},{"line_number":396,"context_line":"        in priority order, as determined by `_get_managers()`."},{"line_number":397,"context_line":"        Empty if no responses are returned or all managers raise"},{"line_number":398,"context_line":"        IncompatibleHardwareMethodError."},{"line_number":399,"context_line":"    \"\"\""},{"line_number":400,"context_line":"    responses \u003d []"},{"line_number":401,"context_line":"    managers \u003d _get_managers()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_0b410239","line":398,"updated":"2015-03-12 18:08:27.000000000","message":"I think this should be a dict + include what hardware manager returned what values. This will be important for the next patches, in being able to show operators which hardware manager added which step to cleaning (or zapping, as the case may be).","commit_id":"b038120501e3ccdfb2a4005d1e81709bc62d3bdf"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"3207fcc99f69368cc11a6eef153762706c7c1edd","unresolved":false,"context_lines":[{"line_number":395,"context_line":"    :returns: list of results from the hardware managers that support the call"},{"line_number":396,"context_line":"        in priority order, as determined by `_get_managers()`."},{"line_number":397,"context_line":"        Empty if no responses are returned or all managers raise"},{"line_number":398,"context_line":"        IncompatibleHardwareMethodError."},{"line_number":399,"context_line":"    \"\"\""},{"line_number":400,"context_line":"    responses \u003d []"},{"line_number":401,"context_line":"    managers \u003d _get_managers()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_80d8671f","line":398,"in_reply_to":"9a80dd14_0b410239","updated":"2015-03-12 21:51:12.000000000","message":"Done","commit_id":"b038120501e3ccdfb2a4005d1e81709bc62d3bdf"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8db480794454ffcd4be5851475e5b4925c101ff2","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        if getattr(manager, method, None):"},{"line_number":404,"context_line":"            try:"},{"line_number":405,"context_line":"                response \u003d getattr(manager, method)(*args, **kwargs)"},{"line_number":406,"context_line":"                if response:"},{"line_number":407,"context_line":"                    responses.append(response)"},{"line_number":408,"context_line":"            except errors.IncompatibleHardwareMethodError:"},{"line_number":409,"context_line":"                LOG.debug(\u0027HardwareManager {0} does not support {1}\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_9705147c","line":406,"updated":"2015-03-12 18:39:44.000000000","message":"To be clear then, you only want to return a response if the response is not None or not 0 or not some empty tuple/dict ?\n\nThis is a different behavior from dispatch_to_managers(), which returns the response (whatever it is) from invoking the method.","commit_id":"b038120501e3ccdfb2a4005d1e81709bc62d3bdf"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"392be36debc791ef0c81640acf6f0d54c42fa28a","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        if getattr(manager, method, None):"},{"line_number":404,"context_line":"            try:"},{"line_number":405,"context_line":"                response \u003d getattr(manager, method)(*args, **kwargs)"},{"line_number":406,"context_line":"                if response:"},{"line_number":407,"context_line":"                    responses.append(response)"},{"line_number":408,"context_line":"            except errors.IncompatibleHardwareMethodError:"},{"line_number":409,"context_line":"                LOG.debug(\u0027HardwareManager {0} does not support {1}\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_54f9cd7e","line":406,"in_reply_to":"9a80dd14_8074e7fe","updated":"2015-03-12 23:11:58.000000000","message":"I wound up reverting this after talking to Jay. We\u0027ll return whatever the response is (if there\u0027s a response). If there\u0027s an incompatibleHardwareMethodError, we won\u0027t add that manager to the responses dict. The argument was that if we defaulted to None, it\u0027d be confusing whether it was incompatible or if the function actually returned None.","commit_id":"b038120501e3ccdfb2a4005d1e81709bc62d3bdf"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"3207fcc99f69368cc11a6eef153762706c7c1edd","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        if getattr(manager, method, None):"},{"line_number":404,"context_line":"            try:"},{"line_number":405,"context_line":"                response \u003d getattr(manager, method)(*args, **kwargs)"},{"line_number":406,"context_line":"                if response:"},{"line_number":407,"context_line":"                    responses.append(response)"},{"line_number":408,"context_line":"            except errors.IncompatibleHardwareMethodError:"},{"line_number":409,"context_line":"                LOG.debug(\u0027HardwareManager {0} does not support {1}\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_8074e7fe","line":406,"in_reply_to":"9a80dd14_9705147c","updated":"2015-03-12 21:51:12.000000000","message":"Hmm that is true. I think the check is unnecessary and I\u0027ll default to None as a response, so that it\u0027s obvious it returned nothing.","commit_id":"b038120501e3ccdfb2a4005d1e81709bc62d3bdf"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4caaa0340f62c9929b7a0f6a578f5a39ed467a82","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        else:"},{"line_number":412,"context_line":"            LOG.debug(\u0027HardwareManager {0} does not have method {1}\u0027"},{"line_number":413,"context_line":"                      .format(manager, method))"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"    return responses"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_cbf36a08","line":414,"updated":"2015-03-12 18:10:03.000000000","message":"I wonder if this should raise HardwareManagerMethodNotFound in case all managers raise IncompatibleHardwareMethodError (instead of returning an empty list), so we keep the same behavior as dispatch_to_managers()","commit_id":"b038120501e3ccdfb2a4005d1e81709bc62d3bdf"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"3207fcc99f69368cc11a6eef153762706c7c1edd","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        else:"},{"line_number":412,"context_line":"            LOG.debug(\u0027HardwareManager {0} does not have method {1}\u0027"},{"line_number":413,"context_line":"                      .format(manager, method))"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"    return responses"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_235b45f7","line":414,"in_reply_to":"9a80dd14_cbf36a08","updated":"2015-03-12 21:51:12.000000000","message":"I agree, especially with how it\u0027ll need to change re: Jay\u0027s comments.","commit_id":"b038120501e3ccdfb2a4005d1e81709bc62d3bdf"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a8e1646d3105302e76ba41a0e0b72e34b5aca9e3","unresolved":false,"context_lines":[{"line_number":397,"context_line":"    :returns: a dictionary with keys for each hardware manager that returns"},{"line_number":398,"context_line":"        a response and the value as a list of results from that hardware"},{"line_number":399,"context_line":"        manager. Empty if no responses are returned or all managers raise"},{"line_number":400,"context_line":"        IncompatibleHardwareMethodError."},{"line_number":401,"context_line":"    \"\"\""},{"line_number":402,"context_line":"    responses \u003d collections.defaultdict(list)"},{"line_number":403,"context_line":"    managers \u003d _get_managers()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_96b8ad12","line":400,"updated":"2015-03-12 22:10:03.000000000","message":"Instead of that last sentence, raises errors.HardwareManagerMethodNotFound","commit_id":"9bb4a7183844e0d6ee3f7b66ffbc33eae61e88c9"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"6a710d429839c6fda50232704e7ff81ce9c93875","unresolved":false,"context_lines":[{"line_number":397,"context_line":"    :returns: a dictionary with keys for each hardware manager that returns"},{"line_number":398,"context_line":"        a response and the value as a list of results from that hardware"},{"line_number":399,"context_line":"        manager. Empty if no responses are returned or all managers raise"},{"line_number":400,"context_line":"        IncompatibleHardwareMethodError."},{"line_number":401,"context_line":"    \"\"\""},{"line_number":402,"context_line":"    responses \u003d collections.defaultdict(list)"},{"line_number":403,"context_line":"    managers \u003d _get_managers()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_b605b17b","line":400,"in_reply_to":"9a80dd14_96b8ad12","updated":"2015-03-12 22:16:49.000000000","message":"Done","commit_id":"9bb4a7183844e0d6ee3f7b66ffbc33eae61e88c9"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"f40e709f5cf16ddf166b9ac6c67ba49edd77f8d5","unresolved":false,"context_lines":[{"line_number":393,"context_line":"    :param *args: arguments to dispatched method"},{"line_number":394,"context_line":"    :param **kwargs: keyword arguments to dispatched method"},{"line_number":395,"context_line":"    :raises errors.HardwareManagerMethodNotFound: if all managers raise"},{"line_number":396,"context_line":"        IncompatibleHardwareMethodError."},{"line_number":397,"context_line":"    :returns: a dictionary with keys for each hardware manager that returns"},{"line_number":398,"context_line":"        a response and the value as a list of results from that hardware"},{"line_number":399,"context_line":"        manager."}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_9c5ef043","line":396,"updated":"2015-03-13 13:27:40.000000000","message":"nit: Can also raise HardwareManagerNotFound.","commit_id":"3e6b57a8bca9813340226e3d73e0d0493117a6df"}],"ironic_python_agent/tests/multi_hardware.py":[{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"53a62d2f247548c14dd9fca88fc2bb06cd694c0d","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def counted(fn):"},{"line_number":24,"context_line":"    def wrapper(*args, **kwargs):"},{"line_number":25,"context_line":"        wrapper.called \u003d 1"},{"line_number":26,"context_line":"        return fn(*args, **kwargs)"},{"line_number":27,"context_line":"    wrapper.called \u003d 0"},{"line_number":28,"context_line":"    wrapper.__name__ \u003d fn.__name__"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_6b5d1e15","line":25,"updated":"2015-03-12 18:08:27.000000000","message":"This breaks any negative testing on whether we call the same manager more than once. I understand the old way was leaky, but this has it\u0027s own problem too.","commit_id":"b038120501e3ccdfb2a4005d1e81709bc62d3bdf"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"3207fcc99f69368cc11a6eef153762706c7c1edd","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def counted(fn):"},{"line_number":24,"context_line":"    def wrapper(*args, **kwargs):"},{"line_number":25,"context_line":"        wrapper.called \u003d 1"},{"line_number":26,"context_line":"        return fn(*args, **kwargs)"},{"line_number":27,"context_line":"    wrapper.called \u003d 0"},{"line_number":28,"context_line":"    wrapper.__name__ \u003d fn.__name__"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_c390a945","line":25,"in_reply_to":"9a80dd14_6b5d1e15","updated":"2015-03-12 21:51:12.000000000","message":"Done","commit_id":"b038120501e3ccdfb2a4005d1e81709bc62d3bdf"}]}
