)]}'
{"os_net_config/objects.py":[{"author":{"_account_id":12398,"name":"Dan Sneddon","email":"dsneddon@redhat.com","username":"dsneddon"},"change_message_id":"dd76fe4bd95b4414d713fbd27b7757ae8b878ea2","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                                     (nic_mapped, nic))"},{"line_number":104,"context_line":"                        nic_mapped \u003d nic"},{"line_number":105,"context_line":"                        break"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"                else:"},{"line_number":108,"context_line":"                    # The mac could not be found"},{"line_number":109,"context_line":"                    logger.warning(\u0027mac %s not found in available nics (%s)\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"bff0334d_359fb851","line":106,"updated":"2017-04-05 18:57:21.000000000","message":"Actually, I don\u0027t think you want the whitespace here. That was here to differentiate the block above from the if statement below, but you probably want to delete the whitespace so the else: is in the same block as the if: statement in L101","commit_id":"39130c6d4ed81506c2f64430a48e40c2789d83d0"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"794b0e5df6876da113f877ce716ca5daa9cf986d","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                                     (nic_mapped, nic))"},{"line_number":104,"context_line":"                        nic_mapped \u003d nic"},{"line_number":105,"context_line":"                        break"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"                else:"},{"line_number":108,"context_line":"                    # The mac could not be found"},{"line_number":109,"context_line":"                    logger.warning(\u0027mac %s not found in available nics (%s)\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"bff0334d_e173d24c","line":106,"in_reply_to":"bff0334d_359fb851","updated":"2017-04-05 21:01:08.000000000","message":"Good point, fixed.","commit_id":"39130c6d4ed81506c2f64430a48e40c2789d83d0"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"9e607c891cf0a5b89a39c5c5bd0d5ef8392e4809","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                # nic doesn\u0027t exist on this system"},{"line_number":114,"context_line":"                logger.warning(\u0027nic %s not found in available nics (%s)\u0027"},{"line_number":115,"context_line":"                               % (nic_mapped, \u0027, \u0027.join(available_nics)))"},{"line_number":116,"context_line":"                continue"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"            # Duplicate mappings are not allowed"},{"line_number":119,"context_line":"            if nic_mapped in _MAPPED_NICS.values():"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_ec758665","line":116,"updated":"2017-04-10 13:32:56.000000000","message":"now that this code maps inactive nics, I wonder if this scenario should be an error case instead of just a warning.\n\nit seems like it\u0027s an error if an operator has a mac address in their mapping file that does not even exist on the system.","commit_id":"06e459f3b9f71cf8f517e50a5c86531ea16432e8"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"a36a847ef79db1e20be62b14f4df155b533e40e9","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                # nic doesn\u0027t exist on this system"},{"line_number":114,"context_line":"                logger.warning(\u0027nic %s not found in available nics (%s)\u0027"},{"line_number":115,"context_line":"                               % (nic_mapped, \u0027, \u0027.join(available_nics)))"},{"line_number":116,"context_line":"                continue"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"            # Duplicate mappings are not allowed"},{"line_number":119,"context_line":"            if nic_mapped in _MAPPED_NICS.values():"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_ffa1a647","line":116,"in_reply_to":"bff0334d_ec758665","updated":"2017-04-10 14:13:28.000000000","message":"Agree.  I changed both the checks for mac and the nic to log an error since they indicate an invalid entry in mapping file.","commit_id":"06e459f3b9f71cf8f517e50a5c86531ea16432e8"}],"os_net_config/utils.py":[{"author":{"_account_id":12398,"name":"Dan Sneddon","email":"dsneddon@redhat.com","username":"dsneddon"},"change_message_id":"dd76fe4bd95b4414d713fbd27b7757ae8b878ea2","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    return _is_available_nic(interface_name, True)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def _is_available_nic(interface_name, check_active):"},{"line_number":99,"context_line":"    try:"},{"line_number":100,"context_line":"        if interface_name \u003d\u003d \u0027lo\u0027:"},{"line_number":101,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":3,"id":"bff0334d_f569508b","line":98,"range":{"start_line":98,"start_character":38,"end_line":98,"end_character":50},"updated":"2017-04-05 18:57:21.000000000","message":"Why aren\u0027t you setting a default here, like check_active\u003dTrue? That way, you wouldn\u0027t need to pass check_active unless you wanted to change the default behavior.","commit_id":"39130c6d4ed81506c2f64430a48e40c2789d83d0"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"794b0e5df6876da113f877ce716ca5daa9cf986d","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    return _is_available_nic(interface_name, True)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def _is_available_nic(interface_name, check_active):"},{"line_number":99,"context_line":"    try:"},{"line_number":100,"context_line":"        if interface_name \u003d\u003d \u0027lo\u0027:"},{"line_number":101,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":3,"id":"bff0334d_01f356a0","line":98,"range":{"start_line":98,"start_character":38,"end_line":98,"end_character":50},"in_reply_to":"bff0334d_f569508b","updated":"2017-04-05 21:01:08.000000000","message":"Added default.","commit_id":"39130c6d4ed81506c2f64430a48e40c2789d83d0"},{"author":{"_account_id":12398,"name":"Dan Sneddon","email":"dsneddon@redhat.com","username":"dsneddon"},"change_message_id":"dd76fe4bd95b4414d713fbd27b7757ae8b878ea2","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        vf_path_check \u003d _SYS_CLASS_NET + \u0027/%s/device/physfn\u0027 % interface_name"},{"line_number":120,"context_line":"        is_sriov_vf \u003d os.path.isdir(vf_path_check)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        if (has_device_dir and (not check_active or operstate \u003d\u003d \u0027up\u0027) and"},{"line_number":123,"context_line":"                address and not is_sriov_vf):"},{"line_number":124,"context_line":"            return True"},{"line_number":125,"context_line":"        else:"},{"line_number":126,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":3,"id":"bff0334d_151b941b","line":123,"range":{"start_line":122,"start_character":11,"end_line":123,"end_character":44},"updated":"2017-04-05 18:57:21.000000000","message":"I might rewrite this for visual clarity like:\n\nif (has_device_dir and address and not is_sriov_vf and\n        (not check_active or operstate \u003d\u003d \u0027up\u0027))","commit_id":"39130c6d4ed81506c2f64430a48e40c2789d83d0"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"794b0e5df6876da113f877ce716ca5daa9cf986d","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        vf_path_check \u003d _SYS_CLASS_NET + \u0027/%s/device/physfn\u0027 % interface_name"},{"line_number":120,"context_line":"        is_sriov_vf \u003d os.path.isdir(vf_path_check)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        if (has_device_dir and (not check_active or operstate \u003d\u003d \u0027up\u0027) and"},{"line_number":123,"context_line":"                address and not is_sriov_vf):"},{"line_number":124,"context_line":"            return True"},{"line_number":125,"context_line":"        else:"},{"line_number":126,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":3,"id":"bff0334d_c178cef9","line":123,"range":{"start_line":122,"start_character":11,"end_line":123,"end_character":44},"in_reply_to":"bff0334d_151b941b","updated":"2017-04-05 21:01:08.000000000","message":"Good idea, changed to make more readable.","commit_id":"39130c6d4ed81506c2f64430a48e40c2789d83d0"},{"author":{"_account_id":12398,"name":"Dan Sneddon","email":"dsneddon@redhat.com","username":"dsneddon"},"change_message_id":"dd76fe4bd95b4414d713fbd27b7757ae8b878ea2","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"def ordered_available_nics():"},{"line_number":144,"context_line":"    return _ordered_nics(False)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"def ordered_active_nics():"}],"source_content_type":"text/x-python","patch_set":3,"id":"bff0334d_75bae0de","line":144,"range":{"start_line":144,"start_character":4,"end_line":144,"end_character":31},"updated":"2017-04-05 18:57:21.000000000","message":"For clarity, I might write:\n    return _ordered_nics(check_active\u003dFalse)","commit_id":"39130c6d4ed81506c2f64430a48e40c2789d83d0"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"9e607c891cf0a5b89a39c5c5bd0d5ef8392e4809","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        is_sriov_vf \u003d os.path.isdir(vf_path_check)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        if (has_device_dir and address and not is_sriov_vf and"},{"line_number":123,"context_line":"                (not check_active or operstate \u003d\u003d \u0027up\u0027)):"},{"line_number":124,"context_line":"            return True"},{"line_number":125,"context_line":"        else:"},{"line_number":126,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_4ca8f28b","line":123,"updated":"2017-04-10 13:32:56.000000000","message":"this is quite the evaluation :)","commit_id":"06e459f3b9f71cf8f517e50a5c86531ea16432e8"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"a36a847ef79db1e20be62b14f4df155b533e40e9","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        is_sriov_vf \u003d os.path.isdir(vf_path_check)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        if (has_device_dir and address and not is_sriov_vf and"},{"line_number":123,"context_line":"                (not check_active or operstate \u003d\u003d \u0027up\u0027)):"},{"line_number":124,"context_line":"            return True"},{"line_number":125,"context_line":"        else:"},{"line_number":126,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_2220159b","line":123,"in_reply_to":"bff0334d_4ca8f28b","updated":"2017-04-10 14:13:28.000000000","message":"Yeah, agree that clause seems too complex with this change.  I changed it to evaluate the variables individually and return False.","commit_id":"06e459f3b9f71cf8f517e50a5c86531ea16432e8"}]}
