)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"c98449c6b850f962a775dc49944ddfeff22ca5de","unresolved":false,"context_lines":[{"line_number":13,"context_line":"conductors. Also when calculating the defaults, we\u0027ll need access"},{"line_number":14,"context_line":"to a real hardware type object, which may not be possible on API side."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This change moves the check on network interface to driver_factor.py"},{"line_number":17,"context_line":"and moves node creation from API to conductor side."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"A side effect of this change is that objects.Node.network_interface"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5a74a57a_8e803848","line":16,"range":{"start_line":16,"start_character":52,"end_line":16,"end_character":65},"updated":"2016-11-25 12:04:14.000000000","message":"nit - factory","commit_id":"629c6a80d6144796da77a78848889025245dd850"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"84049f166eede9134cc6b661e8a51f169030d647","unresolved":false,"context_lines":[{"line_number":13,"context_line":"conductors. Also when calculating the defaults, we\u0027ll need access"},{"line_number":14,"context_line":"to a real hardware type object, which may not be possible on API side."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This change moves the check on network interface to driver_factor.py"},{"line_number":17,"context_line":"and moves node creation from API to conductor side."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"A side effect of this change is that objects.Node.network_interface"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5a74a57a_d427e3b3","line":16,"range":{"start_line":16,"start_character":52,"end_line":16,"end_character":65},"in_reply_to":"5a74a57a_8e803848","updated":"2016-11-28 13:27:41.000000000","message":"Done","commit_id":"629c6a80d6144796da77a78848889025245dd850"}],"ironic/api/controllers/v1/node.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"422904fff5a6c4ff3b0e8006b9fa000d380a832d","unresolved":false,"context_lines":[{"line_number":1434,"context_line":"        new_node \u003d objects.Node(pecan.request.context,"},{"line_number":1435,"context_line":"                                **node.as_dict())"},{"line_number":1436,"context_line":"        new_node \u003d pecan.request.rpcapi.create_node("},{"line_number":1437,"context_line":"            pecan.request.context, new_node, topic)"},{"line_number":1438,"context_line":"        # Set the HTTP Location Header"},{"line_number":1439,"context_line":"        pecan.response.location \u003d link.build_url(\u0027nodes\u0027, new_node.uuid)"},{"line_number":1440,"context_line":"        return Node.convert_with_links(new_node)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_6e9e0164","line":1437,"updated":"2016-11-29 12:52:01.000000000","message":"As I understand HTTP 404 will be returned from API if validation on conductor side failed, in the old code API returned HTTP 400. Maybe API version should be bumped.","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"59382e628801e6f8943433b601c0d0c95efc938d","unresolved":false,"context_lines":[{"line_number":1434,"context_line":"        new_node \u003d objects.Node(pecan.request.context,"},{"line_number":1435,"context_line":"                                **node.as_dict())"},{"line_number":1436,"context_line":"        new_node \u003d pecan.request.rpcapi.create_node("},{"line_number":1437,"context_line":"            pecan.request.context, new_node, topic)"},{"line_number":1438,"context_line":"        # Set the HTTP Location Header"},{"line_number":1439,"context_line":"        pecan.response.location \u003d link.build_url(\u0027nodes\u0027, new_node.uuid)"},{"line_number":1440,"context_line":"        return Node.convert_with_links(new_node)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_389fe551","line":1437,"in_reply_to":"5a74a57a_6e9e0164","updated":"2016-11-29 16:26:19.000000000","message":"Good catch, I\u0027ll inherit InterfaceNotFoundInEntrypoint from InvalidParameterValue","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"41c5722cb48cacc9ab6e43dfbda7342e08b8ee26","unresolved":false,"context_lines":[{"line_number":1508,"context_line":"            e.code \u003d http_client.BAD_REQUEST"},{"line_number":1509,"context_line":"            raise"},{"line_number":1510,"context_line":"        self._check_driver_changed_and_console_enabled(rpc_node, node_ident)"},{"line_number":1511,"context_line":"        new_node \u003d pecan.request.rpcapi.update_node("},{"line_number":1512,"context_line":"            pecan.request.context, rpc_node, topic)"},{"line_number":1513,"context_line":""},{"line_number":1514,"context_line":"        return Node.convert_with_links(new_node)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_591e710c","line":1511,"updated":"2016-11-29 13:13:53.000000000","message":"ditto about 404 ERROR here.","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"59382e628801e6f8943433b601c0d0c95efc938d","unresolved":false,"context_lines":[{"line_number":1508,"context_line":"            e.code \u003d http_client.BAD_REQUEST"},{"line_number":1509,"context_line":"            raise"},{"line_number":1510,"context_line":"        self._check_driver_changed_and_console_enabled(rpc_node, node_ident)"},{"line_number":1511,"context_line":"        new_node \u003d pecan.request.rpcapi.update_node("},{"line_number":1512,"context_line":"            pecan.request.context, rpc_node, topic)"},{"line_number":1513,"context_line":""},{"line_number":1514,"context_line":"        return Node.convert_with_links(new_node)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_98b479d5","line":1511,"in_reply_to":"5a74a57a_591e710c","updated":"2016-11-29 16:26:19.000000000","message":"Done","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"}],"ironic/common/driver_factory.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e807128afdd7f56712693e230532f5e0c2c91916","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                        if different than task.node.driver."},{"line_number":44,"context_line":"    :returns: A driver object for the task."},{"line_number":45,"context_line":"    :raises: DriverNotFound if node.driver could not be"},{"line_number":46,"context_line":"             found in the \"ironic.drivers\" namespace."},{"line_number":47,"context_line":"    \"\"\""},{"line_number":48,"context_line":"    node \u003d task.node"},{"line_number":49,"context_line":"    check_and_update_node_interfaces(node)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_4e78e08f","line":46,"updated":"2016-11-25 11:47:06.000000000","message":":raises: InvalidParameterValue","commit_id":"629c6a80d6144796da77a78848889025245dd850"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"84049f166eede9134cc6b661e8a51f169030d647","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                        if different than task.node.driver."},{"line_number":44,"context_line":"    :returns: A driver object for the task."},{"line_number":45,"context_line":"    :raises: DriverNotFound if node.driver could not be"},{"line_number":46,"context_line":"             found in the \"ironic.drivers\" namespace."},{"line_number":47,"context_line":"    \"\"\""},{"line_number":48,"context_line":"    node \u003d task.node"},{"line_number":49,"context_line":"    check_and_update_node_interfaces(node)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_7439afd6","line":46,"in_reply_to":"5a74a57a_4e78e08f","updated":"2016-11-28 13:27:41.000000000","message":"Done","commit_id":"629c6a80d6144796da77a78848889025245dd850"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"c98449c6b850f962a775dc49944ddfeff22ca5de","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    :raises: InvalidParameterValue on validation failure"},{"line_number":100,"context_line":"    :returns: True if any changes were made to the node, otherwise False"},{"line_number":101,"context_line":"    \"\"\""},{"line_number":102,"context_line":"    if \u0027network_interface\u0027 in node and node.network_interface is not None:"},{"line_number":103,"context_line":"        if node.network_interface not in CONF.enabled_network_interfaces:"},{"line_number":104,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":105,"context_line":"                _(\"Cannot change network_interface to invalid value \""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_0eaa6870","line":102,"range":{"start_line":102,"start_character":7,"end_line":102,"end_character":73},"updated":"2016-11-25 12:04:14.000000000","message":"why not just getattr(node, \u0027network_interface\u0027, None)?","commit_id":"629c6a80d6144796da77a78848889025245dd850"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"84049f166eede9134cc6b661e8a51f169030d647","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    :raises: InvalidParameterValue on validation failure"},{"line_number":100,"context_line":"    :returns: True if any changes were made to the node, otherwise False"},{"line_number":101,"context_line":"    \"\"\""},{"line_number":102,"context_line":"    if \u0027network_interface\u0027 in node and node.network_interface is not None:"},{"line_number":103,"context_line":"        if node.network_interface not in CONF.enabled_network_interfaces:"},{"line_number":104,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":105,"context_line":"                _(\"Cannot change network_interface to invalid value \""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_54e913e5","line":102,"range":{"start_line":102,"start_character":7,"end_line":102,"end_character":73},"in_reply_to":"5a74a57a_0c7430fb","updated":"2016-11-28 13:27:41.000000000","message":"Left a comment","commit_id":"629c6a80d6144796da77a78848889025245dd850"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"2263c91bb6e3c0f625d70380d6f1dfe94c7cadce","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    :raises: InvalidParameterValue on validation failure"},{"line_number":100,"context_line":"    :returns: True if any changes were made to the node, otherwise False"},{"line_number":101,"context_line":"    \"\"\""},{"line_number":102,"context_line":"    if \u0027network_interface\u0027 in node and node.network_interface is not None:"},{"line_number":103,"context_line":"        if node.network_interface not in CONF.enabled_network_interfaces:"},{"line_number":104,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":105,"context_line":"                _(\"Cannot change network_interface to invalid value \""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_0c7430fb","line":102,"range":{"start_line":102,"start_character":7,"end_line":102,"end_character":73},"in_reply_to":"5a74a57a_0eaa6870","updated":"2016-11-25 12:37:57.000000000","message":"Yup, just checked with Dmitry, it getattr with any attribute that is in the object\u0027s \u0027fields\u0027 will throw NotImplementedError if not set.","commit_id":"629c6a80d6144796da77a78848889025245dd850"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"c98449c6b850f962a775dc49944ddfeff22ca5de","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                    \u0027valid_choices\u0027: CONF.enabled_network_interfaces,"},{"line_number":110,"context_line":"                })"},{"line_number":111,"context_line":"    else:"},{"line_number":112,"context_line":"        node.network_interface \u003d ("},{"line_number":113,"context_line":"            CONF.default_network_interface or"},{"line_number":114,"context_line":"            (\u0027flat\u0027 if CONF.dhcp.dhcp_provider \u003d\u003d \u0027neutron\u0027 else \u0027noop\u0027))"},{"line_number":115,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_51ede523","line":112,"updated":"2016-11-25 12:04:14.000000000","message":"With this check moved out of the object layer, it\u0027s possible to create a node without the network interface if one forgets to call this function before calling node.create(). And then get nothing from api when requesting the node\u0027s network interface. I know that\u0027s impossible from the pov of the in-tree code, but who knows waht\u0027s going on in out-of-tree drivers/vendor methods. WDYT about doing this in .create() method in the node object?","commit_id":"629c6a80d6144796da77a78848889025245dd850"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c563fe4f584f29984bb984c279f579c8ae70fd01","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                    \u0027valid_choices\u0027: CONF.enabled_network_interfaces,"},{"line_number":110,"context_line":"                })"},{"line_number":111,"context_line":"    else:"},{"line_number":112,"context_line":"        node.network_interface \u003d ("},{"line_number":113,"context_line":"            CONF.default_network_interface or"},{"line_number":114,"context_line":"            (\u0027flat\u0027 if CONF.dhcp.dhcp_provider \u003d\u003d \u0027neutron\u0027 else \u0027noop\u0027))"},{"line_number":115,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_f1ab4373","line":112,"in_reply_to":"5a74a57a_51ede523","updated":"2016-11-25 16:55:53.000000000","message":"I would hope none of the third party items have been bolted on in such a way. :\\\n\nAs for .create, my thoughts are that driver factory makes sense for now, and is going to be where people are going to look when debugging driver load issues.","commit_id":"629c6a80d6144796da77a78848889025245dd850"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"84049f166eede9134cc6b661e8a51f169030d647","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                    \u0027valid_choices\u0027: CONF.enabled_network_interfaces,"},{"line_number":110,"context_line":"                })"},{"line_number":111,"context_line":"    else:"},{"line_number":112,"context_line":"        node.network_interface \u003d ("},{"line_number":113,"context_line":"            CONF.default_network_interface or"},{"line_number":114,"context_line":"            (\u0027flat\u0027 if CONF.dhcp.dhcp_provider \u003d\u003d \u0027neutron\u0027 else \u0027noop\u0027))"},{"line_number":115,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_54975347","line":112,"in_reply_to":"5a74a57a_f1ab4373","updated":"2016-11-28 13:27:41.000000000","message":"Moving it to create() and update().. hmm, I like it. Lemme experiment locally to check if it breaks something.","commit_id":"629c6a80d6144796da77a78848889025245dd850"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"013e58a6331af5366945d6ccfab385c32f6361c2","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    except KeyError:"},{"line_number":68,"context_line":"        raise exception.InterfaceNotFoundInEntrypoint("},{"line_number":69,"context_line":"            iface\u003dnetwork_iface,"},{"line_number":70,"context_line":"            entrypoint\u003dnetwork_factory._entrypoint_name,"},{"line_number":71,"context_line":"            valid\u003dnetwork_factory.names)"},{"line_number":72,"context_line":"    driver.network \u003d net_driver"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_28f5e1eb","line":70,"updated":"2016-11-29 12:28:09.000000000","message":"Better mark \"_entrypoint_name\" as public w/o underscore.","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0984270cdd93d59a2e96325fed3cf9813d6bc0a9","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    except KeyError:"},{"line_number":68,"context_line":"        raise exception.InterfaceNotFoundInEntrypoint("},{"line_number":69,"context_line":"            iface\u003dnetwork_iface,"},{"line_number":70,"context_line":"            entrypoint\u003dnetwork_factory._entrypoint_name,"},{"line_number":71,"context_line":"            valid\u003dnetwork_factory.names)"},{"line_number":72,"context_line":"    driver.network \u003d net_driver"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_931aaac4","line":70,"in_reply_to":"5a74a57a_28f5e1eb","updated":"2016-11-29 12:37:35.000000000","message":"It\u0027s not public, we only use it in this python module (also it was the case previously too)","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"41c5722cb48cacc9ab6e43dfbda7342e08b8ee26","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    :param node: node object to check and potentially update"},{"line_number":81,"context_line":"    :raises: InterfaceNotFoundInEntrypoint on validation failure"},{"line_number":82,"context_line":"    :returns: True if any changes were made to the node, otherwise False"},{"line_number":83,"context_line":"    \"\"\""},{"line_number":84,"context_line":"    # NOTE(dtantsur): objects raise NotImplementedError on accessing fields"},{"line_number":85,"context_line":"    # that are known, but missing from an object. Thus, we cannot just use"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_85fb4046","line":82,"updated":"2016-11-29 13:13:53.000000000","message":"We do not store changes to database as node may not exist.","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"59382e628801e6f8943433b601c0d0c95efc938d","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    :param node: node object to check and potentially update"},{"line_number":81,"context_line":"    :raises: InterfaceNotFoundInEntrypoint on validation failure"},{"line_number":82,"context_line":"    :returns: True if any changes were made to the node, otherwise False"},{"line_number":83,"context_line":"    \"\"\""},{"line_number":84,"context_line":"    # NOTE(dtantsur): objects raise NotImplementedError on accessing fields"},{"line_number":85,"context_line":"    # that are known, but missing from an object. Thus, we cannot just use"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_383b653a","line":82,"in_reply_to":"5a74a57a_85fb4046","updated":"2016-11-29 16:26:19.000000000","message":"Right, but I\u0027m not talking about database here.","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"41c5722cb48cacc9ab6e43dfbda7342e08b8ee26","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    else:"},{"line_number":94,"context_line":"        node.network_interface \u003d ("},{"line_number":95,"context_line":"            CONF.default_network_interface or"},{"line_number":96,"context_line":"            (\u0027flat\u0027 if CONF.dhcp.dhcp_provider \u003d\u003d \u0027neutron\u0027 else \u0027noop\u0027))"},{"line_number":97,"context_line":"        return True"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    return False"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_65d9c4f2","line":96,"updated":"2016-11-29 13:13:53.000000000","message":"shouldn\u0027t we do node.save() here? Probably not as node may not be in database at this time.","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"59382e628801e6f8943433b601c0d0c95efc938d","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    else:"},{"line_number":94,"context_line":"        node.network_interface \u003d ("},{"line_number":95,"context_line":"            CONF.default_network_interface or"},{"line_number":96,"context_line":"            (\u0027flat\u0027 if CONF.dhcp.dhcp_provider \u003d\u003d \u0027neutron\u0027 else \u0027noop\u0027))"},{"line_number":97,"context_line":"        return True"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    return False"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_7845ddb1","line":96,"in_reply_to":"5a74a57a_65d9c4f2","updated":"2016-11-29 16:26:19.000000000","message":"Right, we defer it to the caller side","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"983ff99e307f1eb74e860e92bbffbcd24aaece46","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    try:"},{"line_number":66,"context_line":"        net_driver \u003d network_factory.get_driver(network_iface)"},{"line_number":67,"context_line":"    except KeyError:"},{"line_number":68,"context_line":"        raise exception.InterfaceNotFoundInEntrypoint("},{"line_number":69,"context_line":"            iface\u003dnetwork_iface,"},{"line_number":70,"context_line":"            entrypoint\u003dnetwork_factory._entrypoint_name,"},{"line_number":71,"context_line":"            valid\u003dnetwork_factory.names)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_0d59fc8e","line":68,"updated":"2016-11-29 21:08:25.000000000","message":"This is HTTP 400, whereas the original DriverNotFoundInEntrypoint is HTTP 404. Is that going to be OK?","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2ae7633b35c258a7d89526b82cfdd03719ca42bd","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    try:"},{"line_number":66,"context_line":"        net_driver \u003d network_factory.get_driver(network_iface)"},{"line_number":67,"context_line":"    except KeyError:"},{"line_number":68,"context_line":"        raise exception.InterfaceNotFoundInEntrypoint("},{"line_number":69,"context_line":"            iface\u003dnetwork_iface,"},{"line_number":70,"context_line":"            entrypoint\u003dnetwork_factory._entrypoint_name,"},{"line_number":71,"context_line":"            valid\u003dnetwork_factory.names)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_9c8c3737","line":68,"in_reply_to":"5a74a57a_0177e0d4","updated":"2016-11-30 15:22:50.000000000","message":"Oh, glad you\u0027re cleaning that up then :)","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7f8d6fe6cec283f36ab13999f96cbeca7ef5a5e5","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    try:"},{"line_number":66,"context_line":"        net_driver \u003d network_factory.get_driver(network_iface)"},{"line_number":67,"context_line":"    except KeyError:"},{"line_number":68,"context_line":"        raise exception.InterfaceNotFoundInEntrypoint("},{"line_number":69,"context_line":"            iface\u003dnetwork_iface,"},{"line_number":70,"context_line":"            entrypoint\u003dnetwork_factory._entrypoint_name,"},{"line_number":71,"context_line":"            valid\u003dnetwork_factory.names)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_0177e0d4","line":68,"in_reply_to":"5a74a57a_0d59fc8e","updated":"2016-11-30 14:59:20.000000000","message":"Here is the confusing part about the current code: it actually does not return 404. The actual error is 400 for create https://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/node.py#L1419-L1426 and for update https://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/node.py#L1481-L1488. As I\u0027m removing these API-level checks, I need an exception that is HTTP 400 here.","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"983ff99e307f1eb74e860e92bbffbcd24aaece46","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"def check_and_update_node_interfaces(node):"},{"line_number":76,"context_line":"    \"\"\"Ensure that node interfaces (for creation or updating) are valid."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    Updates intefaces with calculated defaults, if they are not provided."},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_c84b725e","line":76,"updated":"2016-11-29 21:08:25.000000000","message":"\u0027creation\u0027 here doesn\u0027t mean this is a new node being created by the user (ie, via an API request to create a node), does it? It looks like this is called for a new TaskManager instance.","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dc6a986b9e4e5f47fa69c1f0f7c0142a524970f1","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"def check_and_update_node_interfaces(node):"},{"line_number":76,"context_line":"    \"\"\"Ensure that node interfaces (for creation or updating) are valid."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    Updates intefaces with calculated defaults, if they are not provided."},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_333431dd","line":76,"in_reply_to":"5a74a57a_30ad0789","updated":"2016-11-30 15:25:46.000000000","message":"ah, right, in this case the instance exists. but this function is also called from create_node conductor method.","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"36e1f5eeb1e27ee8c669e557f920a7c456691fbc","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"def check_and_update_node_interfaces(node):"},{"line_number":76,"context_line":"    \"\"\"Ensure that node interfaces (for creation or updating) are valid."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    Updates intefaces with calculated defaults, if they are not provided."},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_24e78541","line":76,"in_reply_to":"5a74a57a_333431dd","updated":"2016-11-30 16:04:26.000000000","message":"Right, I understand that. It may be sufficient to s/for/e.g., for)\n\nMy point is that the way it is described, it looks like it is ONLY used for creation or updates to a node.","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7f8d6fe6cec283f36ab13999f96cbeca7ef5a5e5","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"def check_and_update_node_interfaces(node):"},{"line_number":76,"context_line":"    \"\"\"Ensure that node interfaces (for creation or updating) are valid."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    Updates intefaces with calculated defaults, if they are not provided."},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_e148248a","line":76,"in_reply_to":"5a74a57a_c84b725e","updated":"2016-11-30 14:59:20.000000000","message":"\u003e \u0027creation\u0027 here doesn\u0027t mean this is a new node being created by the user\n\nIt does actually.","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2ae7633b35c258a7d89526b82cfdd03719ca42bd","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"def check_and_update_node_interfaces(node):"},{"line_number":76,"context_line":"    \"\"\"Ensure that node interfaces (for creation or updating) are valid."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    Updates intefaces with calculated defaults, if they are not provided."},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_30ad0789","line":76,"in_reply_to":"5a74a57a_e148248a","updated":"2016-11-30 15:22:50.000000000","message":"when it is called for a new TaskManager instance [1], it isn\u0027t necessarily being created by the user is it? Doesn\u0027t the node already exist (in the DB)?\n\n[1] https://github.com/openstack/ironic/blob/50a2f50ab86842fe7f56db08ae841b46263ccca8/ironic/conductor/task_manager.py#L228","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"983ff99e307f1eb74e860e92bbffbcd24aaece46","unresolved":false,"context_lines":[{"line_number":75,"context_line":"def check_and_update_node_interfaces(node):"},{"line_number":76,"context_line":"    \"\"\"Ensure that node interfaces (for creation or updating) are valid."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    Updates intefaces with calculated defaults, if they are not provided."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    :param node: node object to check and potentially update"},{"line_number":81,"context_line":"    :raises: InterfaceNotFoundInEntrypoint on validation failure"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_cdbaa471","line":78,"updated":"2016-11-29 21:08:25.000000000","message":"s/intefaces/interfaces/","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7f8d6fe6cec283f36ab13999f96cbeca7ef5a5e5","unresolved":false,"context_lines":[{"line_number":75,"context_line":"def check_and_update_node_interfaces(node):"},{"line_number":76,"context_line":"    \"\"\"Ensure that node interfaces (for creation or updating) are valid."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    Updates intefaces with calculated defaults, if they are not provided."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    :param node: node object to check and potentially update"},{"line_number":81,"context_line":"    :raises: InterfaceNotFoundInEntrypoint on validation failure"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_fc67ebe7","line":78,"in_reply_to":"5a74a57a_cdbaa471","updated":"2016-11-30 14:59:20.000000000","message":"Done","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"}],"ironic/common/exception.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"983ff99e307f1eb74e860e92bbffbcd24aaece46","unresolved":false,"context_lines":[{"line_number":252,"context_line":""},{"line_number":253,"context_line":"class InterfaceNotFoundInEntrypoint(InvalidParameterValue):"},{"line_number":254,"context_line":"    _msg_fmt \u003d _(\"Could not find the following interface in the \""},{"line_number":255,"context_line":"                 \"\u0027%(entrypoint)s\u0027 entrypoint: %(iface)s. Valid options are \""},{"line_number":256,"context_line":"                 \"%(valid)s.\")"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_8de42cad","line":255,"updated":"2016-11-29 21:08:25.000000000","message":"maybe s/options/interfaces/","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7f8d6fe6cec283f36ab13999f96cbeca7ef5a5e5","unresolved":false,"context_lines":[{"line_number":252,"context_line":""},{"line_number":253,"context_line":"class InterfaceNotFoundInEntrypoint(InvalidParameterValue):"},{"line_number":254,"context_line":"    _msg_fmt \u003d _(\"Could not find the following interface in the \""},{"line_number":255,"context_line":"                 \"\u0027%(entrypoint)s\u0027 entrypoint: %(iface)s. Valid options are \""},{"line_number":256,"context_line":"                 \"%(valid)s.\")"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_7c73dbb4","line":255,"in_reply_to":"5a74a57a_8de42cad","updated":"2016-11-30 14:59:20.000000000","message":"Done","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"}],"ironic/conductor/manager.py":[{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"41c5722cb48cacc9ab6e43dfbda7342e08b8ee26","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        \"\"\"Create a node in database."},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        :param context: an admin context"},{"line_number":99,"context_line":"        :param node_obj: a created (but not saved) node object."},{"line_number":100,"context_line":"        :returns: created node object."},{"line_number":101,"context_line":"        :raises: InterfaceNotFoundInEntrypoint if validation fails for any"},{"line_number":102,"context_line":"                 dynamic interfaces (e.g. network_interface)."}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_6524640c","line":99,"updated":"2016-11-29 13:13:53.000000000","message":"but not saved to database right?","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"59382e628801e6f8943433b601c0d0c95efc938d","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        \"\"\"Create a node in database."},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        :param context: an admin context"},{"line_number":99,"context_line":"        :param node_obj: a created (but not saved) node object."},{"line_number":100,"context_line":"        :returns: created node object."},{"line_number":101,"context_line":"        :raises: InterfaceNotFoundInEntrypoint if validation fails for any"},{"line_number":102,"context_line":"                 dynamic interfaces (e.g. network_interface)."}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_38228502","line":99,"in_reply_to":"5a74a57a_6524640c","updated":"2016-11-29 16:26:19.000000000","message":"Done","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"983ff99e307f1eb74e860e92bbffbcd24aaece46","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        \"\"\""},{"line_number":104,"context_line":"        LOG.debug(\"RPC create_node called for node %s.\", node_obj.uuid)"},{"line_number":105,"context_line":"        driver_factory.check_and_update_node_interfaces(node_obj)"},{"line_number":106,"context_line":"        node_obj.create()"},{"line_number":107,"context_line":"        return node_obj"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    @METRICS.timer(\u0027ConductorManager.update_node\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_e8b90ecd","line":106,"updated":"2016-11-29 21:08:25.000000000","message":"According to the docstring for node_obj.create(), this could also\n\n        :raises: InvalidParameterValue if some property values are invalid.","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7f8d6fe6cec283f36ab13999f96cbeca7ef5a5e5","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        \"\"\""},{"line_number":104,"context_line":"        LOG.debug(\"RPC create_node called for node %s.\", node_obj.uuid)"},{"line_number":105,"context_line":"        driver_factory.check_and_update_node_interfaces(node_obj)"},{"line_number":106,"context_line":"        node_obj.create()"},{"line_number":107,"context_line":"        return node_obj"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    @METRICS.timer(\u0027ConductorManager.update_node\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_1c3747e4","line":106,"in_reply_to":"5a74a57a_e8b90ecd","updated":"2016-11-30 14:59:20.000000000","message":"Right","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"983ff99e307f1eb74e860e92bbffbcd24aaece46","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                    action % {\u0027node\u0027: node_obj.uuid,"},{"line_number":144,"context_line":"                              \u0027allowed\u0027: \u0027, \u0027.join(allowed_update_states)})"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        driver_factory.check_and_update_node_interfaces(node_obj)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        driver_name \u003d node_obj.driver if \u0027driver\u0027 in delta else None"},{"line_number":149,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_68f41e87","line":146,"updated":"2016-11-29 21:08:25.000000000","message":"If none of the node\u0027s interfaces were changed, would we need to call this?","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7f8d6fe6cec283f36ab13999f96cbeca7ef5a5e5","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                    action % {\u0027node\u0027: node_obj.uuid,"},{"line_number":144,"context_line":"                              \u0027allowed\u0027: \u0027, \u0027.join(allowed_update_states)})"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        driver_factory.check_and_update_node_interfaces(node_obj)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        driver_name \u003d node_obj.driver if \u0027driver\u0027 in delta else None"},{"line_number":149,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_5c31bfeb","line":146,"in_reply_to":"5a74a57a_68f41e87","updated":"2016-11-30 14:59:20.000000000","message":"We would not, but we don\u0027t know until we start checking :)","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"983ff99e307f1eb74e860e92bbffbcd24aaece46","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse,"},{"line_number":150,"context_line":"                                  driver_name\u003ddriver_name,"},{"line_number":151,"context_line":"                                  purpose\u003d\u0027node update\u0027):"},{"line_number":152,"context_line":"            node_obj.save()"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        return node_obj"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_28394642","line":152,"updated":"2016-11-29 21:08:25.000000000","message":"this could raise an InvalidParameterValue, so I think we should leave that in L110","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7f8d6fe6cec283f36ab13999f96cbeca7ef5a5e5","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse,"},{"line_number":150,"context_line":"                                  driver_name\u003ddriver_name,"},{"line_number":151,"context_line":"                                  purpose\u003d\u0027node update\u0027):"},{"line_number":152,"context_line":"            node_obj.save()"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        return node_obj"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_9c519711","line":152,"in_reply_to":"5a74a57a_28394642","updated":"2016-11-30 14:59:20.000000000","message":"Good catch","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"}],"ironic/conductor/rpcapi.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"422904fff5a6c4ff3b0e8006b9fa000d380a832d","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        :param context: request context."},{"line_number":149,"context_line":"        :param node_obj: a created (but not saved) node object."},{"line_number":150,"context_line":"        :param topic: RPC topic. Defaults to self.topic."},{"line_number":151,"context_line":"        :returns: created node object."},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.35\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_cea0f5f6","line":151,"updated":"2016-11-29 12:52:01.000000000","message":":raises:","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"59382e628801e6f8943433b601c0d0c95efc938d","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        :param context: request context."},{"line_number":149,"context_line":"        :param node_obj: a created (but not saved) node object."},{"line_number":150,"context_line":"        :param topic: RPC topic. Defaults to self.topic."},{"line_number":151,"context_line":"        :returns: created node object."},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.35\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_584d81c3","line":151,"in_reply_to":"5a74a57a_cea0f5f6","updated":"2016-11-29 16:26:19.000000000","message":"Done","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b35dfc603c72d9b0e7bbdf7c2746722064ae8076","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        :raises: InterfaceNotFoundInEntrypoint if validation fails for any"},{"line_number":154,"context_line":"                 dynamic interfaces (e.g. network_interface)."},{"line_number":155,"context_line":"        \"\"\""},{"line_number":156,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.35\u0027)"},{"line_number":157,"context_line":"        return cctxt.call(context, \u0027create_node\u0027, node_obj\u003dnode_obj)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def update_node(self, context, node_obj, topic\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_26b4e4f0","line":156,"updated":"2016-11-30 18:00:58.000000000","message":"s/1.25/1.36/","commit_id":"752bbbb436f5e3954e8273ddb9cada0835ae9f65"}],"ironic/tests/unit/api/v1/test_nodes.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"24dddbbd92432f33b889d4002a51f2a3b9b19d07","unresolved":false,"context_lines":[{"line_number":1727,"context_line":"@mock.patch.object(rpcapi.ConductorAPI, \u0027create_node\u0027,"},{"line_number":1728,"context_line":"                   lambda _api, _ctx, node, _topic: _create_node_locally(node))"},{"line_number":1729,"context_line":"class TestPost(test_api_base.BaseApiTest):"},{"line_number":1730,"context_line":""},{"line_number":1731,"context_line":"    def setUp(self):"},{"line_number":1732,"context_line":"        super(TestPost, self).setUp()"},{"line_number":1733,"context_line":"        self.chassis \u003d obj_utils.create_test_chassis(self.context)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_817b2bbd","line":1730,"updated":"2016-11-29 14:46:49.000000000","message":"And please also add a test when create node fails due to InterfaceNotFoundInEntrypoint exception from rpcapi.","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"59382e628801e6f8943433b601c0d0c95efc938d","unresolved":false,"context_lines":[{"line_number":1727,"context_line":"@mock.patch.object(rpcapi.ConductorAPI, \u0027create_node\u0027,"},{"line_number":1728,"context_line":"                   lambda _api, _ctx, node, _topic: _create_node_locally(node))"},{"line_number":1729,"context_line":"class TestPost(test_api_base.BaseApiTest):"},{"line_number":1730,"context_line":""},{"line_number":1731,"context_line":"    def setUp(self):"},{"line_number":1732,"context_line":"        super(TestPost, self).setUp()"},{"line_number":1733,"context_line":"        self.chassis \u003d obj_utils.create_test_chassis(self.context)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_bb3a0f97","line":1730,"in_reply_to":"5a74a57a_817b2bbd","updated":"2016-11-29 16:26:19.000000000","message":"Done","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"}],"ironic/tests/unit/common/test_driver_factory.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e8f9cb886ceb429692f0d4432341a9c911d5b712","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        self.config(dhcp_provider\u003d\u0027none\u0027, group\u003d\u0027dhcp\u0027)"},{"line_number":226,"context_line":"        node \u003d obj_utils.get_test_node(self.context, driver\u003d\u0027fake\u0027)"},{"line_number":227,"context_line":"        self.assertTrue(driver_factory.check_and_update_node_interfaces(node))"},{"line_number":228,"context_line":"        self.assertEqual(\u0027noop\u0027, node.network_interface)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def test_valid_network_interface(self):"},{"line_number":231,"context_line":"        node \u003d obj_utils.get_test_node(self.context, driver\u003d\u0027fake\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_26f22d9b","line":228,"updated":"2016-11-30 15:52:26.000000000","message":"it takes the value \u0027noop\u0027, not the  default from dhcp. Maybe rename this test? (The first two tests use the default from dhcp...)","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ad1a9e52e08d678faef615eadecaeadb1257f3cc","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        self.config(dhcp_provider\u003d\u0027none\u0027, group\u003d\u0027dhcp\u0027)"},{"line_number":226,"context_line":"        node \u003d obj_utils.get_test_node(self.context, driver\u003d\u0027fake\u0027)"},{"line_number":227,"context_line":"        self.assertTrue(driver_factory.check_and_update_node_interfaces(node))"},{"line_number":228,"context_line":"        self.assertEqual(\u0027noop\u0027, node.network_interface)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def test_valid_network_interface(self):"},{"line_number":231,"context_line":"        node \u003d obj_utils.get_test_node(self.context, driver\u003d\u0027fake\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_e93e4628","line":228,"in_reply_to":"5a74a57a_26f22d9b","updated":"2016-11-30 15:56:04.000000000","message":"dhcp_provider\u003dnone corresponds to network_interface\u003dnoop, as opposed to the default value of \"flat\" (see line 216)","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f3a7a448b74f843aa57fc2e6bca9bdceafa51308","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        self.config(dhcp_provider\u003d\u0027none\u0027, group\u003d\u0027dhcp\u0027)"},{"line_number":226,"context_line":"        node \u003d obj_utils.get_test_node(self.context, driver\u003d\u0027fake\u0027)"},{"line_number":227,"context_line":"        self.assertTrue(driver_factory.check_and_update_node_interfaces(node))"},{"line_number":228,"context_line":"        self.assertEqual(\u0027noop\u0027, node.network_interface)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def test_valid_network_interface(self):"},{"line_number":231,"context_line":"        node \u003d obj_utils.get_test_node(self.context, driver\u003d\u0027fake\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_c40df138","line":228,"in_reply_to":"5a74a57a_e93e4628","updated":"2016-11-30 16:00:59.000000000","message":"ok, maybe I don\u0027t understand/see the connection between the name of the test and the actual test. I interpret the name of the test as, \u0027test a node with no network interface and use default (ie value) from dhcp config\u0027.","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"}],"ironic/tests/unit/objects/test_node.py":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c563fe4f584f29984bb984c279f579c8ae70fd01","unresolved":false,"context_lines":[{"line_number":209,"context_line":"            self.node \u003d obj_utils.get_test_node(self.ctxt, **self.fake_node)"},{"line_number":210,"context_line":"            self.assertEqual(nif, self.node.network_interface)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def test_get_network_interface_use_dhcp_provider(self):"},{"line_number":213,"context_line":"        CONF.set_override(\u0027default_network_interface\u0027, None)"},{"line_number":214,"context_line":"        for dhcp, nif in ((\u0027neutron\u0027, \u0027flat\u0027), (\u0027none\u0027, \u0027noop\u0027)):"},{"line_number":215,"context_line":"            CONF.set_override(\u0027dhcp_provider\u0027, dhcp, \u0027dhcp\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_446a73ef","side":"PARENT","line":212,"updated":"2016-11-25 16:55:53.000000000","message":"nit: This seems like it is still a valid test, unless we\u0027ve completely dropped out dhcp_provider.","commit_id":"191809f5031c15b306507f2e2daa02d718b8bdfe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"84049f166eede9134cc6b661e8a51f169030d647","unresolved":false,"context_lines":[{"line_number":209,"context_line":"            self.node \u003d obj_utils.get_test_node(self.ctxt, **self.fake_node)"},{"line_number":210,"context_line":"            self.assertEqual(nif, self.node.network_interface)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def test_get_network_interface_use_dhcp_provider(self):"},{"line_number":213,"context_line":"        CONF.set_override(\u0027default_network_interface\u0027, None)"},{"line_number":214,"context_line":"        for dhcp, nif in ((\u0027neutron\u0027, \u0027flat\u0027), (\u0027none\u0027, \u0027noop\u0027)):"},{"line_number":215,"context_line":"            CONF.set_override(\u0027dhcp_provider\u0027, dhcp, \u0027dhcp\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_5415933d","side":"PARENT","line":212,"in_reply_to":"5a74a57a_446a73ef","updated":"2016-11-28 13:27:41.000000000","message":"It is valid, but it got moved to test_driver_factory.","commit_id":"191809f5031c15b306507f2e2daa02d718b8bdfe"}],"releasenotes/notes/create-on-conductor-c1c52a1f022c4048.yaml":[{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"41c5722cb48cacc9ab6e43dfbda7342e08b8ee26","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    the conductor service. This is more consistent with other node operations"},{"line_number":5,"context_line":"    and opens opportunities for conductor-side validations on nodes."},{"line_number":6,"context_line":"    However, this may make node creation take longer, and may limit the number"},{"line_number":7,"context_line":"    of nodes that can be enrolled in parallel."},{"line_number":8,"context_line":"  - The \"[DEFAULT]default_network_interface\" and \"[dhcp]dhcp_provider\""},{"line_number":9,"context_line":"    configuration options were previously required for the ironic-api service"},{"line_number":10,"context_line":"    to calculate the correct \"network_interface\" default. Now these options"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"5a74a57a_195a39f2","line":7,"updated":"2016-11-29 13:13:53.000000000","message":"We also may mention here that network_interface validation has been moved to ironic-conductor side.","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"26a31382fff19b0ea07847ac5184bc8e1829bea9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    the conductor service. This is more consistent with other node operations"},{"line_number":5,"context_line":"    and opens opportunities for conductor-side validations on nodes."},{"line_number":6,"context_line":"    However, this may make node creation take longer, and may limit the number"},{"line_number":7,"context_line":"    of nodes that can be enrolled in parallel."},{"line_number":8,"context_line":"  - The \"[DEFAULT]default_network_interface\" and \"[dhcp]dhcp_provider\""},{"line_number":9,"context_line":"    configuration options were previously required for the ironic-api service"},{"line_number":10,"context_line":"    to calculate the correct \"network_interface\" default. Now these options"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"5a74a57a_19ea3974","line":7,"in_reply_to":"5a74a57a_195a39f2","updated":"2016-11-29 13:22:03.000000000","message":"I meant network_interface validation on node update.","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"59382e628801e6f8943433b601c0d0c95efc938d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    the conductor service. This is more consistent with other node operations"},{"line_number":5,"context_line":"    and opens opportunities for conductor-side validations on nodes."},{"line_number":6,"context_line":"    However, this may make node creation take longer, and may limit the number"},{"line_number":7,"context_line":"    of nodes that can be enrolled in parallel."},{"line_number":8,"context_line":"  - The \"[DEFAULT]default_network_interface\" and \"[dhcp]dhcp_provider\""},{"line_number":9,"context_line":"    configuration options were previously required for the ironic-api service"},{"line_number":10,"context_line":"    to calculate the correct \"network_interface\" default. Now these options"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"5a74a57a_5b02dbb5","line":7,"in_reply_to":"5a74a57a_19ea3974","updated":"2016-11-29 16:26:19.000000000","message":"I\u0027m not sure why operators would worry about that though..","commit_id":"997cacbf1c6c0f69b8dd944a78047b67e1f75038"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"983ff99e307f1eb74e860e92bbffbcd24aaece46","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - In this release node creation logic was moved from the API service to"},{"line_number":4,"context_line":"    the conductor service. This is more consistent with other node operations"},{"line_number":5,"context_line":"    and opens opportunities for conductor-side validations on nodes."},{"line_number":6,"context_line":"    However, this may make node creation take longer, and may limit the number"},{"line_number":7,"context_line":"    of nodes that can be enrolled in parallel."},{"line_number":8,"context_line":"  - The \"[DEFAULT]default_network_interface\" and \"[dhcp]dhcp_provider\""},{"line_number":9,"context_line":"    configuration options were previously required for the ironic-api service"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5a74a57a_c85e1279","line":6,"updated":"2016-11-29 21:08:25.000000000","message":"maybe \u0027However, with this change, node creation may take longer, and this may limit the number of nodes that can be enrolled in parallel.\u0027","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2ae7633b35c258a7d89526b82cfdd03719ca42bd","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - In this release node creation logic was moved from the API service to"},{"line_number":4,"context_line":"    the conductor service. This is more consistent with other node operations"},{"line_number":5,"context_line":"    and opens opportunities for conductor-side validations on nodes."},{"line_number":6,"context_line":"    However, this may make node creation take longer, and may limit the number"},{"line_number":7,"context_line":"    of nodes that can be enrolled in parallel."},{"line_number":8,"context_line":"  - The \"[DEFAULT]default_network_interface\" and \"[dhcp]dhcp_provider\""},{"line_number":9,"context_line":"    configuration options were previously required for the ironic-api service"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5a74a57a_70493f8e","line":6,"in_reply_to":"5a74a57a_5c5fff0d","updated":"2016-11-30 15:22:50.000000000","message":"I was thinking that if they take longer, with the same number of RPC threads, you wouldn\u0027t be able to enroll as many as you could before.\n\nIt is the \u0027this may make node creation take longer\u0027 that is somewhat awkward.","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dc6a986b9e4e5f47fa69c1f0f7c0142a524970f1","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - In this release node creation logic was moved from the API service to"},{"line_number":4,"context_line":"    the conductor service. This is more consistent with other node operations"},{"line_number":5,"context_line":"    and opens opportunities for conductor-side validations on nodes."},{"line_number":6,"context_line":"    However, this may make node creation take longer, and may limit the number"},{"line_number":7,"context_line":"    of nodes that can be enrolled in parallel."},{"line_number":8,"context_line":"  - The \"[DEFAULT]default_network_interface\" and \"[dhcp]dhcp_provider\""},{"line_number":9,"context_line":"    configuration options were previously required for the ironic-api service"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5a74a57a_f36719e8","line":6,"in_reply_to":"5a74a57a_70493f8e","updated":"2016-11-30 15:25:46.000000000","message":"Ok, I\u0027ll change to your version","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7f8d6fe6cec283f36ab13999f96cbeca7ef5a5e5","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - In this release node creation logic was moved from the API service to"},{"line_number":4,"context_line":"    the conductor service. This is more consistent with other node operations"},{"line_number":5,"context_line":"    and opens opportunities for conductor-side validations on nodes."},{"line_number":6,"context_line":"    However, this may make node creation take longer, and may limit the number"},{"line_number":7,"context_line":"    of nodes that can be enrolled in parallel."},{"line_number":8,"context_line":"  - The \"[DEFAULT]default_network_interface\" and \"[dhcp]dhcp_provider\""},{"line_number":9,"context_line":"    configuration options were previously required for the ironic-api service"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5a74a57a_5c5fff0d","line":6,"in_reply_to":"5a74a57a_c85e1279","updated":"2016-11-30 14:59:20.000000000","message":"It\u0027s not the \"longer\" bit that limits number of nodes, it\u0027s the number of RPC threads.","commit_id":"43398fa7d938ccc3c7eab0664606ad03571afecb"}]}
