)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"e829c6cf6e772fd54fed131ac2e8a2f708b40d7e","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This change also introduces the FakeHardware class for testing."},{"line_number":15,"context_line":"It is special-cased to bypass compatibility validation completely."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"No hardware types are loaded on conductor start up yet, as hardware"},{"line_number":18,"context_line":"types still do not participate in the hash ring."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: If8e3342baf818a9e37aa82b43aec71898d48c29b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"1a6eadb0_a520014b","line":17,"updated":"2016-12-13 12:04:08.000000000","message":"But even with this patch only, it is now possible to create nodes with eg fake_hardware hw type?","commit_id":"ba2ca4c873d00aa4b8a0a1c18cb3a3bc5d13ad39"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"f71dad9c58455ed7971a58bfb6ceb6220dd34118","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This change also introduces the FakeHardware class for testing."},{"line_number":15,"context_line":"It is special-cased to bypass compatibility validation completely."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"No hardware types are loaded on conductor start up yet, as hardware"},{"line_number":18,"context_line":"types still do not participate in the hash ring."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: If8e3342baf818a9e37aa82b43aec71898d48c29b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"1a6eadb0_f2f9d3c9","line":17,"in_reply_to":"1a6eadb0_a520014b","updated":"2016-12-13 15:01:33.000000000","message":"Not via HTTP API","commit_id":"ba2ca4c873d00aa4b8a0a1c18cb3a3bc5d13ad39"}],"etc/ironic/ironic.conf.sample":[{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d071e1f289bff6de4b1f0d8bd10155d25dd1be7d","unresolved":false,"context_lines":[{"line_number":39,"context_line":"# of hardware types present on your system may be found by"},{"line_number":40,"context_line":"# enumerating the \"ironic.hardware.types\" entrypoint. (list"},{"line_number":41,"context_line":"# value)"},{"line_number":42,"context_line":"#enabled_hardware_types \u003d"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"# Specify the list of boot interfaces to load during service"},{"line_number":45,"context_line":"# initialization. Missing boot interfaces, or boot interfaces"}],"source_content_type":"application/octet-stream","patch_set":19,"id":"3a71b18c_6e588cfb","line":42,"updated":"2016-12-01 21:37:07.000000000","message":"Does this also have to be the same across APIs and conductors?\n\nIt seems to me as though this definitely has to be the same on all APIs (and be a set equal to all the values on all the conductors combined) but not necessarily the same on all conductors (for example, if we wanted to only allow 1 conductor to manage nodes of a particular hardware type).\n\nIn any case, this should be clarified in the option description.","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"58f69b34db92ff359360b1b7c3ce7c8bda67c979","unresolved":false,"context_lines":[{"line_number":39,"context_line":"# of hardware types present on your system may be found by"},{"line_number":40,"context_line":"# enumerating the \"ironic.hardware.types\" entrypoint. (list"},{"line_number":41,"context_line":"# value)"},{"line_number":42,"context_line":"#enabled_hardware_types \u003d"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"# Specify the list of boot interfaces to load during service"},{"line_number":45,"context_line":"# initialization. Missing boot interfaces, or boot interfaces"}],"source_content_type":"application/octet-stream","patch_set":19,"id":"3a71b18c_d97dccb2","line":42,"in_reply_to":"3a71b18c_6e588cfb","updated":"2016-12-02 10:54:58.000000000","message":"\u003e Does this also have to be the same across APIs and conductors?\n\nNo. We don\u0027t state it for drivers, why should we state it for hardware types? Also API service never reads enabled_hardware_types.","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":48,"context_line":"# production-oriented boot interfaces. A complete list of boot"},{"line_number":49,"context_line":"# interfaces present on your system may be found by"},{"line_number":50,"context_line":"# enumerating the \"ironic.hardware.interfaces.boot\""},{"line_number":51,"context_line":"# entrypoint. This value must be the same on all ironic-"},{"line_number":52,"context_line":"# conductor and ironic-api services, because it is used by"},{"line_number":53,"context_line":"# ironic-api service to validate a new or updated node\u0027s"},{"line_number":54,"context_line":"# boot_interface value. (list value)"}],"source_content_type":"application/octet-stream","patch_set":20,"id":"3a71b18c_1a02920b","line":51,"range":{"start_line":51,"start_character":25,"end_line":51,"end_character":41},"updated":"2016-12-05 13:02:12.000000000","message":"Is it the case? I thought it should be the same per hardware type, not globally.","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":49,"context_line":"# interfaces present on your system may be found by"},{"line_number":50,"context_line":"# enumerating the \"ironic.hardware.interfaces.boot\""},{"line_number":51,"context_line":"# entrypoint. This value must be the same on all ironic-"},{"line_number":52,"context_line":"# conductor and ironic-api services, because it is used by"},{"line_number":53,"context_line":"# ironic-api service to validate a new or updated node\u0027s"},{"line_number":54,"context_line":"# boot_interface value. (list value)"},{"line_number":55,"context_line":"#enabled_boot_interfaces \u003d"}],"source_content_type":"application/octet-stream","patch_set":20,"id":"3a71b18c_5ac32aed","line":52,"range":{"start_line":52,"start_character":16,"end_line":52,"end_character":35},"updated":"2016-12-05 13:02:12.000000000","message":"this part is not true anymore? ditto in other options.","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7e41940b975532ef59be57fa697ddf2871771b54","unresolved":false,"context_lines":[{"line_number":49,"context_line":"# interfaces present on your system may be found by"},{"line_number":50,"context_line":"# enumerating the \"ironic.hardware.interfaces.boot\""},{"line_number":51,"context_line":"# entrypoint. This value must be the same on all ironic-"},{"line_number":52,"context_line":"# conductor and ironic-api services, because it is used by"},{"line_number":53,"context_line":"# ironic-api service to validate a new or updated node\u0027s"},{"line_number":54,"context_line":"# boot_interface value. (list value)"},{"line_number":55,"context_line":"#enabled_boot_interfaces \u003d"}],"source_content_type":"application/octet-stream","patch_set":20,"id":"3a71b18c_82a43bba","line":52,"range":{"start_line":52,"start_character":16,"end_line":52,"end_character":35},"in_reply_to":"3a71b18c_5ac32aed","updated":"2016-12-06 13:42:48.000000000","message":"Done","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"}],"ironic/common/driver_factory.py":[{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0fcb27d62e3631b680cd6b851cecf1900a2e4aad","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    return driver"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _attach_interfaces_from_hardware_type(driver, node, hardware_type):"},{"line_number":65,"context_line":"    for iface in _INTERFACE_LOADERS:"},{"line_number":66,"context_line":"        impl_name \u003d getattr(node, \u0027%s_interface\u0027 % iface)"},{"line_number":67,"context_line":"        impl \u003d _get_interface(hardware_type, iface, impl_name)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_6e822596","line":64,"range":{"start_line":64,"start_character":4,"end_line":64,"end_character":41},"updated":"2016-11-24 11:57:58.000000000","message":"this feels like a regular method of the AbstractHardwareType class to me","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0fcb27d62e3631b680cd6b851cecf1900a2e4aad","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _attach_interfaces_from_hardware_type(driver, node, hardware_type):"},{"line_number":65,"context_line":"    for iface in _INTERFACE_LOADERS:"},{"line_number":66,"context_line":"        impl_name \u003d getattr(node, \u0027%s_interface\u0027 % iface)"},{"line_number":67,"context_line":"        impl \u003d _get_interface(hardware_type, iface, impl_name)"},{"line_number":68,"context_line":"        setattr(driver, iface, impl)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_abd34f37","line":65,"range":{"start_line":65,"start_character":17,"end_line":65,"end_character":36},"updated":"2016-11-24 11:57:58.000000000","message":"s/_INTERFACE_LOADERS/_INTERFACE_LOADERS_MAPPING","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0fcb27d62e3631b680cd6b851cecf1900a2e4aad","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _attach_interfaces_from_hardware_type(driver, node, hardware_type):"},{"line_number":65,"context_line":"    for iface in _INTERFACE_LOADERS:"},{"line_number":66,"context_line":"        impl_name \u003d getattr(node, \u0027%s_interface\u0027 % iface)"},{"line_number":67,"context_line":"        impl \u003d _get_interface(hardware_type, iface, impl_name)"},{"line_number":68,"context_line":"        setattr(driver, iface, impl)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_ab699027","line":65,"range":{"start_line":65,"start_character":8,"end_line":65,"end_character":13},"updated":"2016-11-24 11:57:58.000000000","message":"s/iface/interface_name/?","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0fcb27d62e3631b680cd6b851cecf1900a2e4aad","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _attach_interfaces_from_hardware_type(driver, node, hardware_type):"},{"line_number":65,"context_line":"    for iface in _INTERFACE_LOADERS:"},{"line_number":66,"context_line":"        impl_name \u003d getattr(node, \u0027%s_interface\u0027 % iface)"},{"line_number":67,"context_line":"        impl \u003d _get_interface(hardware_type, iface, impl_name)"},{"line_number":68,"context_line":"        setattr(driver, iface, impl)"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_cb66cb28","line":66,"range":{"start_line":66,"start_character":0,"end_line":66,"end_character":57},"updated":"2016-11-24 11:57:58.000000000","message":"are all the interfaces always set on all the nodes?","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0fcb27d62e3631b680cd6b851cecf1900a2e4aad","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        setattr(driver, iface, impl)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"def _get_interface(hardware_type, interface_type, interface_name):"},{"line_number":72,"context_line":"    factory \u003d _INTERFACE_LOADERS[interface_type]()"},{"line_number":73,"context_line":"    try:"},{"line_number":74,"context_line":"        impl \u003d factory.get_driver(interface_name)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_2ecf4d80","line":71,"range":{"start_line":71,"start_character":50,"end_line":71,"end_character":64},"updated":"2016-11-24 11:57:58.000000000","message":"s/interface_name/implementation_name/","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0fcb27d62e3631b680cd6b851cecf1900a2e4aad","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        setattr(driver, iface, impl)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"def _get_interface(hardware_type, interface_type, interface_name):"},{"line_number":72,"context_line":"    factory \u003d _INTERFACE_LOADERS[interface_type]()"},{"line_number":73,"context_line":"    try:"},{"line_number":74,"context_line":"        impl \u003d factory.get_driver(interface_name)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_2bcf3f80","line":71,"range":{"start_line":71,"start_character":34,"end_line":71,"end_character":48},"updated":"2016-11-24 11:57:58.000000000","message":"s/interface_type/interface_name","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0fcb27d62e3631b680cd6b851cecf1900a2e4aad","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        setattr(driver, iface, impl)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"def _get_interface(hardware_type, interface_type, interface_name):"},{"line_number":72,"context_line":"    factory \u003d _INTERFACE_LOADERS[interface_type]()"},{"line_number":73,"context_line":"    try:"},{"line_number":74,"context_line":"        impl \u003d factory.get_driver(interface_name)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_91ba4609","line":71,"range":{"start_line":71,"start_character":4,"end_line":71,"end_character":18},"updated":"2016-11-24 11:57:58.000000000","message":"should be a regular method of the AbstractHardwareType class","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0fcb27d62e3631b680cd6b851cecf1900a2e4aad","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            driver_name\u003dinterface_name,"},{"line_number":78,"context_line":"            entrypoint\u003dfactory._entrypoint_name)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    if isinstance(hardware_type, hardware_types.FakeHardware):"},{"line_number":81,"context_line":"        # NOTE(dtantsur): special-case fake hardware type to allow testing with"},{"line_number":82,"context_line":"        # any combinations of interface implementations."},{"line_number":83,"context_line":"        return impl"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    impl_supported \u003d getattr(hardware_type,"},{"line_number":86,"context_line":"                             \u0027supported_%s_interfaces\u0027 % interface_type)"},{"line_number":87,"context_line":"    if type(impl) not in impl_supported:"},{"line_number":88,"context_line":"        raise exception.InvalidParameterValue("},{"line_number":89,"context_line":"            _(\"%(iface)s interface implementation \u0027%(impl)s\u0027 is not supported \""},{"line_number":90,"context_line":"              \"for hardware type \u0027%(hw_type)s\u0027\") %"},{"line_number":91,"context_line":"            {\u0027iface\u0027: interface_type, \u0027impl\u0027: interface_name,"},{"line_number":92,"context_line":"             \u0027hw_type\u0027: hardware_type.__class__.__name__})"},{"line_number":93,"context_line":"    return impl"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"def _attach_interfaces_to_driver(driver, node, classic_driver):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_d1159e9b","line":93,"range":{"start_line":80,"start_character":1,"end_line":93,"end_character":15},"updated":"2016-11-24 11:57:58.000000000","message":"split into a separate _check_interface method of AbstractHardwareType","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0fcb27d62e3631b680cd6b851cecf1900a2e4aad","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    driver.network \u003d net_driver"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"def get_hardware_type(hardware_type):"},{"line_number":113,"context_line":"    \"\"\"Get a hardware type instance by name."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    :param hardware_type: the name of the hardware type to find"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_ce29798b","line":112,"range":{"start_line":112,"start_character":4,"end_line":112,"end_character":21},"updated":"2016-11-24 11:57:58.000000000","message":"why this isn\u0027t a classmethod of HardwareTypesFactory?","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0fcb27d62e3631b680cd6b851cecf1900a2e4aad","unresolved":false,"context_lines":[{"line_number":287,"context_line":"    _enabled_driver_list_config_option \u003d \u0027enabled_network_interfaces\u0027"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"_INTERFACE_LOADERS \u003d {"},{"line_number":291,"context_line":"    name: type(\u0027%sInterfaceFactory\u0027 % name.capitalize(),"},{"line_number":292,"context_line":"               (BaseDriverFactory,),"},{"line_number":293,"context_line":"               {\u0027_entrypoint_name\u0027: \u0027ironic.hardware.interfaces.%s\u0027 % name,"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_1148f686","line":290,"range":{"start_line":290,"start_character":0,"end_line":290,"end_character":18},"updated":"2016-11-24 11:57:58.000000000","message":"This feels to me as a class-level attribute of the AbstractHardwareType class; s/_INTERFACE_LOADERS/interface_loader_mapping/","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0fcb27d62e3631b680cd6b851cecf1900a2e4aad","unresolved":false,"context_lines":[{"line_number":287,"context_line":"    _enabled_driver_list_config_option \u003d \u0027enabled_network_interfaces\u0027"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"_INTERFACE_LOADERS \u003d {"},{"line_number":291,"context_line":"    name: type(\u0027%sInterfaceFactory\u0027 % name.capitalize(),"},{"line_number":292,"context_line":"               (BaseDriverFactory,),"},{"line_number":293,"context_line":"               {\u0027_entrypoint_name\u0027: \u0027ironic.hardware.interfaces.%s\u0027 % name,"},{"line_number":294,"context_line":"                \u0027_enabled_driver_list_config_option\u0027:"},{"line_number":295,"context_line":"                \u0027enabled_%s_interfaces\u0027 % name})"},{"line_number":296,"context_line":"    for name in driver_base.ALL_INTERFACES"},{"line_number":297,"context_line":"    if name !\u003d \u0027network\u0027  # we already have a class for the network interface"},{"line_number":298,"context_line":"}"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"_INTERFACE_LOADERS[\u0027network\u0027] \u003d NetworkInterfaceFactory"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_6bebf8b0","line":298,"range":{"start_line":290,"start_character":0,"end_line":298,"end_character":1},"updated":"2016-11-24 11:57:58.000000000","message":"maybe add a comment explaining this code?\ntook me couple of reads to grok it and I\u0027m still not certain what\u0027s going on here O:-)\nfeels like a factory factory","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"91b2e549096c605be7028ed2dff1630fad801068","unresolved":false,"context_lines":[{"line_number":297,"context_line":"    if name !\u003d \u0027network\u0027  # we already have a class for the network interface"},{"line_number":298,"context_line":"}"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"_INTERFACE_LOADERS[\u0027network\u0027] \u003d NetworkInterfaceFactory"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_2709402d","line":300,"updated":"2016-11-22 11:32:56.000000000","message":"Do we need to code around this? Can we just kill the NetworkInterfaceFactory and generate it like the rest? _attach_interfaces_to_driver could then use _INTERFACE_LOADERS[\u0027network\u0027]","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"59859b51870194f86e893baf5f21b00c0adb6d7c","unresolved":false,"context_lines":[{"line_number":297,"context_line":"    if name !\u003d \u0027network\u0027  # we already have a class for the network interface"},{"line_number":298,"context_line":"}"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"_INTERFACE_LOADERS[\u0027network\u0027] \u003d NetworkInterfaceFactory"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_a7db901a","line":300,"in_reply_to":"7a77a97e_2709402d","updated":"2016-11-22 11:38:04.000000000","message":"Yeah, I\u0027m fine either way","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"48a58907a8241f4e3b688109637a8d73ba8a3bcc","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    is_hardware_type \u003d isinstance(driver, hardware_types.AbstractHardwareType)"},{"line_number":142,"context_line":"    result \u003d False"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    # Legacy network interface defaults"},{"line_number":145,"context_line":"    additional_defaults \u003d {"},{"line_number":146,"context_line":"        \u0027network\u0027: CONF.default_network_interface or"},{"line_number":147,"context_line":"        (\u0027flat\u0027 if CONF.dhcp.dhcp_provider \u003d\u003d \u0027neutron\u0027 else \u0027noop\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a74a57a_1985d9cd","line":144,"range":{"start_line":144,"start_character":6,"end_line":144,"end_character":12},"updated":"2016-11-29 14:37:25.000000000","message":"nit: I wouldn\u0027t necessarily call them legacy defaults. :)","commit_id":"ee596da97726db46a72fb5836dbac045de9cfe5b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"48a58907a8241f4e3b688109637a8d73ba8a3bcc","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    if isinstance(driver, hardware_types.AbstractHardwareType):"},{"line_number":151,"context_line":"        factories \u003d _INTERFACE_LOADERS"},{"line_number":152,"context_line":"    else:"},{"line_number":153,"context_line":"        # Only network interface is dynamic for classic drivers"},{"line_number":154,"context_line":"        factories \u003d {\u0027network\u0027: _INTERFACE_LOADERS[\u0027network\u0027]}"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    # Walk through all dynamic interfaces and check/update them"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a74a57a_b965c51e","line":153,"range":{"start_line":153,"start_character":8,"end_line":153,"end_character":63},"updated":"2016-11-29 14:37:25.000000000","message":"nit: Perhaps \"Dynamic interfaces applying to classic drivers go here\"","commit_id":"ee596da97726db46a72fb5836dbac045de9cfe5b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"48a58907a8241f4e3b688109637a8d73ba8a3bcc","unresolved":false,"context_lines":[{"line_number":397,"context_line":"               {\u0027_entrypoint_name\u0027: \u0027ironic.hardware.interfaces.%s\u0027 % name,"},{"line_number":398,"context_line":"                \u0027_enabled_driver_list_config_option\u0027:"},{"line_number":399,"context_line":"                \u0027enabled_%s_interfaces\u0027 % name})"},{"line_number":400,"context_line":"    for name in driver_base.ALL_INTERFACES"},{"line_number":401,"context_line":"}"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a74a57a_61336ff6","line":400,"range":{"start_line":400,"start_character":3,"end_line":400,"end_character":42},"updated":"2016-11-29 14:37:25.000000000","message":"Based on the test failures for py35, I suspect this is where things might be going sideways, at least without any hacking on the code to add additional testing.  I can\u0027t help but wonder if the network interface is getting lost somewhere along the way.","commit_id":"ee596da97726db46a72fb5836dbac045de9cfe5b"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d071e1f289bff6de4b1f0d8bd10155d25dd1be7d","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    Starts with a `BareDriver` object, and attaches implementations of the"},{"line_number":38,"context_line":"    various driver interfaces to it. Currently these all come from the"},{"line_number":39,"context_line":"    monolithic driver singleton, but later will come from separate"},{"line_number":40,"context_line":"    driver factories and configurable via the database."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    :param task: The task containing the node to build a driver for."}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_ae954441","line":39,"updated":"2016-12-01 21:37:07.000000000","message":"Should this docstring be updated yet? Perhaps it should be done when driver composition reform is done, instead.","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"58f69b34db92ff359360b1b7c3ce7c8bda67c979","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    Starts with a `BareDriver` object, and attaches implementations of the"},{"line_number":38,"context_line":"    various driver interfaces to it. Currently these all come from the"},{"line_number":39,"context_line":"    monolithic driver singleton, but later will come from separate"},{"line_number":40,"context_line":"    driver factories and configurable via the database."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    :param task: The task containing the node to build a driver for."}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_795f5841","line":39,"in_reply_to":"3a71b18c_ae954441","updated":"2016-12-02 10:54:58.000000000","message":"Done","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"76dee97e60dc29ebadc9bb338f28681e59bf968a","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    check_and_update_node_interfaces(node)"},{"line_number":53,"context_line":"    bare_driver \u003d driver_base.BareDriver()"},{"line_number":54,"context_line":"    driver_name \u003d driver_name or node.driver"},{"line_number":55,"context_line":"    orig_driver \u003d get_driver_or_hardware_type(driver_name)"},{"line_number":56,"context_line":"    if isinstance(orig_driver, hardware_types.AbstractHardwareType):"},{"line_number":57,"context_line":"        _attach_interfaces_from_hardware_type(bare_driver, node, orig_driver)"},{"line_number":58,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_2ed3f439","line":55,"updated":"2016-12-01 21:43:41.000000000","message":"Orig_driver name seems like there\u0027s some changed driver used in predecessing code. Using \u0027driver\u0027 name seems more legit.","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"58f69b34db92ff359360b1b7c3ce7c8bda67c979","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    check_and_update_node_interfaces(node)"},{"line_number":53,"context_line":"    bare_driver \u003d driver_base.BareDriver()"},{"line_number":54,"context_line":"    driver_name \u003d driver_name or node.driver"},{"line_number":55,"context_line":"    orig_driver \u003d get_driver_or_hardware_type(driver_name)"},{"line_number":56,"context_line":"    if isinstance(orig_driver, hardware_types.AbstractHardwareType):"},{"line_number":57,"context_line":"        _attach_interfaces_from_hardware_type(bare_driver, node, orig_driver)"},{"line_number":58,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_fc74369d","line":55,"in_reply_to":"3a71b18c_2ed3f439","updated":"2016-12-02 10:54:58.000000000","message":"Done","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d071e1f289bff6de4b1f0d8bd10155d25dd1be7d","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _attach_interfaces_from_hardware_type(driver, node, hardware_type):"},{"line_number":65,"context_line":"    for iface in _INTERFACE_LOADERS:"},{"line_number":66,"context_line":"        impl_name \u003d getattr(node, \u0027%s_interface\u0027 % iface)"},{"line_number":67,"context_line":"        impl \u003d _get_interface(hardware_type, iface, impl_name)"},{"line_number":68,"context_line":"        setattr(driver, iface, impl)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_0ed9d821","line":65,"updated":"2016-12-01 21:37:07.000000000","message":"Why is special logic for the network interface necessary when loading a classic driver but not when loading from hardware type?","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"58f69b34db92ff359360b1b7c3ce7c8bda67c979","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _attach_interfaces_from_hardware_type(driver, node, hardware_type):"},{"line_number":65,"context_line":"    for iface in _INTERFACE_LOADERS:"},{"line_number":66,"context_line":"        impl_name \u003d getattr(node, \u0027%s_interface\u0027 % iface)"},{"line_number":67,"context_line":"        impl \u003d _get_interface(hardware_type, iface, impl_name)"},{"line_number":68,"context_line":"        setattr(driver, iface, impl)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_1c9f32b5","line":65,"in_reply_to":"3a71b18c_0ed9d821","updated":"2016-12-02 10:54:58.000000000","message":"Because for classic drivers only network_interface is dynamic, while for hardware types all interfaces are.","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"76dee97e60dc29ebadc9bb338f28681e59bf968a","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        setattr(driver, iface, impl)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"def _get_interface(driver, interface_type, interface_name):"},{"line_number":72,"context_line":"    \"\"\"Get interface implementation instance."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    For hardware types also validates compatibility."}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_ae262414","line":71,"updated":"2016-12-01 21:43:41.000000000","message":"currently this function is used only for  hardware type, could be reused for classic drivers","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"76dee97e60dc29ebadc9bb338f28681e59bf968a","unresolved":false,"context_lines":[{"line_number":81,"context_line":"    :raises: IncompatibleInterface if driver is a hardware type and"},{"line_number":82,"context_line":"             the requested implementation is not compatible with it."},{"line_number":83,"context_line":"    \"\"\""},{"line_number":84,"context_line":"    factory \u003d _INTERFACE_LOADERS[interface_type]()"},{"line_number":85,"context_line":"    try:"},{"line_number":86,"context_line":"        impl \u003d factory.get_driver(interface_name)"},{"line_number":87,"context_line":"    except KeyError:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_ee773c00","line":84,"updated":"2016-12-01 21:43:41.000000000","message":"seems like this code could be used in _attach_interfaces_to_driver","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"58f69b34db92ff359360b1b7c3ce7c8bda67c979","unresolved":false,"context_lines":[{"line_number":81,"context_line":"    :raises: IncompatibleInterface if driver is a hardware type and"},{"line_number":82,"context_line":"             the requested implementation is not compatible with it."},{"line_number":83,"context_line":"    \"\"\""},{"line_number":84,"context_line":"    factory \u003d _INTERFACE_LOADERS[interface_type]()"},{"line_number":85,"context_line":"    try:"},{"line_number":86,"context_line":"        impl \u003d factory.get_driver(interface_name)"},{"line_number":87,"context_line":"    except KeyError:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_1c865265","line":84,"in_reply_to":"3a71b18c_ee773c00","updated":"2016-12-02 10:54:58.000000000","message":"Done","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d071e1f289bff6de4b1f0d8bd10155d25dd1be7d","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    return impl"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"def _attach_interfaces_to_driver(driver, node, classic_driver):"},{"line_number":113,"context_line":"    for iface in classic_driver.all_interfaces:"},{"line_number":114,"context_line":"        impl \u003d getattr(classic_driver, iface, None)"},{"line_number":115,"context_line":"        setattr(driver, iface, impl)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_4ee2f0d6","line":112,"updated":"2016-12-01 21:37:07.000000000","message":"It might be good to add a docstring here, even though this function was here before, since there are now 2 different cases in the caller for associating interfaces with a driver or hardware type.\n\nAlso, maybe s/_attach_interfaces_to_driver/_attach_interfaces_to_classic_driver","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"58f69b34db92ff359360b1b7c3ce7c8bda67c979","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    return impl"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"def _attach_interfaces_to_driver(driver, node, classic_driver):"},{"line_number":113,"context_line":"    for iface in classic_driver.all_interfaces:"},{"line_number":114,"context_line":"        impl \u003d getattr(classic_driver, iface, None)"},{"line_number":115,"context_line":"        setattr(driver, iface, impl)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_dc45bab3","line":112,"in_reply_to":"3a71b18c_4ee2f0d6","updated":"2016-12-02 10:54:58.000000000","message":"Done","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"76dee97e60dc29ebadc9bb338f28681e59bf968a","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        field_name \u003d \u0027%s_interface\u0027 % iface"},{"line_number":159,"context_line":"        # NOTE(dtantsur): objects raise NotImplementedError on accessing fields"},{"line_number":160,"context_line":"        # that are known, but missing from an object. Thus, we cannot just use"},{"line_number":161,"context_line":"        # getattr(node, field_name, None) here."},{"line_number":162,"context_line":"        if field_name in node:"},{"line_number":163,"context_line":"            impl_name \u003d getattr(node, field_name)"},{"line_number":164,"context_line":"            if impl_name is not None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_8eede88d","line":161,"updated":"2016-12-01 21:43:41.000000000","message":"previous network_interface seemed more descriptive","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"fd88fe4e83cd566d8224063f6d94ad0016c136c7","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        field_name \u003d \u0027%s_interface\u0027 % iface"},{"line_number":159,"context_line":"        # NOTE(dtantsur): objects raise NotImplementedError on accessing fields"},{"line_number":160,"context_line":"        # that are known, but missing from an object. Thus, we cannot just use"},{"line_number":161,"context_line":"        # getattr(node, field_name, None) here."},{"line_number":162,"context_line":"        if field_name in node:"},{"line_number":163,"context_line":"            impl_name \u003d getattr(node, field_name)"},{"line_number":164,"context_line":"            if impl_name is not None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_ceffb2ff","line":161,"in_reply_to":"3a71b18c_8b776c39","updated":"2016-12-02 15:52:09.000000000","message":"yep","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"58f69b34db92ff359360b1b7c3ce7c8bda67c979","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        field_name \u003d \u0027%s_interface\u0027 % iface"},{"line_number":159,"context_line":"        # NOTE(dtantsur): objects raise NotImplementedError on accessing fields"},{"line_number":160,"context_line":"        # that are known, but missing from an object. Thus, we cannot just use"},{"line_number":161,"context_line":"        # getattr(node, field_name, None) here."},{"line_number":162,"context_line":"        if field_name in node:"},{"line_number":163,"context_line":"            impl_name \u003d getattr(node, field_name)"},{"line_number":164,"context_line":"            if impl_name is not None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_9c226200","line":161,"in_reply_to":"3a71b18c_8eede88d","updated":"2016-12-02 10:54:58.000000000","message":"well, now it\u0027s no longer network_interface only","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"759f73f7079f86098737331d506e9600beed7e56","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        field_name \u003d \u0027%s_interface\u0027 % iface"},{"line_number":159,"context_line":"        # NOTE(dtantsur): objects raise NotImplementedError on accessing fields"},{"line_number":160,"context_line":"        # that are known, but missing from an object. Thus, we cannot just use"},{"line_number":161,"context_line":"        # getattr(node, field_name, None) here."},{"line_number":162,"context_line":"        if field_name in node:"},{"line_number":163,"context_line":"            impl_name \u003d getattr(node, field_name)"},{"line_number":164,"context_line":"            if impl_name is not None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_8b776c39","line":161,"in_reply_to":"3a71b18c_9c226200","updated":"2016-12-02 15:47:01.000000000","message":"but still an interface, right? I am just assuming by assigned suffix :)","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"76dee97e60dc29ebadc9bb338f28681e59bf968a","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                continue"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        # We have to modify this node object, so we\u0027ll return True"},{"line_number":170,"context_line":"        result \u003d True"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        # The fallback default from the configuration"},{"line_number":173,"context_line":"        impl_name \u003d getattr(CONF, \u0027default_%s_interface\u0027 % iface)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_49790a93","line":170,"updated":"2016-12-01 21:43:41.000000000","message":"Assuming it will either raise an exception in this loop, or will successfully iterate, keeping and setting result value makes no sense. Wouldn\u0027t it better to return True at the end and False if \u0027factories\u0027 dict is empty?","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"58f69b34db92ff359360b1b7c3ce7c8bda67c979","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                continue"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        # We have to modify this node object, so we\u0027ll return True"},{"line_number":170,"context_line":"        result \u003d True"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        # The fallback default from the configuration"},{"line_number":173,"context_line":"        impl_name \u003d getattr(CONF, \u0027default_%s_interface\u0027 % iface)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_fc60b637","line":170,"in_reply_to":"3a71b18c_49790a93","updated":"2016-12-02 10:54:58.000000000","message":"I don\u0027t quite get it... factories is never empty, and result is set when any interface was *changed*","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"fd88fe4e83cd566d8224063f6d94ad0016c136c7","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                continue"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        # We have to modify this node object, so we\u0027ll return True"},{"line_number":170,"context_line":"        result \u003d True"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        # The fallback default from the configuration"},{"line_number":173,"context_line":"        impl_name \u003d getattr(CONF, \u0027default_%s_interface\u0027 % iface)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_4e3ba2d1","line":170,"in_reply_to":"3a71b18c_4b8ab4c0","updated":"2016-12-02 15:52:09.000000000","message":"1. Why? What if all fields are set and not None? Then we\u0027ll always reach \"continue\" and never set result to True. See https://review.openstack.org/#/c/336626/19/ironic/tests/unit/common/test_driver_factory.py@224 for test of this behavior (though I do admit we could use a test with hardware types).\n\n2. This is correct, but #1 is not.","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"759f73f7079f86098737331d506e9600beed7e56","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                continue"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        # We have to modify this node object, so we\u0027ll return True"},{"line_number":170,"context_line":"        result \u003d True"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        # The fallback default from the configuration"},{"line_number":173,"context_line":"        impl_name \u003d getattr(CONF, \u0027default_%s_interface\u0027 % iface)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_4b8ab4c0","line":170,"in_reply_to":"3a71b18c_fc60b637","updated":"2016-12-02 15:47:01.000000000","message":"Ok, so:\n1) if factories is never empty, and _get_interface in ln 166 won\u0027t raise an exception - this function will always return True\n2) if _get_interface raises an exception - it will propagate exception instead of returning result\nCombining 1 and 2 - there is no use in keeping result variable at all; returning either True or len(factories) \u003e 0 (just in case), will do the same thing.\nPlease correct me if I\u0027m missing something","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"76dee97e60dc29ebadc9bb338f28681e59bf968a","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        raise exception.DriverNotFound(driver_name\u003dhardware_type)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"# TODO(dtantsur): rename to get_classic_driver"},{"line_number":235,"context_line":"def get_driver(driver_name):"},{"line_number":236,"context_line":"    \"\"\"Simple method to get a ref to an instance of a driver."},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_eec81c77","line":234,"updated":"2016-12-01 21:43:41.000000000","message":"another name used: classis/orig may introduce some kind of confusion","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d071e1f289bff6de4b1f0d8bd10155d25dd1be7d","unresolved":false,"context_lines":[{"line_number":402,"context_line":""},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"# TODO(dtantsur): This factory is still used explicitly in many places"},{"line_number":405,"context_line":"NetworkInterfaceFactory \u003d _INTERFACE_LOADERS[\u0027network\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_8e8888e9","line":405,"updated":"2016-12-01 21:37:07.000000000","message":"Do you mean that this is used outside the module? Is this going to be removed in a separate patch set in driver composition reform, or is the TODO for this patch set?\n\nIMBW, but this seems like a simple find and replace.","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"58f69b34db92ff359360b1b7c3ce7c8bda67c979","unresolved":false,"context_lines":[{"line_number":402,"context_line":""},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"# TODO(dtantsur): This factory is still used explicitly in many places"},{"line_number":405,"context_line":"NetworkInterfaceFactory \u003d _INTERFACE_LOADERS[\u0027network\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_5cd52ab7","line":405,"in_reply_to":"3a71b18c_8e8888e9","updated":"2016-12-02 10:54:58.000000000","message":"It is a simple find and replace, but this patch is already huge enough :) I planned on a separate patch","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    :param node: node object to check and potentially update"},{"line_number":147,"context_line":"    :returns: True if any changes were made to the node, otherwise False"},{"line_number":148,"context_line":"    :raises: InterfaceNotFoundInEntrypoint on validation failure"},{"line_number":149,"context_line":"    :raises: NoValidDefaultForInterface if the default value cannot be"},{"line_number":150,"context_line":"             calculated and is not provided in the configuration"},{"line_number":151,"context_line":"    \"\"\""},{"line_number":152,"context_line":"    driver \u003d get_driver_or_hardware_type(node.driver)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_707b9e8c","line":149,"updated":"2016-12-05 13:02:12.000000000","message":"DriverNotFound too","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7e41940b975532ef59be57fa697ddf2871771b54","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    :param node: node object to check and potentially update"},{"line_number":147,"context_line":"    :returns: True if any changes were made to the node, otherwise False"},{"line_number":148,"context_line":"    :raises: InterfaceNotFoundInEntrypoint on validation failure"},{"line_number":149,"context_line":"    :raises: NoValidDefaultForInterface if the default value cannot be"},{"line_number":150,"context_line":"             calculated and is not provided in the configuration"},{"line_number":151,"context_line":"    \"\"\""},{"line_number":152,"context_line":"    driver \u003d get_driver_or_hardware_type(node.driver)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_42c4e33e","line":149,"in_reply_to":"3a71b18c_707b9e8c","updated":"2016-12-06 13:42:48.000000000","message":"Done","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    :raises: NoValidDefaultForInterface if the default value cannot be"},{"line_number":150,"context_line":"             calculated and is not provided in the configuration"},{"line_number":151,"context_line":"    \"\"\""},{"line_number":152,"context_line":"    driver \u003d get_driver_or_hardware_type(node.driver)"},{"line_number":153,"context_line":"    is_hardware_type \u003d isinstance(driver, hardware_types.AbstractHardwareType)"},{"line_number":154,"context_line":"    # Result - whether the node object was modified"},{"line_number":155,"context_line":"    result \u003d False"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_b0a8d6dc","line":152,"updated":"2016-12-05 13:02:12.000000000","message":"We\u0027re doing once again on L58, but this can be called completely separately, so maybe OK.","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7e41940b975532ef59be57fa697ddf2871771b54","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    :raises: NoValidDefaultForInterface if the default value cannot be"},{"line_number":150,"context_line":"             calculated and is not provided in the configuration"},{"line_number":151,"context_line":"    \"\"\""},{"line_number":152,"context_line":"    driver \u003d get_driver_or_hardware_type(node.driver)"},{"line_number":153,"context_line":"    is_hardware_type \u003d isinstance(driver, hardware_types.AbstractHardwareType)"},{"line_number":154,"context_line":"    # Result - whether the node object was modified"},{"line_number":155,"context_line":"    result \u003d False"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_a2e3f7d7","line":152,"in_reply_to":"3a71b18c_b0a8d6dc","updated":"2016-12-06 13:42:48.000000000","message":"Yep","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        (\u0027flat\u0027 if CONF.dhcp.dhcp_provider \u003d\u003d \u0027neutron\u0027 else \u0027noop\u0027)"},{"line_number":161,"context_line":"    }"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    if isinstance(driver, hardware_types.AbstractHardwareType):"},{"line_number":164,"context_line":"        factories \u003d _INTERFACE_LOADERS"},{"line_number":165,"context_line":"    else:"},{"line_number":166,"context_line":"        # Only network interface is dynamic for classic drivers"},{"line_number":167,"context_line":"        factories \u003d {\u0027network\u0027: _INTERFACE_LOADERS[\u0027network\u0027]}"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    # Walk through all dynamic interfaces and check/update them"},{"line_number":170,"context_line":"    for iface, factory in factories.items():"},{"line_number":171,"context_line":"        field_name \u003d \u0027%s_interface\u0027 % iface"},{"line_number":172,"context_line":"        # NOTE(dtantsur): objects raise NotImplementedError on accessing fields"},{"line_number":173,"context_line":"        # that are known, but missing from an object. Thus, we cannot just use"},{"line_number":174,"context_line":"        # getattr(node, field_name, None) here."},{"line_number":175,"context_line":"        if field_name in node:"},{"line_number":176,"context_line":"            impl_name \u003d getattr(node, field_name)"},{"line_number":177,"context_line":"            if impl_name is not None:"},{"line_number":178,"context_line":"                # Check that the provided value is correct for this type"},{"line_number":179,"context_line":"                _get_interface(driver, iface, impl_name)"},{"line_number":180,"context_line":"                continue"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        # We have to modify this node object, so we\u0027ll return True"},{"line_number":183,"context_line":"        result \u003d True"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_4a76f5a4","line":180,"range":{"start_line":163,"start_character":4,"end_line":180,"end_character":24},"updated":"2016-12-05 13:02:12.000000000","message":"This basically duplicates the logic in _attach_interfaces_to_driver, but dunno how to refactor it properly.","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7e41940b975532ef59be57fa697ddf2871771b54","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        (\u0027flat\u0027 if CONF.dhcp.dhcp_provider \u003d\u003d \u0027neutron\u0027 else \u0027noop\u0027)"},{"line_number":161,"context_line":"    }"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    if isinstance(driver, hardware_types.AbstractHardwareType):"},{"line_number":164,"context_line":"        factories \u003d _INTERFACE_LOADERS"},{"line_number":165,"context_line":"    else:"},{"line_number":166,"context_line":"        # Only network interface is dynamic for classic drivers"},{"line_number":167,"context_line":"        factories \u003d {\u0027network\u0027: _INTERFACE_LOADERS[\u0027network\u0027]}"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    # Walk through all dynamic interfaces and check/update them"},{"line_number":170,"context_line":"    for iface, factory in factories.items():"},{"line_number":171,"context_line":"        field_name \u003d \u0027%s_interface\u0027 % iface"},{"line_number":172,"context_line":"        # NOTE(dtantsur): objects raise NotImplementedError on accessing fields"},{"line_number":173,"context_line":"        # that are known, but missing from an object. Thus, we cannot just use"},{"line_number":174,"context_line":"        # getattr(node, field_name, None) here."},{"line_number":175,"context_line":"        if field_name in node:"},{"line_number":176,"context_line":"            impl_name \u003d getattr(node, field_name)"},{"line_number":177,"context_line":"            if impl_name is not None:"},{"line_number":178,"context_line":"                # Check that the provided value is correct for this type"},{"line_number":179,"context_line":"                _get_interface(driver, iface, impl_name)"},{"line_number":180,"context_line":"                continue"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        # We have to modify this node object, so we\u0027ll return True"},{"line_number":183,"context_line":"        result \u003d True"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_9d8e5c2c","line":180,"range":{"start_line":163,"start_character":4,"end_line":180,"end_character":24},"in_reply_to":"3a71b18c_4a76f5a4","updated":"2016-12-06 13:42:48.000000000","message":"It\u0027s not a huge duplication, so I\u0027d leave it for now","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                       for name in factory().names}"},{"line_number":200,"context_line":"            for impl_class in supported:"},{"line_number":201,"context_line":"                try:"},{"line_number":202,"context_line":"                    impl_name \u003d enabled[impl_class]"},{"line_number":203,"context_line":"                except KeyError:"},{"line_number":204,"context_line":"                    pass"},{"line_number":205,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_aab309e8","line":202,"updated":"2016-12-05 13:02:12.000000000","message":"nit - could break on the next line instead of else: block","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7e41940b975532ef59be57fa697ddf2871771b54","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                       for name in factory().names}"},{"line_number":200,"context_line":"            for impl_class in supported:"},{"line_number":201,"context_line":"                try:"},{"line_number":202,"context_line":"                    impl_name \u003d enabled[impl_class]"},{"line_number":203,"context_line":"                except KeyError:"},{"line_number":204,"context_line":"                    pass"},{"line_number":205,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_bd8158fd","line":202,"in_reply_to":"3a71b18c_aab309e8","updated":"2016-12-06 13:42:48.000000000","message":"Done","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                        as a base, if different than task.node.driver."},{"line_number":45,"context_line":"    :returns: A driver object for the task."},{"line_number":46,"context_line":"    :raises: DriverNotFound if node.driver could not be"},{"line_number":47,"context_line":"             found in the \"ironic.drivers\" and \"ironic.hardware.types\""},{"line_number":48,"context_line":"             namespaces."},{"line_number":49,"context_line":"    :raises: InterfaceNotFoundInEntrypoint if some node interfaces are set"},{"line_number":50,"context_line":"             to invalid or unsupported values."}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_5c863814","line":47,"updated":"2016-12-07 23:31:23.000000000","message":"grammatically, I think it is s/and/or/. (It doesn\u0027t have to be in both, just one of them, right?)","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                        as a base, if different than task.node.driver."},{"line_number":45,"context_line":"    :returns: A driver object for the task."},{"line_number":46,"context_line":"    :raises: DriverNotFound if node.driver could not be"},{"line_number":47,"context_line":"             found in the \"ironic.drivers\" and \"ironic.hardware.types\""},{"line_number":48,"context_line":"             namespaces."},{"line_number":49,"context_line":"    :raises: InterfaceNotFoundInEntrypoint if some node interfaces are set"},{"line_number":50,"context_line":"             to invalid or unsupported values."}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_5d0b0124","line":47,"in_reply_to":"3a71b18c_340ae126","updated":"2016-12-12 12:01:20.000000000","message":"Done","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"cb0eb625d3bfb1dfa932eae47b7550f19052a759","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                        as a base, if different than task.node.driver."},{"line_number":45,"context_line":"    :returns: A driver object for the task."},{"line_number":46,"context_line":"    :raises: DriverNotFound if node.driver could not be"},{"line_number":47,"context_line":"             found in the \"ironic.drivers\" and \"ironic.hardware.types\""},{"line_number":48,"context_line":"             namespaces."},{"line_number":49,"context_line":"    :raises: InterfaceNotFoundInEntrypoint if some node interfaces are set"},{"line_number":50,"context_line":"             to invalid or unsupported values."}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_340ae126","line":47,"in_reply_to":"3a71b18c_5c863814","updated":"2016-12-12 11:33:53.000000000","message":"maybe even:\nneither in \"ironic.drivers\" nor \"ironic.hardware.types\" namespaces\"\n?","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":50,"context_line":"             to invalid or unsupported values."},{"line_number":51,"context_line":"    :raises: IncompatibleInterface if driver is a hardware type and"},{"line_number":52,"context_line":"             the requested implementation is not compatible with it."},{"line_number":53,"context_line":"    \"\"\""},{"line_number":54,"context_line":"    node \u003d task.node"},{"line_number":55,"context_line":"    driver_name \u003d driver_name or node.driver"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_9c9ff04f","line":53,"updated":"2016-12-07 23:31:23.000000000","message":"since driver_name isn\u0027t mandatory, did you think about adding a hardware_type\u003dNone parameter, instead of overloading driver_name? (I haven\u0027t yet looked to see how you are using this method.)","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":50,"context_line":"             to invalid or unsupported values."},{"line_number":51,"context_line":"    :raises: IncompatibleInterface if driver is a hardware type and"},{"line_number":52,"context_line":"             the requested implementation is not compatible with it."},{"line_number":53,"context_line":"    \"\"\""},{"line_number":54,"context_line":"    node \u003d task.node"},{"line_number":55,"context_line":"    driver_name \u003d driver_name or node.driver"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_1d7a6988","line":53,"in_reply_to":"3a71b18c_9c9ff04f","updated":"2016-12-12 12:01:20.000000000","message":"As we\u0027re using node.driver for both, I\u0027d prefer to keep driver_name. I do realize that naming is so-so in this change..","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    _attach_interfaces_to_driver(bare_driver, node, driver_or_hw_type)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    return bare_driver"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"def _attach_interfaces_to_driver(bare_driver, node, driver_or_hw_type):"},{"line_number":67,"context_line":"    \"\"\"Attach interface implementations to a bare driver object."}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_5809e1dc","line":64,"updated":"2016-12-07 23:31:23.000000000","message":"I have to say, I don\u0027t like that we are passing drive_or_hw_type parameter to quite a few of these methods. I understand why, but it makes it hard to review/read/understand. Wondering if we could split them out in diff methods to make things simpler (if that is possible). Anyway, just a thought, I haven\u0027t thought too much about it.","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    _attach_interfaces_to_driver(bare_driver, node, driver_or_hw_type)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    return bare_driver"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"def _attach_interfaces_to_driver(bare_driver, node, driver_or_hw_type):"},{"line_number":67,"context_line":"    \"\"\"Attach interface implementations to a bare driver object."}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_1da189f8","line":64,"in_reply_to":"3a71b18c_5809e1dc","updated":"2016-12-12 12:01:20.000000000","message":"Well, I used to have them split and was asked to join :) the problem is that such separate functions would share a lot of copy-pasted code IMO.","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    \"\"\"Attach interface implementations to a bare driver object."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    For classic drivers, copies implementations from the singleton driver"},{"line_number":70,"context_line":"    object, then attached the network interface."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    For hardware types, load all interface implementations dynamically."},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_f74b9d5d","line":70,"updated":"2016-12-07 23:31:23.000000000","message":"s/attached/attaches/ ?\n\nTo prepare for the future, maybe s/attached/attaches the dynamic interfaces (interfaces that are not part of a BaseDriver), for e.g. network interface./","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    \"\"\"Attach interface implementations to a bare driver object."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    For classic drivers, copies implementations from the singleton driver"},{"line_number":70,"context_line":"    object, then attached the network interface."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    For hardware types, load all interface implementations dynamically."},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_9dad99eb","line":70,"in_reply_to":"3a71b18c_f74b9d5d","updated":"2016-12-12 12:01:20.000000000","message":"Done","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"cb0eb625d3bfb1dfa932eae47b7550f19052a759","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            impl \u003d getattr(driver_or_hw_type, iface, None)"},{"line_number":88,"context_line":"            setattr(bare_driver, iface, impl)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # NOTE(dtantsur): only network_interface is dynamic for classic"},{"line_number":91,"context_line":"        # drivers, thus it requires separate treatment."},{"line_number":92,"context_line":"        dynamic_interfaces \u003d [\u0027network\u0027]"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_9a3f5fb3","line":90,"updated":"2016-12-12 11:33:53.000000000","message":"\u0027network_interface\u0027 suggests actual name, while \u0027network\u0027 is contained in the list. Maybe:\nonly \u0027network\u0027 interface ...\nwould suit better?","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            impl \u003d getattr(driver_or_hw_type, iface, None)"},{"line_number":88,"context_line":"            setattr(bare_driver, iface, impl)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # NOTE(dtantsur): only network_interface is dynamic for classic"},{"line_number":91,"context_line":"        # drivers, thus it requires separate treatment."},{"line_number":92,"context_line":"        dynamic_interfaces \u003d [\u0027network\u0027]"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_5df5c1ea","line":90,"in_reply_to":"3a71b18c_9a3f5fb3","updated":"2016-12-12 12:01:20.000000000","message":"Done","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            setattr(bare_driver, iface, impl)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # NOTE(dtantsur): only network_interface is dynamic for classic"},{"line_number":91,"context_line":"        # drivers, thus it requires separate treatment."},{"line_number":92,"context_line":"        dynamic_interfaces \u003d [\u0027network\u0027]"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    for iface in dynamic_interfaces:"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_774a2d29","line":91,"updated":"2016-12-07 23:31:23.000000000","message":"As long as we support classic drivers, any new interfaces (like storage interface) will need to be added to this list, right?","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            setattr(bare_driver, iface, impl)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # NOTE(dtantsur): only network_interface is dynamic for classic"},{"line_number":91,"context_line":"        # drivers, thus it requires separate treatment."},{"line_number":92,"context_line":"        dynamic_interfaces \u003d [\u0027network\u0027]"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    for iface in dynamic_interfaces:"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_bde4153c","line":91,"in_reply_to":"3a71b18c_774a2d29","updated":"2016-12-12 12:01:20.000000000","message":"Right. So Julia\u0027s patch will introduce volume_inteface to this list.","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    For hardware types also validates compatibility."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    :param driver: a hardware type or classic driver instance."},{"line_number":106,"context_line":"    :param interface_type: type of the interface (e.g. \u0027boot\u0027)."},{"line_number":107,"context_line":"    :param interface_name: entry point name of the interface implementation."},{"line_number":108,"context_line":"    :returns: instance of the requested interface implementation."}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_b275b333","line":105,"updated":"2016-12-07 23:31:23.000000000","message":"to be consistent, I guess this ought to be driver_or_hw_type","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    For hardware types also validates compatibility."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    :param driver: a hardware type or classic driver instance."},{"line_number":106,"context_line":"    :param interface_type: type of the interface (e.g. \u0027boot\u0027)."},{"line_number":107,"context_line":"    :param interface_name: entry point name of the interface implementation."},{"line_number":108,"context_line":"    :returns: instance of the requested interface implementation."}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_9d491934","line":105,"in_reply_to":"3a71b18c_b275b333","updated":"2016-12-12 12:01:20.000000000","message":"Done","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    For hardware types also validates compatibility."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    :param driver: a hardware type or classic driver instance."},{"line_number":106,"context_line":"    :param interface_type: type of the interface (e.g. \u0027boot\u0027)."},{"line_number":107,"context_line":"    :param interface_name: entry point name of the interface implementation."},{"line_number":108,"context_line":"    :returns: instance of the requested interface implementation."},{"line_number":109,"context_line":"    :raises: InterfaceNotFoundInEntrypoint if the entry point was not found."}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_57eb71b0","line":106,"updated":"2016-12-07 23:31:23.000000000","message":"this is a string/name for the type of interface","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    For hardware types also validates compatibility."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    :param driver: a hardware type or classic driver instance."},{"line_number":106,"context_line":"    :param interface_type: type of the interface (e.g. \u0027boot\u0027)."},{"line_number":107,"context_line":"    :param interface_name: entry point name of the interface implementation."},{"line_number":108,"context_line":"    :returns: instance of the requested interface implementation."},{"line_number":109,"context_line":"    :raises: InterfaceNotFoundInEntrypoint if the entry point was not found."}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_3d5565c1","line":106,"in_reply_to":"3a71b18c_57eb71b0","updated":"2016-12-12 12:01:20.000000000","message":"Done","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    :param driver: a hardware type or classic driver instance."},{"line_number":106,"context_line":"    :param interface_type: type of the interface (e.g. \u0027boot\u0027)."},{"line_number":107,"context_line":"    :param interface_name: entry point name of the interface implementation."},{"line_number":108,"context_line":"    :returns: instance of the requested interface implementation."},{"line_number":109,"context_line":"    :raises: InterfaceNotFoundInEntrypoint if the entry point was not found."},{"line_number":110,"context_line":"    :raises: IncompatibleInterface if driver is a hardware type and"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_3759958f","line":107,"updated":"2016-12-07 23:31:23.000000000","message":"I think of \u0027entry point name\u0027 as the name of the entry point, eg \u0027ironic.hardware.interfaces.boot\u0027. (Maybe it is just me.) I *think* you mean this to be the name of an interface under the entry point ironic.hardware.interface.\u003cinterface type\u003e... or something like that.","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    :param driver: a hardware type or classic driver instance."},{"line_number":106,"context_line":"    :param interface_type: type of the interface (e.g. \u0027boot\u0027)."},{"line_number":107,"context_line":"    :param interface_name: entry point name of the interface implementation."},{"line_number":108,"context_line":"    :returns: instance of the requested interface implementation."},{"line_number":109,"context_line":"    :raises: InterfaceNotFoundInEntrypoint if the entry point was not found."},{"line_number":110,"context_line":"    :raises: IncompatibleInterface if driver is a hardware type and"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_5d286133","line":107,"in_reply_to":"3a71b18c_3759958f","updated":"2016-12-12 12:01:20.000000000","message":"Done","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"cb0eb625d3bfb1dfa932eae47b7550f19052a759","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        # any combinations of interface implementations."},{"line_number":129,"context_line":"        return impl"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    impl_supported \u003d getattr(driver,"},{"line_number":132,"context_line":"                             \u0027supported_%s_interfaces\u0027 % interface_type)"},{"line_number":133,"context_line":"    if type(impl) not in impl_supported:"},{"line_number":134,"context_line":"        raise exception.IncompatibleInterface("}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_9a93df5a","line":131,"updated":"2016-12-12 11:33:53.000000000","message":"I\u0027d rename that to supported_impls - \u0027impl_supported\u0027 looks like a boolean value indicating that particular impl is supported","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        # any combinations of interface implementations."},{"line_number":129,"context_line":"        return impl"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    impl_supported \u003d getattr(driver,"},{"line_number":132,"context_line":"                             \u0027supported_%s_interfaces\u0027 % interface_type)"},{"line_number":133,"context_line":"    if type(impl) not in impl_supported:"},{"line_number":134,"context_line":"        raise exception.IncompatibleInterface("}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_9d1e790a","line":131,"in_reply_to":"3a71b18c_9a93df5a","updated":"2016-12-12 12:01:20.000000000","message":"Done","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                             \u0027supported_%s_interfaces\u0027 % interface_type)"},{"line_number":133,"context_line":"    if type(impl) not in impl_supported:"},{"line_number":134,"context_line":"        raise exception.IncompatibleInterface("},{"line_number":135,"context_line":"            interface_type\u003dinterface_type, interface_impl\u003dimpl,"},{"line_number":136,"context_line":"            hardware_type\u003ddriver.__class__.__name__)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    return impl"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_171c9976","line":135,"updated":"2016-12-07 23:31:23.000000000","message":"is impl the interface_name, or the class? Eg, in setup.cfg, we have \"fake \u003d ironic.drivers.modules.fake:FakeBoot\". Do we want to use \u0027fake\u0027 or \u0027ironic.drivers.modules.fake:FakeBoot\u0027?","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                             \u0027supported_%s_interfaces\u0027 % interface_type)"},{"line_number":133,"context_line":"    if type(impl) not in impl_supported:"},{"line_number":134,"context_line":"        raise exception.IncompatibleInterface("},{"line_number":135,"context_line":"            interface_type\u003dinterface_type, interface_impl\u003dimpl,"},{"line_number":136,"context_line":"            hardware_type\u003ddriver.__class__.__name__)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    return impl"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_fda12daa","line":135,"in_reply_to":"3a71b18c_171c9976","updated":"2016-12-12 12:01:20.000000000","message":"The form \u0027ironic.drivers.modules.fake:FakeBoot\u0027 is never used, here impl is an actual instance. Will rename to impl_instance.","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"cb0eb625d3bfb1dfa932eae47b7550f19052a759","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    return impl"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def _calculate_default(hardware_type, interface_type, factory):"},{"line_number":142,"context_line":"    \"\"\"Calculate the default interface implementation."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    Finds the first implementation that is supported by the hardware type"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_bad89b1f","line":141,"updated":"2016-12-12 11:33:53.000000000","message":"name of this method is not very meaningful. Considering the filename it should calculate default driver, maybe:\n_get_default_impl\nwould look better? (This function does not exactly look like it\u0027s calculating sth)","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    return impl"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def _calculate_default(hardware_type, interface_type, factory):"},{"line_number":142,"context_line":"    \"\"\"Calculate the default interface implementation."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    Finds the first implementation that is supported by the hardware type"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_7da43da5","line":141,"in_reply_to":"3a71b18c_bad89b1f","updated":"2016-12-12 12:01:20.000000000","message":"Done","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    :param hardware_type: hardware type instance."},{"line_number":148,"context_line":"    :param interface_type: type of the interface (e.g. \u0027boot\u0027)."},{"line_number":149,"context_line":"    :param factory: interface factory class to use for loading implementations."},{"line_number":150,"context_line":"    :returns: an entrypoint name of the calculated default implementation."},{"line_number":151,"context_line":"    :raises: InterfaceNotFoundInEntrypoint if the entry point was not found."},{"line_number":152,"context_line":"    \"\"\""},{"line_number":153,"context_line":"    supported \u003d getattr(hardware_type,"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_92ab57d6","line":150,"updated":"2016-12-07 23:31:23.000000000","message":"returns None if there isn\u0027t any.","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    :param hardware_type: hardware type instance."},{"line_number":148,"context_line":"    :param interface_type: type of the interface (e.g. \u0027boot\u0027)."},{"line_number":149,"context_line":"    :param factory: interface factory class to use for loading implementations."},{"line_number":150,"context_line":"    :returns: an entrypoint name of the calculated default implementation."},{"line_number":151,"context_line":"    :raises: InterfaceNotFoundInEntrypoint if the entry point was not found."},{"line_number":152,"context_line":"    \"\"\""},{"line_number":153,"context_line":"    supported \u003d getattr(hardware_type,"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_9da11997","line":150,"in_reply_to":"3a71b18c_92ab57d6","updated":"2016-12-12 12:01:20.000000000","message":"Done","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    supported \u003d getattr(hardware_type,"},{"line_number":154,"context_line":"                        \u0027supported_%s_interfaces\u0027 % interface_type)"},{"line_number":155,"context_line":"    # Mapping of classes to entry points"},{"line_number":156,"context_line":"    enabled \u003d {obj.__class__: name for (name, obj) in factory().items()}"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    # Order of the supported list matters"},{"line_number":159,"context_line":"    for impl_class in supported:"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_f2864b15","line":156,"updated":"2016-12-07 23:31:23.000000000","message":"i was wondering whether it might be useful to add a new method to factory, to get this mapping. Maybe if you need this somewhere else.","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    supported \u003d getattr(hardware_type,"},{"line_number":154,"context_line":"                        \u0027supported_%s_interfaces\u0027 % interface_type)"},{"line_number":155,"context_line":"    # Mapping of classes to entry points"},{"line_number":156,"context_line":"    enabled \u003d {obj.__class__: name for (name, obj) in factory().items()}"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    # Order of the supported list matters"},{"line_number":159,"context_line":"    for impl_class in supported:"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_3dfba57c","line":156,"in_reply_to":"3a71b18c_f2864b15","updated":"2016-12-12 12:01:20.000000000","message":"Was thinking about that. However, the mapping of classes to names is pretty specific, I could not imagine another use case for it...","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        (\u0027flat\u0027 if CONF.dhcp.dhcp_provider \u003d\u003d \u0027neutron\u0027 else \u0027noop\u0027)"},{"line_number":189,"context_line":"    }"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    if isinstance(driver_or_hw_type, hardware_types.AbstractHardwareType):"},{"line_number":192,"context_line":"        factories \u003d _INTERFACE_LOADERS"},{"line_number":193,"context_line":"    else:"},{"line_number":194,"context_line":"        # Only network interface is dynamic for classic drivers"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_32afe37e","line":191,"updated":"2016-12-07 23:31:23.000000000","message":"you can use \u0027is_hardware_type\u0027 from L182","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        (\u0027flat\u0027 if CONF.dhcp.dhcp_provider \u003d\u003d \u0027neutron\u0027 else \u0027noop\u0027)"},{"line_number":189,"context_line":"    }"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    if isinstance(driver_or_hw_type, hardware_types.AbstractHardwareType):"},{"line_number":192,"context_line":"        factories \u003d _INTERFACE_LOADERS"},{"line_number":193,"context_line":"    else:"},{"line_number":194,"context_line":"        # Only network interface is dynamic for classic drivers"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_bdefb5af","line":191,"in_reply_to":"3a71b18c_32afe37e","updated":"2016-12-12 12:01:20.000000000","message":"Done","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        if impl_name is None:"},{"line_number":226,"context_line":"            raise exception.NoValidDefaultForInterface("},{"line_number":227,"context_line":"                interface_type\u003diface, node\u003dnode.uuid, driver\u003dnode.driver)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        # Set the calculated default and set result to True"},{"line_number":230,"context_line":"        setattr(node, field_name, impl_name)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_f2ec8b94","line":227,"updated":"2016-12-07 23:31:23.000000000","message":"shouldn\u0027t driver be driver_or_hw_type? (Or maybe i am lost now.)","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        if impl_name is None:"},{"line_number":226,"context_line":"            raise exception.NoValidDefaultForInterface("},{"line_number":227,"context_line":"                interface_type\u003diface, node\u003dnode.uuid, driver\u003dnode.driver)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        # Set the calculated default and set result to True"},{"line_number":230,"context_line":"        setattr(node, field_name, impl_name)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_bd46d5bd","line":227,"in_reply_to":"3a71b18c_f2ec8b94","updated":"2016-12-12 12:01:20.000000000","message":"node.driver is a human-readable entry point name, so it\u0027s better to use it in error messages, I think","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                interface_type\u003diface, node\u003dnode.uuid, driver\u003dnode.driver)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        # Set the calculated default and set result to True"},{"line_number":230,"context_line":"        setattr(node, field_name, impl_name)"},{"line_number":231,"context_line":"        result \u003d True"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_12990720","line":230,"updated":"2016-12-07 23:31:23.000000000","message":"the node was modified, but it wasn\u0027t saved. Is that OK? (I don\u0027t see it being saved in this file, haven\u0027t looked further.)","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                interface_type\u003diface, node\u003dnode.uuid, driver\u003dnode.driver)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        # Set the calculated default and set result to True"},{"line_number":230,"context_line":"        setattr(node, field_name, impl_name)"},{"line_number":231,"context_line":"        result \u003d True"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_7d27dd11","line":230,"in_reply_to":"3a71b18c_12990720","updated":"2016-12-12 12:01:20.000000000","message":"Yes, because it\u0027s up for a caller side. When we call this function from node_create we don\u0027t want it to call node.save().","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":237,"context_line":"    \"\"\"Get driver or hardware type by its entry point name."},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    First, checks the hardware types namespace, then checks the classic"},{"line_number":240,"context_line":"    drivers namespace. The first found objects is returned."},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    :param name: entry point name."},{"line_number":243,"context_line":"    :returns: An instance of a hardware type or a classic driver."}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_32f28307","line":240,"updated":"2016-12-07 23:31:23.000000000","message":"s/found objects/object found/","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":237,"context_line":"    \"\"\"Get driver or hardware type by its entry point name."},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    First, checks the hardware types namespace, then checks the classic"},{"line_number":240,"context_line":"    drivers namespace. The first found objects is returned."},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    :param name: entry point name."},{"line_number":243,"context_line":"    :returns: An instance of a hardware type or a classic driver."}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_9d24b90d","line":240,"in_reply_to":"3a71b18c_32f28307","updated":"2016-12-12 12:01:20.000000000","message":"Done","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        raise exception.DriverNotFound(driver_name\u003dhardware_type)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"# TODO(dtantsur): rename to get_classic_driver"},{"line_number":266,"context_line":"def get_driver(driver_name):"},{"line_number":267,"context_line":"    \"\"\"Simple method to get a ref to an instance of a driver."},{"line_number":268,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_f2356ba8","line":265,"updated":"2016-12-07 23:31:23.000000000","message":"why don\u0027t you do this now? (Wondering when you are planning on doing it)","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        raise exception.DriverNotFound(driver_name\u003dhardware_type)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"# TODO(dtantsur): rename to get_classic_driver"},{"line_number":266,"context_line":"def get_driver(driver_name):"},{"line_number":267,"context_line":"    \"\"\"Simple method to get a ref to an instance of a driver."},{"line_number":268,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_7ddc3de4","line":265,"in_reply_to":"3a71b18c_f2356ba8","updated":"2016-12-12 12:01:20.000000000","message":"Just trying to reduce diff","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":436,"context_line":"}"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"# TODO(dtantsur): This factory is still used explicitly in many places"},{"line_number":440,"context_line":"NetworkInterfaceFactory \u003d _INTERFACE_LOADERS[\u0027network\u0027]"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_f22acb2e","line":439,"updated":"2016-12-07 23:31:23.000000000","message":"is the TODO to remove/replace it?","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":436,"context_line":"}"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"# TODO(dtantsur): This factory is still used explicitly in many places"},{"line_number":440,"context_line":"NetworkInterfaceFactory \u003d _INTERFACE_LOADERS[\u0027network\u0027]"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_9dd919f6","line":439,"in_reply_to":"3a71b18c_f22acb2e","updated":"2016-12-12 12:01:20.000000000","message":"Done","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e1a9dd940efa046e1395fcc363558e7d29b99f71","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    :param driver_name: The name of the classic driver or hardware type to use"},{"line_number":44,"context_line":"                        as a base, if different than task.node.driver."},{"line_number":45,"context_line":"    :returns: A driver object for the task."},{"line_number":46,"context_line":"    :raises: DriverNotFound if node.driver could not be found in either"},{"line_number":47,"context_line":"             \"ironic.drivers\" or \"ironic.hardware.types\" namespaces."},{"line_number":48,"context_line":"    :raises: InterfaceNotFoundInEntrypoint if some node interfaces are set"},{"line_number":49,"context_line":"             to invalid or unsupported values."}],"source_content_type":"text/x-python","patch_set":24,"id":"1a6eadb0_0de2e503","line":46,"updated":"2016-12-12 16:46:06.000000000","message":"NIC: I am still a fan of neither :)","commit_id":"c91b3473932c4f6c635a344e04099251350b866d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"9154eaa23c3661f7dd616c882d08fe2b180613a1","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    node \u003d task.node"},{"line_number":54,"context_line":"    driver_name \u003d driver_name or node.driver"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    driver_or_hw_type \u003d get_driver_or_hardware_type(driver_name)"},{"line_number":57,"context_line":"    check_and_update_node_interfaces(node, driver_or_hw_type\u003ddriver_or_hw_type)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    bare_driver \u003d driver_base.BareDriver()"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a6eadb0_82c16431","line":56,"updated":"2016-12-12 16:32:28.000000000","message":"I understand its difficult to retain backwards compatibility when you\u0027ve got two different types: \u0027old\u0027-style driver vs hardware type, but this feels like an anti-pattern to me.\n\nI don\u0027t fully understand the problem or patchset yet, but are drivers just a special case of hardware types? If so, can you create a function to do that conversion once so other functions will only have to worry about hardware types?\n\nIf you can refactor a bit to make this the case, I think the implementation would simplify greatly in many places.\n\nIf what I\u0027ve just said doesn\u0027t make sense, please feel free to ignore or correct me.","commit_id":"c91b3473932c4f6c635a344e04099251350b866d"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"c6f5cd77f6e51202a5e94bfce76462f924c345bb","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    node \u003d task.node"},{"line_number":54,"context_line":"    driver_name \u003d driver_name or node.driver"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    driver_or_hw_type \u003d get_driver_or_hardware_type(driver_name)"},{"line_number":57,"context_line":"    check_and_update_node_interfaces(node, driver_or_hw_type\u003ddriver_or_hw_type)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    bare_driver \u003d driver_base.BareDriver()"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a6eadb0_cf6fdc90","line":56,"in_reply_to":"1a6eadb0_34826553","updated":"2016-12-13 11:25:44.000000000","message":"IIUC hardware type is just a description of allowed interfaces in the BareDriver. No matter if you use classic drivers, or hardware types, the thing you get in the task manager is of type BareDriver. Only construction/validation process is different.","commit_id":"c91b3473932c4f6c635a344e04099251350b866d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6e657a36eed59438d5ce6b6314c8fa8fc618f823","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    node \u003d task.node"},{"line_number":54,"context_line":"    driver_name \u003d driver_name or node.driver"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    driver_or_hw_type \u003d get_driver_or_hardware_type(driver_name)"},{"line_number":57,"context_line":"    check_and_update_node_interfaces(node, driver_or_hw_type\u003ddriver_or_hw_type)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    bare_driver \u003d driver_base.BareDriver()"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a6eadb0_34826553","line":56,"in_reply_to":"1a6eadb0_82c16431","updated":"2016-12-13 10:56:13.000000000","message":"Both types of drivers look pretty similar, but exhibit different properties. The biggest difference is how _attach_interfaces_to_driver works. So, we already have similar objects - we just have to treat them differently.\n\nGood news is that all the complexity is encapsulated in this module - other parts of ironic will just use task.driver as previously :)","commit_id":"c91b3473932c4f6c635a344e04099251350b866d"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"e829c6cf6e772fd54fed131ac2e8a2f708b40d7e","unresolved":false,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    # Legacy network interface defaults"},{"line_number":189,"context_line":"    additional_defaults \u003d {"},{"line_number":190,"context_line":"        \u0027network\u0027: CONF.default_network_interface or"},{"line_number":191,"context_line":"        (\u0027flat\u0027 if CONF.dhcp.dhcp_provider \u003d\u003d \u0027neutron\u0027 else \u0027noop\u0027)"},{"line_number":192,"context_line":"    }"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6eadb0_eaf2c699","line":190,"range":{"start_line":190,"start_character":19,"end_line":190,"end_character":52},"updated":"2016-12-13 12:04:08.000000000","message":"This part is not needed anymore as it seems to me, you already have this logic in L218-220","commit_id":"ba2ca4c873d00aa4b8a0a1c18cb3a3bc5d13ad39"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"f71dad9c58455ed7971a58bfb6ceb6220dd34118","unresolved":false,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    # Legacy network interface defaults"},{"line_number":189,"context_line":"    additional_defaults \u003d {"},{"line_number":190,"context_line":"        \u0027network\u0027: CONF.default_network_interface or"},{"line_number":191,"context_line":"        (\u0027flat\u0027 if CONF.dhcp.dhcp_provider \u003d\u003d \u0027neutron\u0027 else \u0027noop\u0027)"},{"line_number":192,"context_line":"    }"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6eadb0_d22bf72e","line":190,"range":{"start_line":190,"start_character":19,"end_line":190,"end_character":52},"in_reply_to":"1a6eadb0_eaf2c699","updated":"2016-12-13 15:01:33.000000000","message":"Done","commit_id":"ba2ca4c873d00aa4b8a0a1c18cb3a3bc5d13ad39"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"528057d7cf58513f57ac49ca08c5d62469ff7625","unresolved":false,"context_lines":[{"line_number":169,"context_line":"def check_and_update_node_interfaces(node, driver_or_hw_type\u003dNone):"},{"line_number":170,"context_line":"    \"\"\"Ensure that node interfaces (e.g. for creation or updating) are valid."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    Updates interfaces with calculated defaults, if they are not provided."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    :param node: node object to check and potentially update"},{"line_number":175,"context_line":"    :param driver_or_hw_type: classic driver or hardware type instance; will"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_fdd35236","line":172,"updated":"2016-12-14 03:12:02.000000000","message":"I think we should mention s/Updates interfaces/Updates (but doesn\u0027t save) node interfaces/","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":169,"context_line":"def check_and_update_node_interfaces(node, driver_or_hw_type\u003dNone):"},{"line_number":170,"context_line":"    \"\"\"Ensure that node interfaces (e.g. for creation or updating) are valid."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    Updates interfaces with calculated defaults, if they are not provided."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    :param node: node object to check and potentially update"},{"line_number":175,"context_line":"    :param driver_or_hw_type: classic driver or hardware type instance; will"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_f49fc84d","line":172,"in_reply_to":"1a6eadb0_17f52b82","updated":"2016-12-14 14:55:07.000000000","message":"Done","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dc9f87e61b0eff83068e90a91f925dc2d82549be","unresolved":false,"context_lines":[{"line_number":169,"context_line":"def check_and_update_node_interfaces(node, driver_or_hw_type\u003dNone):"},{"line_number":170,"context_line":"    \"\"\"Ensure that node interfaces (e.g. for creation or updating) are valid."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    Updates interfaces with calculated defaults, if they are not provided."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    :param node: node object to check and potentially update"},{"line_number":175,"context_line":"    :param driver_or_hw_type: classic driver or hardware type instance; will"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_17f52b82","line":172,"in_reply_to":"1a6eadb0_fdd35236","updated":"2016-12-14 13:59:02.000000000","message":"Agreed, We should also stress that this is run at the time of adding/updating a node as well as when an instance of a driver is created for a task.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dc9f87e61b0eff83068e90a91f925dc2d82549be","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    Updates interfaces with calculated defaults, if they are not provided."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    :param node: node object to check and potentially update"},{"line_number":175,"context_line":"    :param driver_or_hw_type: classic driver or hardware type instance; will"},{"line_number":176,"context_line":"                              be detected from node.driver if missing"},{"line_number":177,"context_line":"    :returns: True if any changes were made to the node, otherwise False"},{"line_number":178,"context_line":"    :raises: InterfaceNotFoundInEntrypoint on validation failure"},{"line_number":179,"context_line":"    :raises: NoValidDefaultForInterface if the default value cannot be"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_3205d5bb","line":176,"range":{"start_line":175,"start_character":30,"end_line":176,"end_character":69},"updated":"2016-12-14 13:59:02.000000000","message":"nit: It might be useful to note if this is a string, boolean, etc, and what is actually normally expected here.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    Updates interfaces with calculated defaults, if they are not provided."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    :param node: node object to check and potentially update"},{"line_number":175,"context_line":"    :param driver_or_hw_type: classic driver or hardware type instance; will"},{"line_number":176,"context_line":"                              be detected from node.driver if missing"},{"line_number":177,"context_line":"    :returns: True if any changes were made to the node, otherwise False"},{"line_number":178,"context_line":"    :raises: InterfaceNotFoundInEntrypoint on validation failure"},{"line_number":179,"context_line":"    :raises: NoValidDefaultForInterface if the default value cannot be"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_f4c6e847","line":176,"range":{"start_line":175,"start_character":30,"end_line":176,"end_character":69},"in_reply_to":"1a6eadb0_3205d5bb","updated":"2016-12-14 14:55:07.000000000","message":"well, I\u0027ve put \"instance\" here, so I thought it\u0027s clear enough. Any suggestions?","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b2db5cd7fa258b67e6bc5150a710ef634c51c221","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    Updates interfaces with calculated defaults, if they are not provided."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    :param node: node object to check and potentially update"},{"line_number":175,"context_line":"    :param driver_or_hw_type: classic driver or hardware type instance; will"},{"line_number":176,"context_line":"                              be detected from node.driver if missing"},{"line_number":177,"context_line":"    :returns: True if any changes were made to the node, otherwise False"},{"line_number":178,"context_line":"    :raises: InterfaceNotFoundInEntrypoint on validation failure"},{"line_number":179,"context_line":"    :raises: NoValidDefaultForInterface if the default value cannot be"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_e58554ad","line":176,"range":{"start_line":175,"start_character":30,"end_line":176,"end_character":69},"in_reply_to":"1a6eadb0_e5c63448","updated":"2016-12-14 15:37:18.000000000","message":"Ok, will fix when I create another patch set","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"626ced588c074800d998ecc0f14ede893299bab9","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    Updates interfaces with calculated defaults, if they are not provided."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    :param node: node object to check and potentially update"},{"line_number":175,"context_line":"    :param driver_or_hw_type: classic driver or hardware type instance; will"},{"line_number":176,"context_line":"                              be detected from node.driver if missing"},{"line_number":177,"context_line":"    :returns: True if any changes were made to the node, otherwise False"},{"line_number":178,"context_line":"    :raises: InterfaceNotFoundInEntrypoint on validation failure"},{"line_number":179,"context_line":"    :raises: NoValidDefaultForInterface if the default value cannot be"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_e5c63448","line":176,"range":{"start_line":175,"start_character":30,"end_line":176,"end_character":69},"in_reply_to":"1a6eadb0_f4c6e847","updated":"2016-12-14 15:33:48.000000000","message":"When I read instance, I think machine.  Adding the word object would make it more clear. \"A classic driver or hardware type instance object\"","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dc9f87e61b0eff83068e90a91f925dc2d82549be","unresolved":false,"context_lines":[{"line_number":180,"context_line":"             calculated and is not provided in the configuration"},{"line_number":181,"context_line":"    :raises: DriverNotFound if the node\u0027s driver or hardware type is not found"},{"line_number":182,"context_line":"    \"\"\""},{"line_number":183,"context_line":"    if driver_or_hw_type is None:"},{"line_number":184,"context_line":"        driver_or_hw_type \u003d get_driver_or_hardware_type(node.driver)"},{"line_number":185,"context_line":"    is_hardware_type \u003d isinstance(driver_or_hw_type,"},{"line_number":186,"context_line":"                                  hardware_types.AbstractHardwareType)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_37314706","line":184,"range":{"start_line":183,"start_character":0,"end_line":184,"end_character":68},"updated":"2016-12-14 13:59:02.000000000","message":"nit: Why would we not to always determine if it is a driver or hardware type here?","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"626ced588c074800d998ecc0f14ede893299bab9","unresolved":false,"context_lines":[{"line_number":180,"context_line":"             calculated and is not provided in the configuration"},{"line_number":181,"context_line":"    :raises: DriverNotFound if the node\u0027s driver or hardware type is not found"},{"line_number":182,"context_line":"    \"\"\""},{"line_number":183,"context_line":"    if driver_or_hw_type is None:"},{"line_number":184,"context_line":"        driver_or_hw_type \u003d get_driver_or_hardware_type(node.driver)"},{"line_number":185,"context_line":"    is_hardware_type \u003d isinstance(driver_or_hw_type,"},{"line_number":186,"context_line":"                                  hardware_types.AbstractHardwareType)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_65ba24c2","line":184,"range":{"start_line":183,"start_character":0,"end_line":184,"end_character":68},"in_reply_to":"1a6eadb0_14dd240e","updated":"2016-12-14 15:33:48.000000000","message":"I\u0027m just confused why the object is being passed through, but if none we determine it here.  I wondering, shouldn\u0027t we always just determine it here?","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"4ad0708582e0310aca2d19a6e6d9076073a8da62","unresolved":false,"context_lines":[{"line_number":180,"context_line":"             calculated and is not provided in the configuration"},{"line_number":181,"context_line":"    :raises: DriverNotFound if the node\u0027s driver or hardware type is not found"},{"line_number":182,"context_line":"    \"\"\""},{"line_number":183,"context_line":"    if driver_or_hw_type is None:"},{"line_number":184,"context_line":"        driver_or_hw_type \u003d get_driver_or_hardware_type(node.driver)"},{"line_number":185,"context_line":"    is_hardware_type \u003d isinstance(driver_or_hw_type,"},{"line_number":186,"context_line":"                                  hardware_types.AbstractHardwareType)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_f1643ae6","line":184,"range":{"start_line":183,"start_character":0,"end_line":184,"end_character":68},"in_reply_to":"1a6eadb0_37314706","updated":"2016-12-14 14:41:15.000000000","message":"But it\u0027s not a boolean, it is an object.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":180,"context_line":"             calculated and is not provided in the configuration"},{"line_number":181,"context_line":"    :raises: DriverNotFound if the node\u0027s driver or hardware type is not found"},{"line_number":182,"context_line":"    \"\"\""},{"line_number":183,"context_line":"    if driver_or_hw_type is None:"},{"line_number":184,"context_line":"        driver_or_hw_type \u003d get_driver_or_hardware_type(node.driver)"},{"line_number":185,"context_line":"    is_hardware_type \u003d isinstance(driver_or_hw_type,"},{"line_number":186,"context_line":"                                  hardware_types.AbstractHardwareType)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_14dd240e","line":184,"range":{"start_line":183,"start_character":0,"end_line":184,"end_character":68},"in_reply_to":"1a6eadb0_37314706","updated":"2016-12-14 14:55:07.000000000","message":"Sorry, I don\u0027t quite get this comment. What exactly do you suggest?","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b2db5cd7fa258b67e6bc5150a710ef634c51c221","unresolved":false,"context_lines":[{"line_number":180,"context_line":"             calculated and is not provided in the configuration"},{"line_number":181,"context_line":"    :raises: DriverNotFound if the node\u0027s driver or hardware type is not found"},{"line_number":182,"context_line":"    \"\"\""},{"line_number":183,"context_line":"    if driver_or_hw_type is None:"},{"line_number":184,"context_line":"        driver_or_hw_type \u003d get_driver_or_hardware_type(node.driver)"},{"line_number":185,"context_line":"    is_hardware_type \u003d isinstance(driver_or_hw_type,"},{"line_number":186,"context_line":"                                  hardware_types.AbstractHardwareType)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_a5ba7c6c","line":184,"range":{"start_line":183,"start_character":0,"end_line":184,"end_character":68},"in_reply_to":"1a6eadb0_65ba24c2","updated":"2016-12-14 15:37:18.000000000","message":"This will move the same logic to node_create and node_update.. dunno if it\u0027s helpful","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"528057d7cf58513f57ac49ca08c5d62469ff7625","unresolved":false,"context_lines":[{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        if impl_name is None:"},{"line_number":228,"context_line":"            raise exception.NoValidDefaultForInterface("},{"line_number":229,"context_line":"                interface_type\u003diface, node\u003dnode.uuid, driver\u003dnode.driver)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # Set the calculated default and set result to True"},{"line_number":232,"context_line":"        setattr(node, field_name, impl_name)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_5d5c46ed","line":229,"updated":"2016-12-14 03:12:02.000000000","message":"so i asked this in patch set 21. driver_or_hw_type is not necessarily equivalent to node.driver, based on my understanding of code in L183-184.\n\nI don\u0027t know, but if eg this function is called when someone is changing the node\u0027s driver to a different driver/hw_type that was bad, node.driver here would be wrong.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        if impl_name is None:"},{"line_number":228,"context_line":"            raise exception.NoValidDefaultForInterface("},{"line_number":229,"context_line":"                interface_type\u003diface, node\u003dnode.uuid, driver\u003dnode.driver)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # Set the calculated default and set result to True"},{"line_number":232,"context_line":"        setattr(node, field_name, impl_name)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_547a3cf2","line":229,"in_reply_to":"1a6eadb0_520091aa","updated":"2016-12-14 14:55:07.000000000","message":"It may be wrong in some sense, but we\u0027re using it on line 184 to get the hardware type, so it will always match what we have in driver_or_hw_type. Of course, if driver_or_hw_type is provided and is wrong, this is a problem. I don\u0027t see how we solve it though. If we log driver_or_hardware_type, users will see a class name instead of the value they provided on a node.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"4ad0708582e0310aca2d19a6e6d9076073a8da62","unresolved":false,"context_lines":[{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        if impl_name is None:"},{"line_number":228,"context_line":"            raise exception.NoValidDefaultForInterface("},{"line_number":229,"context_line":"                interface_type\u003diface, node\u003dnode.uuid, driver\u003dnode.driver)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # Set the calculated default and set result to True"},{"line_number":232,"context_line":"        setattr(node, field_name, impl_name)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_d14c9e44","line":229,"in_reply_to":"1a6eadb0_520091aa","updated":"2016-12-14 14:41:15.000000000","message":"This, as any update to an object, should be happening under the lock iiuc. And in case of create, there is no node yet, so no way to update node.driver by another user/thread.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"065b4d703fd76e79773a320bc0d0b8bcbdc20307","unresolved":false,"context_lines":[{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        if impl_name is None:"},{"line_number":228,"context_line":"            raise exception.NoValidDefaultForInterface("},{"line_number":229,"context_line":"                interface_type\u003diface, node\u003dnode.uuid, driver\u003dnode.driver)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # Set the calculated default and set result to True"},{"line_number":232,"context_line":"        setattr(node, field_name, impl_name)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_9a0ddb92","line":229,"in_reply_to":"1a6eadb0_547a3cf2","updated":"2016-12-14 15:37:45.000000000","message":"I looked at how this method is being called. Unless you know of a future change that will call this with driver_or_hw_type being explicitly passed as a parameter, we should just get rid of that parameter. The only time this is called with it is in L57 above (build_driver_for_task(), and guess where it gets that value :))","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dc9f87e61b0eff83068e90a91f925dc2d82549be","unresolved":false,"context_lines":[{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        if impl_name is None:"},{"line_number":228,"context_line":"            raise exception.NoValidDefaultForInterface("},{"line_number":229,"context_line":"                interface_type\u003diface, node\u003dnode.uuid, driver\u003dnode.driver)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # Set the calculated default and set result to True"},{"line_number":232,"context_line":"        setattr(node, field_name, impl_name)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_520091aa","line":229,"in_reply_to":"1a6eadb0_5d5c46ed","updated":"2016-12-14 13:59:02.000000000","message":"node.driver could be wrong, but if they have submitted an incorrect object in the driver field, then this seems to be the right behavior.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e88b88c17ccb94a41a6ce3ddcf3b2eff7e015e37","unresolved":false,"context_lines":[{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        if impl_name is None:"},{"line_number":228,"context_line":"            raise exception.NoValidDefaultForInterface("},{"line_number":229,"context_line":"                interface_type\u003diface, node\u003dnode.uuid, driver\u003dnode.driver)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # Set the calculated default and set result to True"},{"line_number":232,"context_line":"        setattr(node, field_name, impl_name)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_ee1b6c19","line":229,"in_reply_to":"1a6eadb0_7021fb9e","updated":"2016-12-14 17:29:36.000000000","message":"Ah. ok, forget I asked. I suppose I could ask for a comment that driver_or_hw_type is assumed to come from node.driver, but ...","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e243dd51bb27932ba4670a341c4783a836b296aa","unresolved":false,"context_lines":[{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        if impl_name is None:"},{"line_number":228,"context_line":"            raise exception.NoValidDefaultForInterface("},{"line_number":229,"context_line":"                interface_type\u003diface, node\u003dnode.uuid, driver\u003dnode.driver)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # Set the calculated default and set result to True"},{"line_number":232,"context_line":"        setattr(node, field_name, impl_name)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_7021fb9e","line":229,"in_reply_to":"1a6eadb0_9a0ddb92","updated":"2016-12-14 17:26:04.000000000","message":"Yeah, though then we\u0027ll have to create driver_or_hw_type twice in build_driver_for_task. And pass driver_name here, because it can be passed to build_driver_for_task... I\u0027d leave it up for later refactoring tbh.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"}],"ironic/common/exception.py":[{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d071e1f289bff6de4b1f0d8bd10155d25dd1be7d","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"class DriverNotFoundInEntrypoint(DriverNotFound):"},{"line_number":250,"context_line":"    _msg_fmt \u003d _(\"Could not find the following driver(s) in \""},{"line_number":251,"context_line":"                 \"the \u0027%(entrypoint)s\u0027 entrypoint: %(driver_name)s.\")"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_2eee948b","line":250,"updated":"2016-12-01 21:37:07.000000000","message":"This change seems unrelated","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"58f69b34db92ff359360b1b7c3ce7c8bda67c979","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"class DriverNotFoundInEntrypoint(DriverNotFound):"},{"line_number":250,"context_line":"    _msg_fmt \u003d _(\"Could not find the following driver(s) in \""},{"line_number":251,"context_line":"                 \"the \u0027%(entrypoint)s\u0027 entrypoint: %(driver_name)s.\")"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_1c99f21f","line":250,"in_reply_to":"3a71b18c_2eee948b","updated":"2016-12-02 10:54:58.000000000","message":"Done","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"76dee97e60dc29ebadc9bb338f28681e59bf968a","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                 \"are %(valid)s.\")"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"class IncompatibleInterface(InvalidParameterValue):"},{"line_number":261,"context_line":"    _msg_fmt \u003d _(\"%(interface_type)s interface implementation \""},{"line_number":262,"context_line":"                 \"\u0027%(interface_impl)s is not supported by hardware type \""},{"line_number":263,"context_line":"                 \"%(hardware_type)s.\")"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_e9be56fe","line":260,"updated":"2016-12-01 21:43:41.000000000","message":"The _get_interface code seems to use it also for classic drivers (there\u0027s no check for HW type). Shouldn\u0027t this message include also the lack of driver support?","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"759f73f7079f86098737331d506e9600beed7e56","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                 \"are %(valid)s.\")"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"class IncompatibleInterface(InvalidParameterValue):"},{"line_number":261,"context_line":"    _msg_fmt \u003d _(\"%(interface_type)s interface implementation \""},{"line_number":262,"context_line":"                 \"\u0027%(interface_impl)s is not supported by hardware type \""},{"line_number":263,"context_line":"                 \"%(hardware_type)s.\")"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_4bb1d48e","line":260,"in_reply_to":"3a71b18c_1c673226","updated":"2016-12-02 15:47:01.000000000","message":"Ok, cool! :)","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"58f69b34db92ff359360b1b7c3ce7c8bda67c979","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                 \"are %(valid)s.\")"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"class IncompatibleInterface(InvalidParameterValue):"},{"line_number":261,"context_line":"    _msg_fmt \u003d _(\"%(interface_type)s interface implementation \""},{"line_number":262,"context_line":"                 \"\u0027%(interface_impl)s is not supported by hardware type \""},{"line_number":263,"context_line":"                 \"%(hardware_type)s.\")"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_1c673226","line":260,"in_reply_to":"3a71b18c_e9be56fe","updated":"2016-12-02 10:54:58.000000000","message":"This exception is not raised for classic drivers, as they don\u0027t have a notion of compatibility","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"class DriverNotFoundInEntrypoint(DriverNotFound):"},{"line_number":250,"context_line":"    _msg_fmt \u003d _(\"Could not find the following driver(s) in the \""},{"line_number":251,"context_line":"                 \"\u0027%(entrypoint)s\u0027 entrypoint: %(driver_name)s.\")"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_5096a93f","line":250,"range":{"start_line":250,"start_character":47,"end_line":250,"end_character":53},"updated":"2016-12-05 13:02:12.000000000","message":"Shouldn\u0027t this exception be changed too? \"driver(s), hardware type(s) or its interface(s)\" ?","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7e41940b975532ef59be57fa697ddf2871771b54","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"class DriverNotFoundInEntrypoint(DriverNotFound):"},{"line_number":250,"context_line":"    _msg_fmt \u003d _(\"Could not find the following driver(s) in the \""},{"line_number":251,"context_line":"                 \"\u0027%(entrypoint)s\u0027 entrypoint: %(driver_name)s.\")"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_3dad4888","line":250,"range":{"start_line":250,"start_character":47,"end_line":250,"end_character":53},"in_reply_to":"3a71b18c_5096a93f","updated":"2016-12-06 13:42:48.000000000","message":"Done","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":259,"context_line":""},{"line_number":260,"context_line":"class IncompatibleInterface(InvalidParameterValue):"},{"line_number":261,"context_line":"    _msg_fmt \u003d _(\"%(interface_type)s interface implementation \""},{"line_number":262,"context_line":"                 \"\u0027%(interface_impl)s is not supported by hardware type \""},{"line_number":263,"context_line":"                 \"%(hardware_type)s.\")"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_70a9e58f","line":262,"range":{"start_line":262,"start_character":18,"end_line":262,"end_character":37},"updated":"2016-12-05 13:02:12.000000000","message":"missing closing quotation","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7e41940b975532ef59be57fa697ddf2871771b54","unresolved":false,"context_lines":[{"line_number":259,"context_line":""},{"line_number":260,"context_line":"class IncompatibleInterface(InvalidParameterValue):"},{"line_number":261,"context_line":"    _msg_fmt \u003d _(\"%(interface_type)s interface implementation \""},{"line_number":262,"context_line":"                 \"\u0027%(interface_impl)s is not supported by hardware type \""},{"line_number":263,"context_line":"                 \"%(hardware_type)s.\")"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_fdfbd076","line":262,"range":{"start_line":262,"start_character":18,"end_line":262,"end_character":37},"in_reply_to":"3a71b18c_70a9e58f","updated":"2016-12-06 13:42:48.000000000","message":"Done","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":499,"context_line":""},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"class DriverLoadError(IronicException):"},{"line_number":502,"context_line":"    _msg_fmt \u003d _(\"Driver %(driver)s could not be loaded. Reason: %(reason)s.\")"},{"line_number":503,"context_line":""},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"class ConsoleError(IronicException):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_eaafc127","line":502,"updated":"2016-12-05 13:02:12.000000000","message":"Same here, should be changed?","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7e41940b975532ef59be57fa697ddf2871771b54","unresolved":false,"context_lines":[{"line_number":499,"context_line":""},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"class DriverLoadError(IronicException):"},{"line_number":502,"context_line":"    _msg_fmt \u003d _(\"Driver %(driver)s could not be loaded. Reason: %(reason)s.\")"},{"line_number":503,"context_line":""},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"class ConsoleError(IronicException):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_1d3ecc27","line":502,"in_reply_to":"3a71b18c_eaafc127","updated":"2016-12-06 13:42:48.000000000","message":"Done","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"class DriverNotFoundInEntrypoint(DriverNotFound):"},{"line_number":250,"context_line":"    _msg_fmt \u003d _(\"Could not find the following driver(s), hardware type(s) \""},{"line_number":251,"context_line":"                 \"or interface(s) in the \u0027%(entrypoint)s\u0027 entrypoint: \""},{"line_number":252,"context_line":"                 \"%(driver_name)s.\")"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_922197b7","line":251,"updated":"2016-12-07 23:31:23.000000000","message":"I think this is confusing. I have two suggestions:\n\n1. Change it to \u0027Could not find the following in the .. entry point:\u0027\n\nor\n\n2. Add some descriptor to BaseDriverFactory, eg _descriptor and set it to \u0027classic driver\u0027, \u0027hardware type\u0027, or \u0027interface\u0027. (I think it should be obvious from the entry point string but ...)","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"class DriverNotFoundInEntrypoint(DriverNotFound):"},{"line_number":250,"context_line":"    _msg_fmt \u003d _(\"Could not find the following driver(s), hardware type(s) \""},{"line_number":251,"context_line":"                 \"or interface(s) in the \u0027%(entrypoint)s\u0027 entrypoint: \""},{"line_number":252,"context_line":"                 \"%(driver_name)s.\")"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_5d6f81fb","line":251,"in_reply_to":"3a71b18c_922197b7","updated":"2016-12-12 12:01:20.000000000","message":"I like #2, but I suspect it may give headache to potential translators of these strings. So I\u0027ll go with #1.","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"e829c6cf6e772fd54fed131ac2e8a2f708b40d7e","unresolved":false,"context_lines":[{"line_number":301,"context_line":"                 \"reason: %(reason)s\")"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"class DriverNotFound(NotFound):"},{"line_number":305,"context_line":"    _msg_fmt \u003d _(\"Could not find the following driver(s) or hardware type(s): \""},{"line_number":306,"context_line":"                 \"%(driver_name)s.\")"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"class DriverNotFoundInEntrypoint(DriverNotFound):"},{"line_number":310,"context_line":"    _msg_fmt \u003d _(\"Could not find the following items in the \""},{"line_number":311,"context_line":"                 \"\u0027%(entrypoint)s\u0027 entrypoint: %(names)s.\")"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"class InterfaceNotFoundInEntrypoint(InvalidParameterValue):"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6eadb0_ea2f269f","line":311,"range":{"start_line":304,"start_character":0,"end_line":311,"end_character":59},"updated":"2016-12-13 12:04:08.000000000","message":"In case of these two exceptions and DriverLoadError, Driver is stevedore driver concept as I understand it, not ironic driver. Might be worth adding a TODO and renaming these exceptions, so that it becomes more clear for developers in future.","commit_id":"ba2ca4c873d00aa4b8a0a1c18cb3a3bc5d13ad39"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"f71dad9c58455ed7971a58bfb6ceb6220dd34118","unresolved":false,"context_lines":[{"line_number":301,"context_line":"                 \"reason: %(reason)s\")"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"class DriverNotFound(NotFound):"},{"line_number":305,"context_line":"    _msg_fmt \u003d _(\"Could not find the following driver(s) or hardware type(s): \""},{"line_number":306,"context_line":"                 \"%(driver_name)s.\")"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"class DriverNotFoundInEntrypoint(DriverNotFound):"},{"line_number":310,"context_line":"    _msg_fmt \u003d _(\"Could not find the following items in the \""},{"line_number":311,"context_line":"                 \"\u0027%(entrypoint)s\u0027 entrypoint: %(names)s.\")"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"class InterfaceNotFoundInEntrypoint(InvalidParameterValue):"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6eadb0_32c50b3c","line":311,"range":{"start_line":304,"start_character":0,"end_line":311,"end_character":59},"in_reply_to":"1a6eadb0_ea2f269f","updated":"2016-12-13 15:01:33.000000000","message":"Done","commit_id":"ba2ca4c873d00aa4b8a0a1c18cb3a3bc5d13ad39"}],"ironic/conductor/manager.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    @METRICS.timer(\u0027ConductorManager.create_node\u0027)"},{"line_number":94,"context_line":"    @messaging.expected_exceptions(exception.InvalidParameterValue,"},{"line_number":95,"context_line":"                                   exception.InterfaceNotFoundInEntrypoint,"},{"line_number":96,"context_line":"                                   exception.IncompatibleInterface,"},{"line_number":97,"context_line":"                                   exception.NoValidDefaultForInterface)"},{"line_number":98,"context_line":"    def create_node(self, context, node_obj):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_f04a4e25","line":95,"updated":"2016-12-05 13:02:12.000000000","message":"ditto","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    @METRICS.timer(\u0027ConductorManager.create_node\u0027)"},{"line_number":94,"context_line":"    @messaging.expected_exceptions(exception.InvalidParameterValue,"},{"line_number":95,"context_line":"                                   exception.InterfaceNotFoundInEntrypoint,"},{"line_number":96,"context_line":"                                   exception.IncompatibleInterface,"},{"line_number":97,"context_line":"                                   exception.NoValidDefaultForInterface)"},{"line_number":98,"context_line":"    def create_node(self, context, node_obj):"},{"line_number":99,"context_line":"        \"\"\"Create a node in database."},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_d0e9d2e7","line":97,"range":{"start_line":96,"start_character":35,"end_line":97,"end_character":71},"updated":"2016-12-05 13:02:12.000000000","message":"DriverNotFound possible here too, and both of those inherit from it, so should be OK to mention only DriverNotFound","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7e41940b975532ef59be57fa697ddf2871771b54","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    @METRICS.timer(\u0027ConductorManager.create_node\u0027)"},{"line_number":94,"context_line":"    @messaging.expected_exceptions(exception.InvalidParameterValue,"},{"line_number":95,"context_line":"                                   exception.InterfaceNotFoundInEntrypoint,"},{"line_number":96,"context_line":"                                   exception.IncompatibleInterface,"},{"line_number":97,"context_line":"                                   exception.NoValidDefaultForInterface)"},{"line_number":98,"context_line":"    def create_node(self, context, node_obj):"},{"line_number":99,"context_line":"        \"\"\"Create a node in database."},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_bd8238c6","line":97,"range":{"start_line":96,"start_character":35,"end_line":97,"end_character":71},"in_reply_to":"3a71b18c_d0e9d2e7","updated":"2016-12-06 13:42:48.000000000","message":"I\u0027d prefer to be explicit. Will add DriverNotFound.","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    @messaging.expected_exceptions(exception.InvalidParameterValue,"},{"line_number":115,"context_line":"                                   exception.NodeLocked,"},{"line_number":116,"context_line":"                                   exception.InvalidState,"},{"line_number":117,"context_line":"                                   exception.InterfaceNotFoundInEntrypoint,"},{"line_number":118,"context_line":"                                   exception.IncompatibleInterface,"},{"line_number":119,"context_line":"                                   exception.NoValidDefaultForInterface)"},{"line_number":120,"context_line":"    def update_node(self, context, node_obj):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_70f0fefe","line":117,"updated":"2016-12-05 13:02:12.000000000","message":"This is inherited from InvalidParameterValue, no need to specify it.","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7e41940b975532ef59be57fa697ddf2871771b54","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    @messaging.expected_exceptions(exception.InvalidParameterValue,"},{"line_number":115,"context_line":"                                   exception.NodeLocked,"},{"line_number":116,"context_line":"                                   exception.InvalidState,"},{"line_number":117,"context_line":"                                   exception.InterfaceNotFoundInEntrypoint,"},{"line_number":118,"context_line":"                                   exception.IncompatibleInterface,"},{"line_number":119,"context_line":"                                   exception.NoValidDefaultForInterface)"},{"line_number":120,"context_line":"    def update_node(self, context, node_obj):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_fd70300d","line":117,"in_reply_to":"3a71b18c_70f0fefe","updated":"2016-12-06 13:42:48.000000000","message":"ditto","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                                   exception.NodeLocked,"},{"line_number":116,"context_line":"                                   exception.InvalidState,"},{"line_number":117,"context_line":"                                   exception.InterfaceNotFoundInEntrypoint,"},{"line_number":118,"context_line":"                                   exception.IncompatibleInterface,"},{"line_number":119,"context_line":"                                   exception.NoValidDefaultForInterface)"},{"line_number":120,"context_line":"    def update_node(self, context, node_obj):"},{"line_number":121,"context_line":"        \"\"\"Update a node with the supplied data."},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_30eda6ef","line":119,"range":{"start_line":118,"start_character":35,"end_line":119,"end_character":71},"updated":"2016-12-05 13:02:12.000000000","message":"ditto","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"528057d7cf58513f57ac49ca08c5d62469ff7625","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        :returns: created node object."},{"line_number":105,"context_line":"        :raises: InterfaceNotFoundInEntrypoint if validation fails for any"},{"line_number":106,"context_line":"                 dynamic interfaces (e.g. network_interface)."},{"line_number":107,"context_line":"        :raises: IncompatibleInterface if some of the requested interfaces are"},{"line_number":108,"context_line":"                 not compatible with the hardware type."},{"line_number":109,"context_line":"        :raises: NoValidDefaultForInterface if no default can be calculated"},{"line_number":110,"context_line":"                 for some interfaces, and explicit values must be provided."}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_98142c45","line":107,"updated":"2016-12-14 03:12:02.000000000","message":"maybe s/some/one or more/","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dc9f87e61b0eff83068e90a91f925dc2d82549be","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        :returns: created node object."},{"line_number":105,"context_line":"        :raises: InterfaceNotFoundInEntrypoint if validation fails for any"},{"line_number":106,"context_line":"                 dynamic interfaces (e.g. network_interface)."},{"line_number":107,"context_line":"        :raises: IncompatibleInterface if some of the requested interfaces are"},{"line_number":108,"context_line":"                 not compatible with the hardware type."},{"line_number":109,"context_line":"        :raises: NoValidDefaultForInterface if no default can be calculated"},{"line_number":110,"context_line":"                 for some interfaces, and explicit values must be provided."}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_d2b4a1d2","line":107,"in_reply_to":"1a6eadb0_98142c45","updated":"2016-12-14 13:59:02.000000000","message":"++","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        :returns: created node object."},{"line_number":105,"context_line":"        :raises: InterfaceNotFoundInEntrypoint if validation fails for any"},{"line_number":106,"context_line":"                 dynamic interfaces (e.g. network_interface)."},{"line_number":107,"context_line":"        :raises: IncompatibleInterface if some of the requested interfaces are"},{"line_number":108,"context_line":"                 not compatible with the hardware type."},{"line_number":109,"context_line":"        :raises: NoValidDefaultForInterface if no default can be calculated"},{"line_number":110,"context_line":"                 for some interfaces, and explicit values must be provided."}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_945bf486","line":107,"in_reply_to":"1a6eadb0_d2b4a1d2","updated":"2016-12-14 14:55:07.000000000","message":"Done","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"528057d7cf58513f57ac49ca08c5d62469ff7625","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        if \u0027maintenance\u0027 in delta and not node_obj.maintenance:"},{"line_number":146,"context_line":"            node_obj.maintenance_reason \u003d None"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if \u0027network_interface\u0027 in delta:"},{"line_number":149,"context_line":"            allowed_update_states \u003d [states.ENROLL, states.INSPECTING,"},{"line_number":150,"context_line":"                                     states.MANAGEABLE]"},{"line_number":151,"context_line":"            if not (node_obj.provision_state in allowed_update_states or"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_b86e4894","line":148,"updated":"2016-12-14 03:12:02.000000000","message":"should we restrict changing other interfaces too? what about the driver/hw type?","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"4ad0708582e0310aca2d19a6e6d9076073a8da62","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        if \u0027maintenance\u0027 in delta and not node_obj.maintenance:"},{"line_number":146,"context_line":"            node_obj.maintenance_reason \u003d None"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if \u0027network_interface\u0027 in delta:"},{"line_number":149,"context_line":"            allowed_update_states \u003d [states.ENROLL, states.INSPECTING,"},{"line_number":150,"context_line":"                                     states.MANAGEABLE]"},{"line_number":151,"context_line":"            if not (node_obj.provision_state in allowed_update_states or"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_f43d08bc","line":148,"in_reply_to":"1a6eadb0_52e251a0","updated":"2016-12-14 14:41:15.000000000","message":"I think we should forbid changing interfaces that can change the clean up behaviour. Like if we change deploy interface when the node is active, tear down may not clean up some stuff properly. But that is something that should be agrred upon on itself, I think this was mentioned in the spec, or at least in some of the comments to it :)","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        if \u0027maintenance\u0027 in delta and not node_obj.maintenance:"},{"line_number":146,"context_line":"            node_obj.maintenance_reason \u003d None"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if \u0027network_interface\u0027 in delta:"},{"line_number":149,"context_line":"            allowed_update_states \u003d [states.ENROLL, states.INSPECTING,"},{"line_number":150,"context_line":"                                     states.MANAGEABLE]"},{"line_number":151,"context_line":"            if not (node_obj.provision_state in allowed_update_states or"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_f48508ad","line":148,"in_reply_to":"1a6eadb0_52e251a0","updated":"2016-12-14 14:55:07.000000000","message":"Well, it\u0027s interesting.. I can easily see people changing e.g. power_interface on an ACTIVE node. As relaxing restrictions is easier, I guess I\u0027ll implement the check here for now.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dc9f87e61b0eff83068e90a91f925dc2d82549be","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        if \u0027maintenance\u0027 in delta and not node_obj.maintenance:"},{"line_number":146,"context_line":"            node_obj.maintenance_reason \u003d None"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if \u0027network_interface\u0027 in delta:"},{"line_number":149,"context_line":"            allowed_update_states \u003d [states.ENROLL, states.INSPECTING,"},{"line_number":150,"context_line":"                                     states.MANAGEABLE]"},{"line_number":151,"context_line":"            if not (node_obj.provision_state in allowed_update_states or"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_52e251a0","line":148,"in_reply_to":"1a6eadb0_b86e4894","updated":"2016-12-14 13:59:02.000000000","message":"I think this is more of a situational thing per interface combined with the workflow we enforce.  Although at the same time, I can\u0027t help but wonder if that will make the experience more frustrating for operators...","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"626ced588c074800d998ecc0f14ede893299bab9","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        if \u0027maintenance\u0027 in delta and not node_obj.maintenance:"},{"line_number":146,"context_line":"            node_obj.maintenance_reason \u003d None"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if \u0027network_interface\u0027 in delta:"},{"line_number":149,"context_line":"            allowed_update_states \u003d [states.ENROLL, states.INSPECTING,"},{"line_number":150,"context_line":"                                     states.MANAGEABLE]"},{"line_number":151,"context_line":"            if not (node_obj.provision_state in allowed_update_states or"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_45bb68e5","line":148,"in_reply_to":"1a6eadb0_f48508ad","updated":"2016-12-14 15:33:48.000000000","message":"I think prohibiting changes in the interface makes sense if it is something that manages how the instance lives.  Networks, Storage, maybe even the actual deployment process (not that it really matters now), but power seems like something that an operator is going to know what they are doing if they change, and changing the power interface shouldn\u0027t impact a running instance.  The boot interface on the other hand, might.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"}],"ironic/conf/default.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":30,"context_line":"_ENABLED_IFACE_HELP \u003d _(\u0027Specify the list of {0} interfaces to load during \u0027"},{"line_number":31,"context_line":"                        \u0027service initialization. Missing {0} interfaces, \u0027"},{"line_number":32,"context_line":"                        \u0027or {0} interfaces which fail to initialize, will \u0027"},{"line_number":33,"context_line":"                        \u0027prevent the conductor service from starting. The \u0027"},{"line_number":34,"context_line":"                        \u0027option default is a recommended set of \u0027"},{"line_number":35,"context_line":"                        \u0027production-oriented {0} interfaces. A complete \u0027"},{"line_number":36,"context_line":"                        \u0027list of {0} interfaces present on your system may \u0027"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_b8ae75e5","line":33,"updated":"2016-12-07 23:31:23.000000000","message":"s/conductor/ironic-conductor/\n\n(to be consistent with L42)","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9d32c1b1cb947bbced223a7dfb1cc4972534afc","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                        \u0027service initialization. Missing {0} interfaces, \u0027"},{"line_number":32,"context_line":"                        \u0027or {0} interfaces which fail to initialize, will \u0027"},{"line_number":33,"context_line":"                        \u0027prevent the conductor service from starting. The \u0027"},{"line_number":34,"context_line":"                        \u0027option default is a recommended set of \u0027"},{"line_number":35,"context_line":"                        \u0027production-oriented {0} interfaces. A complete \u0027"},{"line_number":36,"context_line":"                        \u0027list of {0} interfaces present on your system may \u0027"},{"line_number":37,"context_line":"                        \u0027be found by enumerating the \u0027"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_985b792e","line":34,"updated":"2016-12-07 23:31:23.000000000","message":"how about s/option default/default value/\n\nor just \u0027default\u0027\n\nAlso, since it is a list, s/set of/list of/","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"11ebd2e6df15e5fbe1b789af43212c6a14e40fb2","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                        \u0027service initialization. Missing {0} interfaces, \u0027"},{"line_number":32,"context_line":"                        \u0027or {0} interfaces which fail to initialize, will \u0027"},{"line_number":33,"context_line":"                        \u0027prevent the conductor service from starting. The \u0027"},{"line_number":34,"context_line":"                        \u0027option default is a recommended set of \u0027"},{"line_number":35,"context_line":"                        \u0027production-oriented {0} interfaces. A complete \u0027"},{"line_number":36,"context_line":"                        \u0027list of {0} interfaces present on your system may \u0027"},{"line_number":37,"context_line":"                        \u0027be found by enumerating the \u0027"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a71b18c_202c5c98","line":34,"in_reply_to":"3a71b18c_985b792e","updated":"2016-12-12 12:01:20.000000000","message":"This wording was already there, I just copied it. Also I have slight feeling that \"set\", while technically less correct, is more human-friendly. Of course, I may be wrong.","commit_id":"2415940d706e43d7105c4002f13939b74a7d0b89"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dc9f87e61b0eff83068e90a91f925dc2d82549be","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                        \u0027or {0} interfaces which fail to initialize, will \u0027"},{"line_number":33,"context_line":"                        \u0027prevent the ironic-conductor service from starting. \u0027"},{"line_number":34,"context_line":"                        \u0027The default value is a recommended set of \u0027"},{"line_number":35,"context_line":"                        \u0027production-oriented {0} interfaces. A complete \u0027"},{"line_number":36,"context_line":"                        \u0027list of {0} interfaces present on your system may \u0027"},{"line_number":37,"context_line":"                        \u0027be found by enumerating the \u0027"},{"line_number":38,"context_line":"                        \u0027\"ironic.hardware.interfaces.{0}\" entrypoint. \u0027"},{"line_number":39,"context_line":"                        \u0027When setting this value, please make sure that \u0027"},{"line_number":40,"context_line":"                        \u0027every enabled hardware type will have the same \u0027"},{"line_number":41,"context_line":"                        \u0027set of enabled {0} interfaces on every \u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_f7fa6fbc","line":38,"range":{"start_line":35,"start_character":61,"end_line":38,"end_character":70},"updated":"2016-12-14 13:59:02.000000000","message":"nit: This feels unfriendly for an operator who is not an ironic developer.  I know we did it for network_interface, and we should feel bad for that. :)  Would it be possible for us to provide them a list, indicating that not all interfaces may be possible depending on packages/software dependencies installed on the system.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                        \u0027or {0} interfaces which fail to initialize, will \u0027"},{"line_number":33,"context_line":"                        \u0027prevent the ironic-conductor service from starting. \u0027"},{"line_number":34,"context_line":"                        \u0027The default value is a recommended set of \u0027"},{"line_number":35,"context_line":"                        \u0027production-oriented {0} interfaces. A complete \u0027"},{"line_number":36,"context_line":"                        \u0027list of {0} interfaces present on your system may \u0027"},{"line_number":37,"context_line":"                        \u0027be found by enumerating the \u0027"},{"line_number":38,"context_line":"                        \u0027\"ironic.hardware.interfaces.{0}\" entrypoint. \u0027"},{"line_number":39,"context_line":"                        \u0027When setting this value, please make sure that \u0027"},{"line_number":40,"context_line":"                        \u0027every enabled hardware type will have the same \u0027"},{"line_number":41,"context_line":"                        \u0027set of enabled {0} interfaces on every \u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_579cfebf","line":38,"range":{"start_line":35,"start_character":61,"end_line":38,"end_character":70},"in_reply_to":"1a6eadb0_f7fa6fbc","updated":"2016-12-14 14:55:07.000000000","message":"Let\u0027s do it as a follow up :) Mind filing a bug about it?","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dc9f87e61b0eff83068e90a91f925dc2d82549be","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                       \u0027A complete list of hardware types present on your \u0027"},{"line_number":91,"context_line":"                       \u0027system may be found by enumerating the \u0027"},{"line_number":92,"context_line":"                       \u0027\"ironic.hardware.types\" entrypoint.\u0027)),"},{"line_number":93,"context_line":"    # TODO(dtantsur): populate with production-ready values"},{"line_number":94,"context_line":"    cfg.ListOpt(\u0027enabled_boot_interfaces\u0027,"},{"line_number":95,"context_line":"                default\u003d[],"},{"line_number":96,"context_line":"                help\u003d_ENABLED_IFACE_HELP.format(\u0027boot\u0027)),"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_d72ad32b","line":93,"range":{"start_line":93,"start_character":3,"end_line":93,"end_character":59},"updated":"2016-12-14 13:59:02.000000000","message":"I guess disregard my nit above as long as we do this.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                       \u0027A complete list of hardware types present on your \u0027"},{"line_number":91,"context_line":"                       \u0027system may be found by enumerating the \u0027"},{"line_number":92,"context_line":"                       \u0027\"ironic.hardware.types\" entrypoint.\u0027)),"},{"line_number":93,"context_line":"    # TODO(dtantsur): populate with production-ready values"},{"line_number":94,"context_line":"    cfg.ListOpt(\u0027enabled_boot_interfaces\u0027,"},{"line_number":95,"context_line":"                default\u003d[],"},{"line_number":96,"context_line":"                help\u003d_ENABLED_IFACE_HELP.format(\u0027boot\u0027)),"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_b780f247","line":93,"range":{"start_line":93,"start_character":3,"end_line":93,"end_character":59},"in_reply_to":"1a6eadb0_d72ad32b","updated":"2016-12-14 14:55:07.000000000","message":"Done","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"}],"ironic/drivers/base.py":[{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"91b2e549096c605be7028ed2dff1630fad801068","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"OPTIONAL_INTERFACES \u003d set(BareDriver().standard_interfaces) - {\u0027management\u0027,"},{"line_number":181,"context_line":"                                                               \u0027boot\u0027}"},{"line_number":182,"context_line":"\"\"\"Constant holding interfaces considered optional.\"\"\""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_8735b4dc","line":182,"updated":"2016-11-22 11:32:56.000000000","message":"So only management and boot are not optional?","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"410d5ee03df80293bee0558b604f334fd5d30e56","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"OPTIONAL_INTERFACES \u003d set(BareDriver().standard_interfaces) - {\u0027management\u0027,"},{"line_number":181,"context_line":"                                                               \u0027boot\u0027}"},{"line_number":182,"context_line":"\"\"\"Constant holding interfaces considered optional.\"\"\""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_c7532c38","line":182,"in_reply_to":"7a77a97e_07e0c4cb","updated":"2016-11-22 11:44:32.000000000","message":"ah yeah, for some reason my brain thought standard_interfaces was a superset of core_interfaces","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"59859b51870194f86e893baf5f21b00c0adb6d7c","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"OPTIONAL_INTERFACES \u003d set(BareDriver().standard_interfaces) - {\u0027management\u0027,"},{"line_number":181,"context_line":"                                                               \u0027boot\u0027}"},{"line_number":182,"context_line":"\"\"\"Constant holding interfaces considered optional.\"\"\""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_07e0c4cb","line":182,"in_reply_to":"7a77a97e_8735b4dc","updated":"2016-11-22 11:38:04.000000000","message":"Note \"standard_interfaces\" !\u003d \"core_interfaces\". This is a strange consequence of our drivers evolution: \"boot\" and \"management\" are essentially mandatory, but are not in \"core_interfaces\"","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d071e1f289bff6de4b1f0d8bd10155d25dd1be7d","unresolved":false,"context_lines":[{"line_number":177,"context_line":"Includes interfaces not exposed via BaseDriver.all_interfaces."},{"line_number":178,"context_line":"\"\"\""},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"OPTIONAL_INTERFACES \u003d set(BareDriver().standard_interfaces) - {\u0027management\u0027,"},{"line_number":181,"context_line":"                                                               \u0027boot\u0027}"},{"line_number":182,"context_line":"\"\"\"Constant holding interfaces considered optional.\"\"\""},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_0ea8f81e","line":180,"updated":"2016-12-01 21:37:07.000000000","message":"Aren\u0027t there other interfaces, like \"inspect\", that are optional? Why is a boot interface optional? This should just match with hardware_types.py comments, I think.","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"58f69b34db92ff359360b1b7c3ce7c8bda67c979","unresolved":false,"context_lines":[{"line_number":177,"context_line":"Includes interfaces not exposed via BaseDriver.all_interfaces."},{"line_number":178,"context_line":"\"\"\""},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"OPTIONAL_INTERFACES \u003d set(BareDriver().standard_interfaces) - {\u0027management\u0027,"},{"line_number":181,"context_line":"                                                               \u0027boot\u0027}"},{"line_number":182,"context_line":"\"\"\"Constant holding interfaces considered optional.\"\"\""},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_5c160a56","line":180,"in_reply_to":"3a71b18c_0ea8f81e","updated":"2016-12-02 10:54:58.000000000","message":"Please read this carefully :) What is written here is: all standard interfaces are optional, except for management and boot, not the other way around. However, I\u0027ve just realized that this constant is only used in tests, so I\u0027ll move it there.","commit_id":"904cb797dc49770612820f853e87ee0ff1d75bbe"}],"ironic/drivers/hardware_types.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"aa6e73288fb2bdae64e4c56f1a7d1d9af12662cb","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        return [noop.NoopNetwork]"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"class HardwareTypeLoader(object):"},{"line_number":94,"context_line":"    \"\"\"Class handling loading of hardware types.\"\"\""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a629dbe_7fc1b553","line":93,"updated":"2016-11-09 22:48:25.000000000","message":"I feel like this class should probably be in driver_factory.py as well.","commit_id":"e23b235989c0d507d478c4aaf746eb9605cebb7c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0fcb27d62e3631b680cd6b851cecf1900a2e4aad","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @abc.abstractproperty"},{"line_number":47,"context_line":"    def supported_boot_interfaces(self):"},{"line_number":48,"context_line":"        \"\"\"List of supported boot interfaces.\"\"\""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    @abc.abstractproperty"},{"line_number":51,"context_line":"    def supported_deploy_interfaces(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_519fce4f","line":48,"range":{"start_line":48,"start_character":34,"end_line":48,"end_character":44},"updated":"2016-11-24 11:57:58.000000000","message":"s/interfaces/interface types/ here and below","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    each driver interface (power, deploy, etc)."},{"line_number":39,"context_line":"    \"\"\""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    supported \u003d True"},{"line_number":42,"context_line":"    \"\"\"Whether hardware is supported by the community.\"\"\""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    # Required hardware interfaces"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_70e565da","line":41,"range":{"start_line":41,"start_character":16,"end_line":41,"end_character":20},"updated":"2016-12-05 13:02:12.000000000","message":"I\u0027d make it false by default for greater visibility if anyone misses it.","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7e41940b975532ef59be57fa697ddf2871771b54","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    each driver interface (power, deploy, etc)."},{"line_number":39,"context_line":"    \"\"\""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    supported \u003d True"},{"line_number":42,"context_line":"    \"\"\"Whether hardware is supported by the community.\"\"\""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    # Required hardware interfaces"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_dda1b447","line":41,"range":{"start_line":41,"start_character":16,"end_line":41,"end_character":20},"in_reply_to":"3a71b18c_70e565da","updated":"2016-12-06 13:42:48.000000000","message":"this is not compatible with how we treat drivers, why would we do it?","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    supported \u003d True"},{"line_number":42,"context_line":"    \"\"\"Whether hardware is supported by the community.\"\"\""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    # Required hardware interfaces"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @abc.abstractproperty"},{"line_number":47,"context_line":"    def supported_boot_interfaces(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_7033a562","line":44,"updated":"2016-12-05 13:02:12.000000000","message":"As of now, only deploy and power are obligatory. This change is not mentioned in the spec.","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7e41940b975532ef59be57fa697ddf2871771b54","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    supported \u003d True"},{"line_number":42,"context_line":"    \"\"\"Whether hardware is supported by the community.\"\"\""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    # Required hardware interfaces"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @abc.abstractproperty"},{"line_number":47,"context_line":"    def supported_boot_interfaces(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_5d8e84d0","line":44,"in_reply_to":"3a71b18c_7033a562","updated":"2016-12-06 13:42:48.000000000","message":"Maybe, but this seems the right thing to do. Also we don\u0027t have a technical notion of \"required\" interfaces, this is just for reader\u0027s convenience.","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"528057d7cf58513f57ac49ca08c5d62469ff7625","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @abc.abstractproperty"},{"line_number":47,"context_line":"    def supported_boot_interfaces(self):"},{"line_number":48,"context_line":"        \"\"\"List of supported boot interfaces.\"\"\""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    @abc.abstractproperty"},{"line_number":51,"context_line":"    def supported_deploy_interfaces(self):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_b8e3a804","line":48,"updated":"2016-12-14 03:12:02.000000000","message":"maybe a dumb question. are these the names in setup.cfg, or the class names?","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @abc.abstractproperty"},{"line_number":47,"context_line":"    def supported_boot_interfaces(self):"},{"line_number":48,"context_line":"        \"\"\"List of supported boot interfaces.\"\"\""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    @abc.abstractproperty"},{"line_number":51,"context_line":"    def supported_deploy_interfaces(self):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_77d49a46","line":48,"in_reply_to":"1a6eadb0_741658a8","updated":"2016-12-14 14:55:07.000000000","message":"Done","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"4ad0708582e0310aca2d19a6e6d9076073a8da62","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @abc.abstractproperty"},{"line_number":47,"context_line":"    def supported_boot_interfaces(self):"},{"line_number":48,"context_line":"        \"\"\"List of supported boot interfaces.\"\"\""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    @abc.abstractproperty"},{"line_number":51,"context_line":"    def supported_deploy_interfaces(self):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_741658a8","line":48,"in_reply_to":"1a6eadb0_92c069e2","updated":"2016-12-14 14:41:15.000000000","message":"In here they would be actual classes, like:\n\n return [ironic.drivers.modules.pxe.PXEBoot]\n\nand in setup.cfg they will be associated with an entrypoint, like pxe \u003d ... which will be used in config file for enabling the interface.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dc9f87e61b0eff83068e90a91f925dc2d82549be","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @abc.abstractproperty"},{"line_number":47,"context_line":"    def supported_boot_interfaces(self):"},{"line_number":48,"context_line":"        \"\"\"List of supported boot interfaces.\"\"\""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    @abc.abstractproperty"},{"line_number":51,"context_line":"    def supported_deploy_interfaces(self):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_92c069e2","line":48,"in_reply_to":"1a6eadb0_b8e3a804","updated":"2016-12-14 13:59:02.000000000","message":"AIUI, they would be interfaces in setup.cfg that are known compatible by the hardware time.  tl;dr they would be defined in both places.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"528057d7cf58513f57ac49ca08c5d62469ff7625","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        \"\"\"List of supported deploy interfaces.\"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @abc.abstractproperty"},{"line_number":55,"context_line":"    def supported_management_interfaces(self):"},{"line_number":56,"context_line":"        \"\"\"List of supported management interfaces.\"\"\""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    @abc.abstractproperty"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_f8e1a09b","line":55,"updated":"2016-12-14 03:12:02.000000000","message":"we have management as a standard interface in classic drivers. although it seems to make sense as a required/core one. (Just want to verify.)\n\nOh, similar thing for boot interface, although i always wanted to make that a core one :)","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        \"\"\"List of supported deploy interfaces.\"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @abc.abstractproperty"},{"line_number":55,"context_line":"    def supported_management_interfaces(self):"},{"line_number":56,"context_line":"        \"\"\"List of supported management interfaces.\"\"\""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    @abc.abstractproperty"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_9742160f","line":55,"in_reply_to":"1a6eadb0_f8e1a09b","updated":"2016-12-14 14:55:07.000000000","message":"It\u0027s standard now only because we introduced it (and boot) later and didn\u0027t want to break out-of-tree drivers.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"528057d7cf58513f57ac49ca08c5d62469ff7625","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"# NOTE(dtantsur): this class lives here and not in ironic.drivers.fake to avoid"},{"line_number":91,"context_line":"# pulling in nearly all driver modules."},{"line_number":92,"context_line":"class FakeHardware(AbstractHardwareType):"},{"line_number":93,"context_line":"    \"\"\"Fake hardware type."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    This hardware type is special-cased in the driver factory to bypass"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_a1637019","line":92,"updated":"2016-12-14 03:12:02.000000000","message":"what about in a new file eg \u0027fake_hardware\u0027, or hardware_fake.\n\nWhere do you think new hardware types will be added? Not in this file?","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dc9f87e61b0eff83068e90a91f925dc2d82549be","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"# NOTE(dtantsur): this class lives here and not in ironic.drivers.fake to avoid"},{"line_number":91,"context_line":"# pulling in nearly all driver modules."},{"line_number":92,"context_line":"class FakeHardware(AbstractHardwareType):"},{"line_number":93,"context_line":"    \"\"\"Fake hardware type."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    This hardware type is special-cased in the driver factory to bypass"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_cd0de438","line":92,"in_reply_to":"1a6eadb0_a1637019","updated":"2016-12-14 13:59:02.000000000","message":"I kind of like the idea of a separate file, but here also kind of provides some nice visibility to someone developing a new hardware type from scratch.  *shrug*","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"# NOTE(dtantsur): this class lives here and not in ironic.drivers.fake to avoid"},{"line_number":91,"context_line":"# pulling in nearly all driver modules."},{"line_number":92,"context_line":"class FakeHardware(AbstractHardwareType):"},{"line_number":93,"context_line":"    \"\"\"Fake hardware type."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    This hardware type is special-cased in the driver factory to bypass"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_77301a9f","line":92,"in_reply_to":"1a6eadb0_cd0de438","updated":"2016-12-14 14:55:07.000000000","message":"\u003e here also kind of provides some nice visibility to someone developing a new hardware type from scratch\n\nThis was my thought. I\u0027m fine with moving it just as well.\n\n\u003e Where do you think new hardware types will be added? Not in this file?\n\nNo (see the next patch for example)","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"528057d7cf58513f57ac49ca08c5d62469ff7625","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"1a6eadb0_015ee475","line":142,"updated":"2016-12-14 03:12:02.000000000","message":"Thanks for putting the methods alphabetically!","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"1a6eadb0_97277663","line":142,"in_reply_to":"1a6eadb0_015ee475","updated":"2016-12-14 14:55:07.000000000","message":":)","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5f60f667d4569e7df62b52bb3ec0250e5f73b4b4","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":29,"context_line":"class AbstractHardwareType(object):"},{"line_number":30,"context_line":"    \"\"\"Abstract base class for all hardware types."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    Hardware type is a family of hardware supporting the same set of interfaces"}],"source_content_type":"text/x-python","patch_set":27,"id":"1a6eadb0_65cb041f","line":29,"updated":"2016-12-14 15:37:36.000000000","message":"sorry about the bike shedding, but it seems worth thinking about this now.\n\nI think we should move FakeHardware to a separate file, and this should be renamed so it isn\u0027t plural. We tend to use \u0027base\u0027 for base classes, but \u0027base.py\u0027 is already used for drivers. I\u0027d be fine moving this class to base.py but maybe folks want to keep the drivers separate from hw types, so eg \u0027hardware_type\u0027, or \u0027base_hardware_type\u0027?","commit_id":"c4e591a7747267e944eaaa0631a377fc140c2ca6"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"53a4bc317d640f50f5c959dc066d1625dbe889e4","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":29,"context_line":"class AbstractHardwareType(object):"},{"line_number":30,"context_line":"    \"\"\"Abstract base class for all hardware types."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    Hardware type is a family of hardware supporting the same set of interfaces"}],"source_content_type":"text/x-python","patch_set":27,"id":"1a6eadb0_208d7a7b","line":29,"in_reply_to":"1a6eadb0_65cb041f","updated":"2016-12-14 15:42:23.000000000","message":"I\u0027d move this file to base.py, but we cannot do it. It would create an import loop ironic.drivers.base -\u003e ironic.drivers.modules.noop -\u003e ironic.drivers.base. Hence, it\u0027s a separate file.\n\nI see no value in splitting away FakeHardware, but I can also do it. I\u0027ll re-evaluate if it can be moved to fake.py, I suspect it\u0027s no longer impossible.\n\nWould that work for you?","commit_id":"c4e591a7747267e944eaaa0631a377fc140c2ca6"}],"ironic/tests/base.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":"dc9f87e61b0eff83068e90a91f925dc2d82549be","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        self.config(enabled_hardware_types\u003d[\u0027fake-hardware\u0027])"},{"line_number":131,"context_line":"        self.config(enabled_network_interfaces\u003d[\u0027flat\u0027, \u0027noop\u0027, \u0027neutron\u0027])"},{"line_number":132,"context_line":"        for iface in drivers_base.ALL_INTERFACES:"},{"line_number":133,"context_line":"            self.config(**{\u0027default_%s_interface\u0027 % iface: None})"},{"line_number":134,"context_line":"        self.set_defaults(host\u003d\u0027fake-mini\u0027,"},{"line_number":135,"context_line":"                          debug\u003dTrue)"},{"line_number":136,"context_line":"        self.set_defaults(connection\u003d\"sqlite://\","}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_ed3b80cf","line":133,"updated":"2016-12-14 13:59:02.000000000","message":"Thank you!","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"}],"ironic/tests/unit/common/test_driver_factory.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"1f5ba8333e693501141356f97d7d84c13d20ab44","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from ironic.common import exception"},{"line_number":20,"context_line":"from ironic.conductor import task_manager"},{"line_number":21,"context_line":"from ironic.drivers import base as drivers_base"},{"line_number":22,"context_line":"from ironic.drivers import fake"},{"line_number":23,"context_line":"from ironic.tests import base"},{"line_number":24,"context_line":"from ironic.tests.unit.db import base as db_base"},{"line_number":25,"context_line":"from ironic.tests.unit.objects import utils as obj_utils"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_9d73844d","line":22,"updated":"2016-11-14 21:56:22.000000000","message":"So this is why tests are breaking - this imports the ilo driver without running the code in ironic.tests.unit.drivers.third_party_driver_mocks (because it gets imported by ironic.tests.unit.drivers.__init__). And so the proliantutils module isn\u0027t successfully mocked and hacked in to sys.modules yet.\n\nI think the best route is probably to move the third_party_driver_mocks import to ironic.tests.unit.__init__, so things are mocked for all unit tests. I tested this, seems to work fine.\n\n  py27: commands succeeded\n  congratulations :)\nvagrant@vagrant-ubuntu-trusty-64:~/ironic$ git diff\ndiff --git a/ironic/tests/unit/__init__.py b/ironic/tests/unit/__init__.py\nindex dcc2f0d..6e72cc1 100644\n--- a/ironic/tests/unit/__init__.py\n+++ b/ironic/tests/unit/__init__.py\n@@ -34,3 +34,4 @@ eventlet.monkey_patch(os\u003dFalse)\n # at module import time, because we may be using mock decorators in our\n # tests that run at import time.\n objects.register_all()\n+from ironic.tests.unit.drivers import third_party_driver_mocks   # noqa\ndiff --git a/ironic/tests/unit/drivers/__init__.py b/ironic/tests/unit/drivers/__init__.py\nindex 7a25e0c..3669335 100644\n--- a/ironic/tests/unit/drivers/__init__.py\n+++ b/ironic/tests/unit/drivers/__init__.py\n@@ -18,4 +18,3 @@\n #             external libraries mocked, we load the file which does that\n #             mocking here -- in the __init__.\n \n-from ironic.tests.unit.drivers import third_party_driver_mocks   # noqa","commit_id":"9cf401c96bee7f109c59ae9eeda9ec43a45d7e71"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0fcb27d62e3631b680cd6b851cecf1900a2e4aad","unresolved":false,"context_lines":[{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def test_get_hardware_type_missing(self):"},{"line_number":276,"context_line":"        self.assertRaises(exception.DriverNotFound,"},{"line_number":277,"context_line":"                          driver_factory.get_hardware_type, \u0027banana\u0027)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def test_build_driver_for_task(self):"},{"line_number":280,"context_line":"        node \u003d obj_utils.create_test_node(self.context, driver\u003d\u0027fake-hardware\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_485e6bea","line":277,"range":{"start_line":277,"start_character":61,"end_line":277,"end_character":67},"updated":"2016-11-24 11:57:58.000000000","message":"Banana PI is doomed :D","commit_id":"bf8fc515d0e9b4f52a7c5364b35807d3f3596eca"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fd739a320a23da0af6d3a6232a77cb2c60d84440","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        fake_hardware \u003d driver_factory.get_hardware_type(\u0027fake-hardware\u0027)"},{"line_number":302,"context_line":"        self.assertIsInstance(fake_hardware, hardware_types.FakeHardware)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def test_get_hardware_type_missing(self):"},{"line_number":305,"context_line":"        self.assertRaises(exception.DriverNotFound,"},{"line_number":306,"context_line":"                          driver_factory.get_hardware_type, \u0027banana\u0027)"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def test_build_driver_for_task(self):"},{"line_number":309,"context_line":"        node \u003d obj_utils.create_test_node(self.context, driver\u003d\u0027fake-hardware\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_651922d7","line":306,"range":{"start_line":304,"start_character":4,"end_line":306,"end_character":69},"updated":"2016-12-05 13:02:12.000000000","message":"Could you add a test for get_driver_or_hardware_type?","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7e41940b975532ef59be57fa697ddf2871771b54","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        fake_hardware \u003d driver_factory.get_hardware_type(\u0027fake-hardware\u0027)"},{"line_number":302,"context_line":"        self.assertIsInstance(fake_hardware, hardware_types.FakeHardware)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def test_get_hardware_type_missing(self):"},{"line_number":305,"context_line":"        self.assertRaises(exception.DriverNotFound,"},{"line_number":306,"context_line":"                          driver_factory.get_hardware_type, \u0027banana\u0027)"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def test_build_driver_for_task(self):"},{"line_number":309,"context_line":"        node \u003d obj_utils.create_test_node(self.context, driver\u003d\u0027fake-hardware\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_383476dc","line":306,"range":{"start_line":304,"start_character":4,"end_line":306,"end_character":69},"in_reply_to":"3a71b18c_651922d7","updated":"2016-12-06 13:42:48.000000000","message":"Done","commit_id":"4bb968805777271d89fc02c544cc2d84a10ce93b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dc9f87e61b0eff83068e90a91f925dc2d82549be","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    name \u003d \u0027fake\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"# TODO(dtantsur): switch to hardware types when they\u0027re fully supported"},{"line_number":35,"context_line":"class DriverLoadTestCase(base.TestCase):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def _fake_init_name_err(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_8dbe8cd2","line":34,"updated":"2016-12-14 13:59:02.000000000","message":"I\u0027m actually kind of -1 on switching all tests to hardware types.  Instead I think we need to have new tests in addition to the existing tests","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"626ced588c074800d998ecc0f14ede893299bab9","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    name \u003d \u0027fake\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"# TODO(dtantsur): switch to hardware types when they\u0027re fully supported"},{"line_number":35,"context_line":"class DriverLoadTestCase(base.TestCase):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def _fake_init_name_err(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_e56e3495","line":34,"in_reply_to":"1a6eadb0_77d73a23","updated":"2016-12-14 15:33:48.000000000","message":"Thank you Dmitry!","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    name \u003d \u0027fake\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"# TODO(dtantsur): switch to hardware types when they\u0027re fully supported"},{"line_number":35,"context_line":"class DriverLoadTestCase(base.TestCase):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def _fake_init_name_err(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_77d73a23","line":34,"in_reply_to":"1a6eadb0_8dbe8cd2","updated":"2016-12-14 14:55:07.000000000","message":"Ok, I\u0027ll remove the TODO","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dc9f87e61b0eff83068e90a91f925dc2d82549be","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                         factory._entrypoint_name)"},{"line_number":140,"context_line":"        self.assertEqual([\u0027flat\u0027, \u0027neutron\u0027, \u0027noop\u0027],"},{"line_number":141,"context_line":"                         sorted(factory._enabled_driver_list))"},{"line_number":142,"context_line":"        # NOTE(jroll) 5 checks, one for the driver we\u0027re building and"},{"line_number":143,"context_line":"        # one for each of the 3 network interfaces, the last - for the fake"},{"line_number":144,"context_line":"        # hardware type."},{"line_number":145,"context_line":"        self.assertEqual(5, mock_warn.call_count)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def test_build_driver_for_task_default_is_none(self):"},{"line_number":148,"context_line":"        # flat, neutron, and noop network interfaces are enabled in base test"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_6d2db045","line":145,"range":{"start_line":142,"start_character":7,"end_line":145,"end_character":49},"updated":"2016-12-14 13:59:02.000000000","message":"I would love to see this check go away since it is just counting how many times the driver loader supported check is called, and I\u0027ve seen this number vary inconsistently across patch sets.  One of the storage interface changes it to either check if it was called at all, it since it seems kind of pointless with additional interfaces going in since it may just increment with each activated interface.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                         factory._entrypoint_name)"},{"line_number":140,"context_line":"        self.assertEqual([\u0027flat\u0027, \u0027neutron\u0027, \u0027noop\u0027],"},{"line_number":141,"context_line":"                         sorted(factory._enabled_driver_list))"},{"line_number":142,"context_line":"        # NOTE(jroll) 5 checks, one for the driver we\u0027re building and"},{"line_number":143,"context_line":"        # one for each of the 3 network interfaces, the last - for the fake"},{"line_number":144,"context_line":"        # hardware type."},{"line_number":145,"context_line":"        self.assertEqual(5, mock_warn.call_count)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def test_build_driver_for_task_default_is_none(self):"},{"line_number":148,"context_line":"        # flat, neutron, and noop network interfaces are enabled in base test"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_d7964e4b","line":145,"range":{"start_line":142,"start_character":7,"end_line":145,"end_character":49},"in_reply_to":"1a6eadb0_6d2db045","updated":"2016-12-14 14:55:07.000000000","message":"Chances are high your change will merge first and brings this fix with it :) Or do you want me to copy it from your patch?","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"626ced588c074800d998ecc0f14ede893299bab9","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                         factory._entrypoint_name)"},{"line_number":140,"context_line":"        self.assertEqual([\u0027flat\u0027, \u0027neutron\u0027, \u0027noop\u0027],"},{"line_number":141,"context_line":"                         sorted(factory._enabled_driver_list))"},{"line_number":142,"context_line":"        # NOTE(jroll) 5 checks, one for the driver we\u0027re building and"},{"line_number":143,"context_line":"        # one for each of the 3 network interfaces, the last - for the fake"},{"line_number":144,"context_line":"        # hardware type."},{"line_number":145,"context_line":"        self.assertEqual(5, mock_warn.call_count)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def test_build_driver_for_task_default_is_none(self):"},{"line_number":148,"context_line":"        # flat, neutron, and noop network interfaces are enabled in base test"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_c5fa18bd","line":145,"range":{"start_line":142,"start_character":7,"end_line":145,"end_character":49},"in_reply_to":"1a6eadb0_d7964e4b","updated":"2016-12-14 15:33:48.000000000","message":"I\u0027m not worried, we\u0027ll figure it out. :)","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"}],"setup.cfg":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"528057d7cf58513f57ac49ca08c5d62469ff7625","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"ironic.hardware.interfaces.console \u003d"},{"line_number":104,"context_line":"    no-console \u003d ironic.drivers.modules.noop:NoConsole"},{"line_number":105,"context_line":"    fake \u003d ironic.drivers.modules.fake:FakeConsole"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"ironic.hardware.interfaces.deploy \u003d"},{"line_number":108,"context_line":"    fake \u003d ironic.drivers.modules.fake:FakeDeploy"}],"source_content_type":"text/x-ttcn-cfg","patch_set":26,"id":"1a6eadb0_bd21dafd","line":105,"updated":"2016-12-14 03:12:02.000000000","message":"might be a nit, but we might want to try to keep these in alpha order.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"ironic.hardware.interfaces.console \u003d"},{"line_number":104,"context_line":"    no-console \u003d ironic.drivers.modules.noop:NoConsole"},{"line_number":105,"context_line":"    fake \u003d ironic.drivers.modules.fake:FakeConsole"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"ironic.hardware.interfaces.deploy \u003d"},{"line_number":108,"context_line":"    fake \u003d ironic.drivers.modules.fake:FakeDeploy"}],"source_content_type":"text/x-ttcn-cfg","patch_set":26,"id":"1a6eadb0_b7863211","line":105,"in_reply_to":"1a6eadb0_bd21dafd","updated":"2016-12-14 14:55:07.000000000","message":"Done","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"528057d7cf58513f57ac49ca08c5d62469ff7625","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"ironic.hardware.interfaces.network \u003d"},{"line_number":118,"context_line":"    flat \u003d ironic.drivers.modules.network.flat:FlatNetwork"},{"line_number":119,"context_line":"    noop \u003d ironic.drivers.modules.network.noop:NoopNetwork"},{"line_number":120,"context_line":"    neutron \u003d ironic.drivers.modules.network.neutron:NeutronNetwork"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"ironic.hardware.interfaces.power \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":26,"id":"1a6eadb0_7d6e6230","line":119,"updated":"2016-12-14 03:12:02.000000000","message":"should we rename noop to \u0027no-network\u0027 to be consistent with the other no-X interfaces? (Not in this patch, just wondering)","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"4ad0708582e0310aca2d19a6e6d9076073a8da62","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"ironic.hardware.interfaces.network \u003d"},{"line_number":118,"context_line":"    flat \u003d ironic.drivers.modules.network.flat:FlatNetwork"},{"line_number":119,"context_line":"    noop \u003d ironic.drivers.modules.network.noop:NoopNetwork"},{"line_number":120,"context_line":"    neutron \u003d ironic.drivers.modules.network.neutron:NeutronNetwork"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"ironic.hardware.interfaces.power \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":26,"id":"1a6eadb0_f450a860","line":119,"in_reply_to":"1a6eadb0_2daf3882","updated":"2016-12-14 14:41:15.000000000","message":"++ that should be left as-is","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dc9f87e61b0eff83068e90a91f925dc2d82549be","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"ironic.hardware.interfaces.network \u003d"},{"line_number":118,"context_line":"    flat \u003d ironic.drivers.modules.network.flat:FlatNetwork"},{"line_number":119,"context_line":"    noop \u003d ironic.drivers.modules.network.noop:NoopNetwork"},{"line_number":120,"context_line":"    neutron \u003d ironic.drivers.modules.network.neutron:NeutronNetwork"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"ironic.hardware.interfaces.power \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":26,"id":"1a6eadb0_2daf3882","line":119,"in_reply_to":"1a6eadb0_7d6e6230","updated":"2016-12-14 13:59:02.000000000","message":"I don\u0027t think we should because it wouldn\u0027t be consistent and it would be behavior changing to rename the interface.  no-X interface are intended to raise exceptions where as noop is simply a \"nothing to see here, move along now\" pass.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4cb679e3c0b300b69427b4f299c5f680e6ebe45","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"ironic.hardware.interfaces.network \u003d"},{"line_number":118,"context_line":"    flat \u003d ironic.drivers.modules.network.flat:FlatNetwork"},{"line_number":119,"context_line":"    noop \u003d ironic.drivers.modules.network.noop:NoopNetwork"},{"line_number":120,"context_line":"    neutron \u003d ironic.drivers.modules.network.neutron:NeutronNetwork"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"ironic.hardware.interfaces.power \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":26,"id":"1a6eadb0_abf7abf3","line":119,"in_reply_to":"1a6eadb0_979a1662","updated":"2016-12-14 16:00:34.000000000","message":"Oh, did I know this?! So much to remember...\n\nMy next question then -- why didn\u0027t we add a no-network interface? That would be consistent with no-inspect, no-raid, no-vendor...","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d15368e1f3cae491b3316784c2d1ef48e15fdd7a","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"ironic.hardware.interfaces.network \u003d"},{"line_number":118,"context_line":"    flat \u003d ironic.drivers.modules.network.flat:FlatNetwork"},{"line_number":119,"context_line":"    noop \u003d ironic.drivers.modules.network.noop:NoopNetwork"},{"line_number":120,"context_line":"    neutron \u003d ironic.drivers.modules.network.neutron:NeutronNetwork"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"ironic.hardware.interfaces.power \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":26,"id":"1a6eadb0_2b747bfb","line":119,"in_reply_to":"1a6eadb0_abf7abf3","updated":"2016-12-14 16:05:27.000000000","message":"We distinguish between interfaces called directly by users (inspect), and called indirectly, via other interfaces (network). If we create no-network, it will be useless, as it will make deploy fail.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"ironic.hardware.interfaces.network \u003d"},{"line_number":118,"context_line":"    flat \u003d ironic.drivers.modules.network.flat:FlatNetwork"},{"line_number":119,"context_line":"    noop \u003d ironic.drivers.modules.network.noop:NoopNetwork"},{"line_number":120,"context_line":"    neutron \u003d ironic.drivers.modules.network.neutron:NeutronNetwork"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"ironic.hardware.interfaces.power \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":26,"id":"1a6eadb0_979a1662","line":119,"in_reply_to":"1a6eadb0_f450a860","updated":"2016-12-14 14:55:07.000000000","message":"\u003e no-X interface are intended to raise exceptions where as noop is simply a \"nothing to see here, move along now\" pass\n\nyeah, this","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"528057d7cf58513f57ac49ca08c5d62469ff7625","unresolved":false,"context_lines":[{"line_number":117,"context_line":"ironic.hardware.interfaces.network \u003d"},{"line_number":118,"context_line":"    flat \u003d ironic.drivers.modules.network.flat:FlatNetwork"},{"line_number":119,"context_line":"    noop \u003d ironic.drivers.modules.network.noop:NoopNetwork"},{"line_number":120,"context_line":"    neutron \u003d ironic.drivers.modules.network.neutron:NeutronNetwork"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"ironic.hardware.interfaces.power \u003d"},{"line_number":123,"context_line":"    fake \u003d ironic.drivers.modules.fake:FakePower"}],"source_content_type":"text/x-ttcn-cfg","patch_set":26,"id":"1a6eadb0_3d5b0a89","line":120,"updated":"2016-12-14 03:12:02.000000000","message":"Do you remember why we didn\u0027t add a fake one?","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dc9f87e61b0eff83068e90a91f925dc2d82549be","unresolved":false,"context_lines":[{"line_number":117,"context_line":"ironic.hardware.interfaces.network \u003d"},{"line_number":118,"context_line":"    flat \u003d ironic.drivers.modules.network.flat:FlatNetwork"},{"line_number":119,"context_line":"    noop \u003d ironic.drivers.modules.network.noop:NoopNetwork"},{"line_number":120,"context_line":"    neutron \u003d ironic.drivers.modules.network.neutron:NeutronNetwork"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"ironic.hardware.interfaces.power \u003d"},{"line_number":123,"context_line":"    fake \u003d ironic.drivers.modules.fake:FakePower"}],"source_content_type":"text/x-ttcn-cfg","patch_set":26,"id":"1a6eadb0_ade8a8b5","line":120,"in_reply_to":"1a6eadb0_3d5b0a89","updated":"2016-12-14 13:59:02.000000000","message":"AFAIK we had no need.  noop is kind of similar in that, except noop is a legitimate use, and nobody should be trying to use a fake driver in production.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"528057d7cf58513f57ac49ca08c5d62469ff7625","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    fake \u003d ironic.drivers.modules.fake:FakeVendorB"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"ironic.hardware.types \u003d"},{"line_number":137,"context_line":"    fake-hardware \u003d ironic.drivers.hardware_types:FakeHardware"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"ironic.database.migration_backend \u003d"},{"line_number":140,"context_line":"    sqlalchemy \u003d ironic.db.sqlalchemy.migration"}],"source_content_type":"text/x-ttcn-cfg","patch_set":26,"id":"1a6eadb0_9d733ee7","line":137,"updated":"2016-12-14 03:12:02.000000000","message":"maybe this should just be s/fake-hardware/fake/ ? Or is it cuz there is a \u0027fake\u0027 driver?\n\nMaybe we should add a note that these names need to be unique amongst hardware types \u0026 ironic.drivers.","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d7a7c1401abaf651196eb59eb5b9de18fa328a88","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    fake \u003d ironic.drivers.modules.fake:FakeVendorB"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"ironic.hardware.types \u003d"},{"line_number":137,"context_line":"    fake-hardware \u003d ironic.drivers.hardware_types:FakeHardware"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"ironic.database.migration_backend \u003d"},{"line_number":140,"context_line":"    sqlalchemy \u003d ironic.db.sqlalchemy.migration"}],"source_content_type":"text/x-ttcn-cfg","patch_set":26,"id":"1a6eadb0_5705de77","line":137,"in_reply_to":"1a6eadb0_9d733ee7","updated":"2016-12-14 14:55:07.000000000","message":"\u003e Or is it cuz there is a \u0027fake\u0027 driver?\n\nExactly\n\n\u003e Maybe we should add a note\n\nWill do, when I update the dev docs on drivers","commit_id":"b1374d486fbf4f706e25a5bb7b9ce6610cfd81d5"}]}
