)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"68340a3470aed228f5b0b88404bc28e61d7779db","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Anton Arefiev \u003caarefiev@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-02-17 16:39:02 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Extend conditions and actions"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Conditions: ``field`` supports new format, it allow to comparison"},{"line_number":10,"context_line":"data both from inspection and node info:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"dae33548_8c6906fc","line":7,"updated":"2016-02-17 16:32:44.000000000","message":"the summary could be more specific, but I can\u0027t think of better wording","commit_id":"27940b27d53b6e225d088140d839654f46588838"}],"doc/source/usage.rst":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0aefe713b7e085cc2bd6c3c88df975cddbd40666","unresolved":false,"context_lines":[{"line_number":220,"context_line":""},{"line_number":221,"context_line":"After that **ironic-inspector** process introspection data with provided"},{"line_number":222,"context_line":"or defaults plugins :ref:`_plugins`. If additional actions are needed after"},{"line_number":223,"context_line":"all hooks processed, introspection rules could be used, see :ref:`_rules`."}],"source_content_type":"text/x-rst","patch_set":5,"id":"5a5ae5dd_89ba306d","line":223,"updated":"2016-02-04 17:16:18.000000000","message":"You have nice examples in the spec, lets move them here","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e935d29092e78f05160c891911af4f67e847a1e","unresolved":false,"context_lines":[{"line_number":220,"context_line":""},{"line_number":221,"context_line":"After that **ironic-inspector** process introspection data with provided"},{"line_number":222,"context_line":"or defaults plugins :ref:`_plugins`. If additional actions are needed after"},{"line_number":223,"context_line":"all hooks processed, introspection rules could be used, see :ref:`_rules`."}],"source_content_type":"text/x-rst","patch_set":5,"id":"5a5ae5dd_523925f1","line":223,"in_reply_to":"5a5ae5dd_89ba306d","updated":"2016-02-05 08:46:08.000000000","message":"sure","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0cea4c08dfcd1fd0664aeaa791cf07e82f2c4b9b","unresolved":false,"context_lines":[{"line_number":70,"context_line":"``field`` a `JSON path \u003chttp://goessner.net/articles/JsonPath/\u003e`_ to the field"},{"line_number":71,"context_line":"in the introspection data to use in comparison."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"  .. note::"},{"line_number":74,"context_line":"    Starting from Mitaka, new ``field`` format is available, it allow to"},{"line_number":75,"context_line":"    comparison data both from inspection and node info::"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"3a57f1b5_9aefd686","line":73,"updated":"2016-02-11 10:44:21.000000000","message":"lets convert it from a note to a proper paragraph, notes are usually used for additional information.","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0cea4c08dfcd1fd0664aeaa791cf07e82f2c4b9b","unresolved":false,"context_lines":[{"line_number":71,"context_line":"in the introspection data to use in comparison."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"  .. note::"},{"line_number":74,"context_line":"    Starting from Mitaka, new ``field`` format is available, it allow to"},{"line_number":75,"context_line":"    comparison data both from inspection and node info::"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        {\u0027field\u0027: \u0027node://ironic/style/path\u0027, \u0027op\u0027: \u0027eq\u0027, \u0027value\u0027: \u0027val\u0027}"}],"source_content_type":"text/x-rst","patch_set":8,"id":"3a57f1b5_baf2d26d","line":74,"updated":"2016-02-11 10:44:21.000000000","message":"s/it allow/that allows/","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0cea4c08dfcd1fd0664aeaa791cf07e82f2c4b9b","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"  .. note::"},{"line_number":74,"context_line":"    Starting from Mitaka, new ``field`` format is available, it allow to"},{"line_number":75,"context_line":"    comparison data both from inspection and node info::"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        {\u0027field\u0027: \u0027node://ironic/style/path\u0027, \u0027op\u0027: \u0027eq\u0027, \u0027value\u0027: \u0027val\u0027}"},{"line_number":78,"context_line":"        {\u0027field\u0027: \u0027data://introspection/path\u0027, \u0027op\u0027: \u0027eq\u0027, \u0027value\u0027: \u0027val\u0027}"}],"source_content_type":"text/x-rst","patch_set":8,"id":"3a57f1b5_5ae95e7f","line":75,"updated":"2016-02-11 10:44:21.000000000","message":"to compare","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0cea4c08dfcd1fd0664aeaa791cf07e82f2c4b9b","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    if scheme(node or data) is missing, condition compares data with"},{"line_number":81,"context_line":"    introspection data. In this case JSON path format should be used for"},{"line_number":82,"context_line":"    backward compatibility."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"``multiple`` how to treat situations where the ``field`` query returns multiple"},{"line_number":85,"context_line":"results (e.g. the field contains a list), available options are:"}],"source_content_type":"text/x-rst","patch_set":8,"id":"3a57f1b5_7aec5a8f","line":82,"updated":"2016-02-11 10:44:21.000000000","message":"Lets drop backward compatibility bit, we\u0027re not deprecating the JSON path feature. Also please highlight the difference between formats better, it\u0027s not clear that data:// is not a JSON path","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0cea4c08dfcd1fd0664aeaa791cf07e82f2c4b9b","unresolved":false,"context_lines":[{"line_number":209,"context_line":"Discovery"},{"line_number":210,"context_line":"~~~~~~~~~"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"Starting from Mitaka, **ironic-inspector** may register new nodes in Ironic."},{"line_number":213,"context_line":"Nodes that don\u0027t exist in the inspector node cache may still be booted and"},{"line_number":214,"context_line":"return inspection information to process, ``node-not-found-hook`` allows to"},{"line_number":215,"context_line":"handle that information."}],"source_content_type":"text/x-rst","patch_set":8,"id":"3a57f1b5_1a044648","line":212,"updated":"2016-02-11 10:44:21.000000000","message":"s/may/is able to/","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0cea4c08dfcd1fd0664aeaa791cf07e82f2c4b9b","unresolved":false,"context_lines":[{"line_number":210,"context_line":"~~~~~~~~~"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"Starting from Mitaka, **ironic-inspector** may register new nodes in Ironic."},{"line_number":213,"context_line":"Nodes that don\u0027t exist in the inspector node cache may still be booted and"},{"line_number":214,"context_line":"return inspection information to process, ``node-not-found-hook`` allows to"},{"line_number":215,"context_line":"handle that information."},{"line_number":216,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"3a57f1b5_3affc235","line":213,"updated":"2016-02-11 10:44:21.000000000","message":"\"booted manually\"","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2ce889fbf6ed610558a69338cd9600e0bbb1cf1d","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"Starting from Mitaka, new ``field`` format is available, that allows to"},{"line_number":78,"context_line":"compare data both from inspection and node info, \u0027node://\u0027 and \u0027data://\u0027"},{"line_number":79,"context_line":"schemes used for distinguish path. Both schemes uses JSON path::"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    {\u0027field\u0027: \u0027node://property.path\u0027, \u0027op\u0027: \u0027eq\u0027, \u0027value\u0027: \u0027val\u0027}"},{"line_number":82,"context_line":"    {\u0027field\u0027: \u0027data://introspection.path\u0027, \u0027op\u0027: \u0027eq\u0027, \u0027value\u0027: \u0027val\u0027}"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3a57f1b5_87fe4fac","line":79,"updated":"2016-02-12 16:00:27.000000000","message":"1. I\u0027d rephrade it like\n\n Starting with the Mitaka release, you can also apply conditions to ironic node field.\n Prefix field with schema (``data://`` or ``node://``) to distinguish between values from introspection data and node.\n\nor something like that.\n\n2.s/uses/use/","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2ce889fbf6ed610558a69338cd9600e0bbb1cf1d","unresolved":false,"context_lines":[{"line_number":81,"context_line":"    {\u0027field\u0027: \u0027node://property.path\u0027, \u0027op\u0027: \u0027eq\u0027, \u0027value\u0027: \u0027val\u0027}"},{"line_number":82,"context_line":"    {\u0027field\u0027: \u0027data://introspection.path\u0027, \u0027op\u0027: \u0027eq\u0027, \u0027value\u0027: \u0027val\u0027}"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"if scheme(node or data) is missing, condition compares data with"},{"line_number":85,"context_line":"introspection data."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"``multiple`` how to treat situations where the ``field`` query returns multiple"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3a57f1b5_272e7b43","line":84,"updated":"2016-02-12 16:00:27.000000000","message":"nit: no space before (","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"91bc89ceca81d3da4ba939e662ba9f7f9851a907","unresolved":false,"context_lines":[{"line_number":120,"context_line":"  value as a list and appends value to it. If optional ``unique`` parameter is"},{"line_number":121,"context_line":"  set to ``True``, nothing will be added if given value is already in a list."},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"  .. note::"},{"line_number":124,"context_line":"    Starting from Mitaka, ``value`` field in actions supports fetching data"},{"line_number":125,"context_line":"    from introspection, it\u0027s using `python string formatting notation"},{"line_number":126,"context_line":"    \u003chttps://docs.python.org/2/library/string.html#formatspec\u003e`_ ::"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3a57f1b5_a99c8e0e","line":123,"range":{"start_line":123,"start_character":5,"end_line":123,"end_character":9},"updated":"2016-02-12 13:03:32.000000000","message":"heh, missed this","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2ce889fbf6ed610558a69338cd9600e0bbb1cf1d","unresolved":false,"context_lines":[{"line_number":217,"context_line":"booted manually and return inspection information to process,"},{"line_number":218,"context_line":"``node-not-found-hook`` allows to handle that information."},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"For discovery, hook called ``enroll_node_not_found_hook`` should be"},{"line_number":221,"context_line":"specified in the configuration file. It will create a node with ``fake``"},{"line_number":222,"context_line":"driver by default(driver is configured option, it\u0027s possible to change"},{"line_number":223,"context_line":"driver with appropriate value, set  ``enroll_node_driver`` in the"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3a57f1b5_473377ab","line":220,"updated":"2016-02-12 16:00:27.000000000","message":"the hook is called just \"enroll\"","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c400cf1fa9705a0f664e4e912d83639153c6362b","unresolved":false,"context_lines":[{"line_number":217,"context_line":"booted manually and return inspection information to process,"},{"line_number":218,"context_line":"``node-not-found-hook`` allows to handle that information."},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"For discovery, hook called ``enroll_node_not_found_hook`` should be"},{"line_number":221,"context_line":"specified in the configuration file. It will create a node with ``fake``"},{"line_number":222,"context_line":"driver by default(driver is configured option, it\u0027s possible to change"},{"line_number":223,"context_line":"driver with appropriate value, set  ``enroll_node_driver`` in the"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3a57f1b5_6a919af0","line":220,"in_reply_to":"3a57f1b5_473377ab","updated":"2016-02-12 16:26:08.000000000","message":"right","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"}],"ironic_inspector/conf.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0cea4c08dfcd1fd0664aeaa791cf07e82f2c4b9b","unresolved":false,"context_lines":[{"line_number":167,"context_line":"               default\u003d\u0027fake\u0027,"},{"line_number":168,"context_line":"               help\u003d\u0027The name of the Ironic driver, discovered node created \u0027"},{"line_number":169,"context_line":"                    \u0027with in enroll_node_not_found_hook. Driver could be \u0027"},{"line_number":170,"context_line":"                    \u0027redefined via introspection rules.\u0027),"},{"line_number":171,"context_line":"    cfg.StrOpt(\u0027store_data\u0027,"},{"line_number":172,"context_line":"               default\u003d\u0027none\u0027,"},{"line_number":173,"context_line":"               choices\u003dVALID_STORE_DATA_VALUES,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a57f1b5_fae12a9b","line":170,"updated":"2016-02-11 10:44:21.000000000","message":"non-core plugins options should go to the plugin\u0027s file (don\u0027t forget to update setup.cfg).","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ab09eacc8fd7ef2eccfc624bf70ffa354b2dcc95","unresolved":false,"context_lines":[{"line_number":167,"context_line":"               default\u003d\u0027fake\u0027,"},{"line_number":168,"context_line":"               help\u003d\u0027The name of the Ironic driver, discovered node created \u0027"},{"line_number":169,"context_line":"                    \u0027with in enroll_node_not_found_hook. Driver could be \u0027"},{"line_number":170,"context_line":"                    \u0027redefined via introspection rules.\u0027),"},{"line_number":171,"context_line":"    cfg.StrOpt(\u0027store_data\u0027,"},{"line_number":172,"context_line":"               default\u003d\u0027none\u0027,"},{"line_number":173,"context_line":"               choices\u003dVALID_STORE_DATA_VALUES,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a57f1b5_71c8f422","line":170,"in_reply_to":"3a57f1b5_0b971349","updated":"2016-02-11 13:55:04.000000000","message":"it lists the config option sources for example.conf generation","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"6e38a6c14cf1329f886e953e02b01b9a1c462cb7","unresolved":false,"context_lines":[{"line_number":167,"context_line":"               default\u003d\u0027fake\u0027,"},{"line_number":168,"context_line":"               help\u003d\u0027The name of the Ironic driver, discovered node created \u0027"},{"line_number":169,"context_line":"                    \u0027with in enroll_node_not_found_hook. Driver could be \u0027"},{"line_number":170,"context_line":"                    \u0027redefined via introspection rules.\u0027),"},{"line_number":171,"context_line":"    cfg.StrOpt(\u0027store_data\u0027,"},{"line_number":172,"context_line":"               default\u003d\u0027none\u0027,"},{"line_number":173,"context_line":"               choices\u003dVALID_STORE_DATA_VALUES,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a57f1b5_b130ac02","line":170,"in_reply_to":"3a57f1b5_71c8f422","updated":"2016-02-11 13:58:23.000000000","message":"get it, thanks","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"2881bf04a694a1c52d6cee0805832a9ba479f948","unresolved":false,"context_lines":[{"line_number":167,"context_line":"               default\u003d\u0027fake\u0027,"},{"line_number":168,"context_line":"               help\u003d\u0027The name of the Ironic driver, discovered node created \u0027"},{"line_number":169,"context_line":"                    \u0027with in enroll_node_not_found_hook. Driver could be \u0027"},{"line_number":170,"context_line":"                    \u0027redefined via introspection rules.\u0027),"},{"line_number":171,"context_line":"    cfg.StrOpt(\u0027store_data\u0027,"},{"line_number":172,"context_line":"               default\u003d\u0027none\u0027,"},{"line_number":173,"context_line":"               choices\u003dVALID_STORE_DATA_VALUES,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a57f1b5_0b971349","line":170,"in_reply_to":"3a57f1b5_fae12a9b","updated":"2016-02-11 13:22:11.000000000","message":"how setup.cfg is related to config option?","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"}],"ironic_inspector/main.py":[{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"0895b2a414b30cd393554e8aa170bef5fd1d4bbc","unresolved":false,"context_lines":[{"line_number":212,"context_line":"@app.route(\u0027/v1/introspection/\u003cuuid\u003e/data\u0027, methods\u003d[\u0027GET\u0027])"},{"line_number":213,"context_line":"@convert_exceptions"},{"line_number":214,"context_line":"def api_introspection_data(uuid):"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    utils.check_auth(flask.request)"},{"line_number":217,"context_line":"    if CONF.processing.store_data \u003d\u003d \u0027swift\u0027:"},{"line_number":218,"context_line":"        res \u003d swift.get_introspection_data(uuid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_54323ff3","line":215,"range":{"start_line":215,"start_character":0,"end_line":215,"end_character":0},"updated":"2016-02-01 06:59:14.000000000","message":"Does this line make sense?","commit_id":"346127adc135ea21528c34852780b3b88eb38223"}],"ironic_inspector/node_cache.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"90700d294dcd408971fdebb3ce979886154f5847","unresolved":false,"context_lines":[{"line_number":581,"context_line":"    try:"},{"line_number":582,"context_line":"        node \u003d ironic.node.create(driver\u003ddriver)"},{"line_number":583,"context_line":"    except exceptions.InvalidAttribute as e:"},{"line_number":584,"context_line":"            LOG.error(_LE(\u0027Failed to create new node:\u0027), e)"},{"line_number":585,"context_line":"    else:"},{"line_number":586,"context_line":"        return add_node(node.uuid, ironic\u003dironic)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_ec9dd566","line":584,"updated":"2016-01-22 16:22:40.000000000","message":"redundant indentation","commit_id":"cc4ab1dbf769499e480646dded485b7801628fc5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"90700d294dcd408971fdebb3ce979886154f5847","unresolved":false,"context_lines":[{"line_number":583,"context_line":"    except exceptions.InvalidAttribute as e:"},{"line_number":584,"context_line":"            LOG.error(_LE(\u0027Failed to create new node:\u0027), e)"},{"line_number":585,"context_line":"    else:"},{"line_number":586,"context_line":"        return add_node(node.uuid, ironic\u003dironic)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_0c9b8973","line":586,"updated":"2016-01-22 16:22:40.000000000","message":"maybe some INFO level logging here","commit_id":"cc4ab1dbf769499e480646dded485b7801628fc5"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"0895b2a414b30cd393554e8aa170bef5fd1d4bbc","unresolved":false,"context_lines":[{"line_number":562,"context_line":"                node_info.release_lock()"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    return uuids"},{"line_number":565,"context_line":""},{"line_number":566,"context_line":"def create_node(driver\u003d\u0027fake\u0027, ironic\u003dNone):"},{"line_number":567,"context_line":"    \"\"\"Create ironic node and cache it."},{"line_number":568,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_94743768","line":565,"range":{"start_line":565,"start_character":0,"end_line":565,"end_character":0},"updated":"2016-02-01 06:59:14.000000000","message":"One more blank line is necessary.","commit_id":"346127adc135ea21528c34852780b3b88eb38223"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2ce889fbf6ed610558a69338cd9600e0bbb1cf1d","unresolved":false,"context_lines":[{"line_number":343,"context_line":""},{"line_number":344,"context_line":"         :returns: dictionary with node\u0027s attributes"},{"line_number":345,"context_line":"        \"\"\""},{"line_number":346,"context_line":"        return self.node().to_dict()"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    def replace_field(self, path, func, **kwargs):"},{"line_number":349,"context_line":"        \"\"\"Replace a field on ironic node."}],"source_content_type":"text/x-python","patch_set":9,"id":"3a57f1b5_a7226b50","line":346,"updated":"2016-02-12 16:00:27.000000000","message":"I\u0027m not convinced we need this helper function vs using node() directly","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c400cf1fa9705a0f664e4e912d83639153c6362b","unresolved":false,"context_lines":[{"line_number":343,"context_line":""},{"line_number":344,"context_line":"         :returns: dictionary with node\u0027s attributes"},{"line_number":345,"context_line":"        \"\"\""},{"line_number":346,"context_line":"        return self.node().to_dict()"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    def replace_field(self, path, func, **kwargs):"},{"line_number":349,"context_line":"        \"\"\"Replace a field on ironic node."}],"source_content_type":"text/x-python","patch_set":9,"id":"3a57f1b5_ea6a6aec","line":346,"in_reply_to":"3a57f1b5_a7226b50","updated":"2016-02-12 16:26:08.000000000","message":"I\u0027ll clean up, thought there would be more calls","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2ce889fbf6ed610558a69338cd9600e0bbb1cf1d","unresolved":false,"context_lines":[{"line_number":595,"context_line":"    try:"},{"line_number":596,"context_line":"        node \u003d ironic.node.create(driver\u003ddriver, **attributes)"},{"line_number":597,"context_line":"    except exceptions.InvalidAttribute as e:"},{"line_number":598,"context_line":"        LOG.error(_LE(\u0027Failed to create new node\u0027), e)"},{"line_number":599,"context_line":"    else:"},{"line_number":600,"context_line":"        LOG.info(_LI(\u0027Node %s was created successfully\u0027), node.uuid)"},{"line_number":601,"context_line":"        return add_node(node.uuid, ironic\u003dironic)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a57f1b5_c71f6706","line":598,"updated":"2016-02-12 16:00:27.000000000","message":"any particular reason you don\u0027t reraise this exception?\n\nI think we should catch Ironic exceptions here and reraise utils.Error() with an appropriate message","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c400cf1fa9705a0f664e4e912d83639153c6362b","unresolved":false,"context_lines":[{"line_number":595,"context_line":"    try:"},{"line_number":596,"context_line":"        node \u003d ironic.node.create(driver\u003ddriver, **attributes)"},{"line_number":597,"context_line":"    except exceptions.InvalidAttribute as e:"},{"line_number":598,"context_line":"        LOG.error(_LE(\u0027Failed to create new node\u0027), e)"},{"line_number":599,"context_line":"    else:"},{"line_number":600,"context_line":"        LOG.info(_LI(\u0027Node %s was created successfully\u0027), node.uuid)"},{"line_number":601,"context_line":"        return add_node(node.uuid, ironic\u003dironic)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a57f1b5_6a2d1aa7","line":598,"in_reply_to":"3a57f1b5_c71f6706","updated":"2016-02-12 16:26:08.000000000","message":"yep, missed erro","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"}],"ironic_inspector/plugins/discovery.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"90700d294dcd408971fdebb3ce979886154f5847","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from ironic_inspector import node_cache"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"LOG \u003d log.getLogger(\"ironic_inspector.plugins.discovery\")"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def enroll_node_not_found_hook(introspection_data, **kwargs):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_4c95013d","line":21,"updated":"2016-01-22 16:22:40.000000000","message":"nit: getLogger(__name__)","commit_id":"cc4ab1dbf769499e480646dded485b7801628fc5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"41c824fb0a6fc53ee21c60cbd13052063bf33111","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def enroll_node_not_found_hook(introspection_data, **kwargs):"},{"line_number":25,"context_line":"    LOG.debug(\u0027Creating discovered node: %s\u0027, introspection_data)"},{"line_number":26,"context_line":"    return node_cache.create_node()"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_200ba67e","line":26,"range":{"start_line":26,"start_character":22,"end_line":26,"end_character":33},"updated":"2016-02-08 10:04:52.000000000","message":"1. we still need the driver to be configurable. production environment usually don\u0027t have fake driver enabled, and it will make discovery unusable for them\n\n2. what about always setting driver_info/ipmi_address for people\u0027s convenience?\n\n3. the big part which is missing here is a full lookup. we can\u0027t rely on our cache only, there may be this node in ironic database. so we need to a) make sure no ports exist for received MAC\u0027s, b) no node have the same IPMI address. The latter unfortunately requires fetching all nodes.","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"e93dedb27e134f40c7707f5f5546783161161849","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def enroll_node_not_found_hook(introspection_data, **kwargs):"},{"line_number":25,"context_line":"    LOG.debug(\u0027Creating discovered node: %s\u0027, introspection_data)"},{"line_number":26,"context_line":"    return node_cache.create_node()"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_d71cd96b","line":26,"range":{"start_line":26,"start_character":22,"end_line":26,"end_character":33},"in_reply_to":"5a5ae5dd_200ba67e","updated":"2016-02-08 11:27:48.000000000","message":"1) sure, I thought here about config value for default driver;\n\n2) good idea, I also think about possibility to specify new ipmi cred;\n\n3) I\u0027m testing this, in port case, error is raised now, but yep we should check node existing.","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"eb84b63768a00b8d7f36cedb8e17793e1a9ebec6","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def enroll_node_not_found_hook(introspection_data, **kwargs):"},{"line_number":25,"context_line":"    LOG.debug(\u0027Creating discovered node: %s\u0027, introspection_data)"},{"line_number":26,"context_line":"    return node_cache.create_node()"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_e3dfd3d3","line":26,"range":{"start_line":26,"start_character":22,"end_line":26,"end_character":33},"in_reply_to":"5a5ae5dd_d71cd96b","updated":"2016-02-08 12:02:30.000000000","message":"2) not sure about credentials, but ipmi_address is something we already have in introspection_data, so we can add it very easily","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0cea4c08dfcd1fd0664aeaa791cf07e82f2c4b9b","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def enroll_node_not_found_hook(introspection_data, **kwargs):"},{"line_number":27,"context_line":"    LOG.debug(\u0027Creating discovered node: %s\u0027, introspection_data)"},{"line_number":28,"context_line":"    return node_cache.create_node(CONF.processing.enroll_node_driver)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a57f1b5_dae6aeb3","line":27,"updated":"2016-02-11 10:44:21.000000000","message":"see previous patchsets for comments (looking up a node in ironic, adding ipmi_address)","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"2881bf04a694a1c52d6cee0805832a9ba479f948","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def enroll_node_not_found_hook(introspection_data, **kwargs):"},{"line_number":27,"context_line":"    LOG.debug(\u0027Creating discovered node: %s\u0027, introspection_data)"},{"line_number":28,"context_line":"    return node_cache.create_node(CONF.processing.enroll_node_driver)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a57f1b5_a22aa47c","line":27,"in_reply_to":"3a57f1b5_dae6aeb3","updated":"2016-02-11 13:22:11.000000000","message":"ok, I remember about this, looking into providing new ipmi cred too","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2ce889fbf6ed610558a69338cd9600e0bbb1cf1d","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    return node_attributes"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def enroll_node_not_found_hook(introspection_data, **kwargs):"},{"line_number":56,"context_line":"    node_attr \u003d _extract_node_attributes(introspection_data)"},{"line_number":57,"context_line":"    node_driver \u003d CONF.enroll_hook.enroll_node_driver"},{"line_number":58,"context_line":"    LOG.debug(\u0027Creating discovered node with driver\u003d%(driver) and \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a57f1b5_e7238356","line":55,"updated":"2016-02-12 16:00:27.000000000","message":"this function still missing node lookup in ironic database before creating it","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c400cf1fa9705a0f664e4e912d83639153c6362b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    return node_attributes"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def enroll_node_not_found_hook(introspection_data, **kwargs):"},{"line_number":56,"context_line":"    node_attr \u003d _extract_node_attributes(introspection_data)"},{"line_number":57,"context_line":"    node_driver \u003d CONF.enroll_hook.enroll_node_driver"},{"line_number":58,"context_line":"    LOG.debug(\u0027Creating discovered node with driver\u003d%(driver) and \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a57f1b5_45a28ffe","line":55,"in_reply_to":"3a57f1b5_e7238356","updated":"2016-02-12 16:26:08.000000000","message":"yes, I will add it","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2ce889fbf6ed610558a69338cd9600e0bbb1cf1d","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    node_attr \u003d _extract_node_attributes(introspection_data)"},{"line_number":57,"context_line":"    node_driver \u003d CONF.enroll_hook.enroll_node_driver"},{"line_number":58,"context_line":"    LOG.debug(\u0027Creating discovered node with driver\u003d%(driver) and \u0027"},{"line_number":59,"context_line":"              \u0027attributes: %(attr)\u0027, driver\u003dnode_driver, attr\u003dnode_attr,"},{"line_number":60,"context_line":"              data\u003dintrospection_data)"},{"line_number":61,"context_line":"    return node_cache.create_node(node_driver, node_attr)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a57f1b5_0729ff36","line":59,"updated":"2016-02-12 16:00:27.000000000","message":"this should be a dict\n\n {\u0027driver\u0027: .., \u0027attr\u0027: node_attr}, data\u003dintrospection_data)\n\notherwise driver and attr fields are sent to the logging context, not formatted.\n\nalso you have typos in formatting: %(driver)s not %(driver)","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c400cf1fa9705a0f664e4e912d83639153c6362b","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    node_attr \u003d _extract_node_attributes(introspection_data)"},{"line_number":57,"context_line":"    node_driver \u003d CONF.enroll_hook.enroll_node_driver"},{"line_number":58,"context_line":"    LOG.debug(\u0027Creating discovered node with driver\u003d%(driver) and \u0027"},{"line_number":59,"context_line":"              \u0027attributes: %(attr)\u0027, driver\u003dnode_driver, attr\u003dnode_attr,"},{"line_number":60,"context_line":"              data\u003dintrospection_data)"},{"line_number":61,"context_line":"    return node_cache.create_node(node_driver, node_attr)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a57f1b5_057fb766","line":59,"in_reply_to":"3a57f1b5_0729ff36","updated":"2016-02-12 16:26:08.000000000","message":"ahh yep, thanks, not tested it yet","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"}],"ironic_inspector/rules.py":[{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"c666f1e1d52a509f4fde29733fba942c4d2ea875","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        \"\"\"Check if conditions are true for a given node."},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        :param node_info: a NodeInfo object"},{"line_number":128,"context_line":"        :param data: introspection data"},{"line_number":129,"context_line":"        :returns: True if conditions match, otherwise False"},{"line_number":130,"context_line":"        \"\"\""},{"line_number":131,"context_line":"        LOG.debug(\u0027Checking rule \"%(descr)s\" on node %(uuid)s\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_61017a39","line":128,"updated":"2016-01-26 09:35:58.000000000","message":"please update the docstring as well","commit_id":"cc4ab1dbf769499e480646dded485b7801628fc5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"90700d294dcd408971fdebb3ce979886154f5847","unresolved":false,"context_lines":[{"line_number":137,"context_line":"            field \u003d cond.field"},{"line_number":138,"context_line":"            data \u003d introspection_data"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"            if field.startswith(\u0027node.\u0027):"},{"line_number":141,"context_line":"                data \u003d node_info.node().to_dict()"},{"line_number":142,"context_line":"                field \u003d field[5:]"},{"line_number":143,"context_line":"            elif field.startswith(\u0027data.\u0027):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_ac8a7d19","line":140,"updated":"2016-01-22 16:22:40.000000000","message":"looks like we agreed to use \u0027node://\u0027 and \u0027data://\u0027","commit_id":"cc4ab1dbf769499e480646dded485b7801628fc5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"90700d294dcd408971fdebb3ce979886154f5847","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            data \u003d introspection_data"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"            if field.startswith(\u0027node.\u0027):"},{"line_number":141,"context_line":"                data \u003d node_info.node().to_dict()"},{"line_number":142,"context_line":"                field \u003d field[5:]"},{"line_number":143,"context_line":"            elif field.startswith(\u0027data.\u0027):"},{"line_number":144,"context_line":"                data \u003d introspection_data"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_cc8fb128","line":141,"updated":"2016-01-22 16:22:40.000000000","message":"nit: or you can use node_info.get_by_path to support nested properties, but it will be a different format","commit_id":"cc4ab1dbf769499e480646dded485b7801628fc5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"90700d294dcd408971fdebb3ce979886154f5847","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                 {\u0027rule\u0027: self.description, \u0027uuid\u0027: node_info.uuid})"},{"line_number":184,"context_line":"        return True"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def apply_actions(self, node_info, rollback\u003dFalse, data\u003dNone):"},{"line_number":187,"context_line":"        \"\"\"Run actions on a node."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        :param node_info: NodeInfo instance"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_6c8005f8","line":186,"updated":"2016-01-22 16:22:40.000000000","message":"this change was already done in master, please rebase","commit_id":"cc4ab1dbf769499e480646dded485b7801628fc5"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"dc4deb5951245c4b129263a8e039e0922c912bf5","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                 {\u0027rule\u0027: self.description, \u0027uuid\u0027: node_info.uuid})"},{"line_number":184,"context_line":"        return True"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def apply_actions(self, node_info, rollback\u003dFalse, data\u003dNone):"},{"line_number":187,"context_line":"        \"\"\"Run actions on a node."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        :param node_info: NodeInfo instance"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_afc90f28","line":186,"in_reply_to":"9a68dd71_6c8005f8","updated":"2016-01-22 16:45:48.000000000","message":"yeah, I\u0027m on last year env:), I need new one","commit_id":"cc4ab1dbf769499e480646dded485b7801628fc5"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"c666f1e1d52a509f4fde29733fba942c4d2ea875","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        \"\"\"Run actions on a node."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        :param node_info: NodeInfo instance"},{"line_number":190,"context_line":"        :param rollback: if True, rollback actions are executed"},{"line_number":191,"context_line":"        \"\"\""},{"line_number":192,"context_line":"        if rollback:"},{"line_number":193,"context_line":"            method \u003d \u0027rollback\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_c1b9467b","line":190,"updated":"2016-01-26 09:35:58.000000000","message":"same here","commit_id":"cc4ab1dbf769499e480646dded485b7801628fc5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"90700d294dcd408971fdebb3ce979886154f5847","unresolved":false,"context_lines":[{"line_number":207,"context_line":"                       \u0027node\u0027: node_info.uuid, \u0027what\u0027: method})"},{"line_number":208,"context_line":"            ext \u003d ext_mgr[act.action].obj"},{"line_number":209,"context_line":"            getattr(ext, method)(node_info, act.params,"},{"line_number":210,"context_line":"                                 introspection_data\u003ddata)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        LOG.debug(\u0027Successfully applied %(what)s to node %(node)s\u0027,"},{"line_number":213,"context_line":"                  {\u0027what\u0027: \u0027rollback actions\u0027 if rollback else \u0027actions\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_8c853908","line":210,"updated":"2016-01-22 16:22:40.000000000","message":"if I understand the latest discussion correctly, instead of extending the action interface with introspection_data, we want it to expose list of params to apply formatting to, right? These bits are missing from this patchset.","commit_id":"cc4ab1dbf769499e480646dded485b7801628fc5"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"dc4deb5951245c4b129263a8e039e0922c912bf5","unresolved":false,"context_lines":[{"line_number":207,"context_line":"                       \u0027node\u0027: node_info.uuid, \u0027what\u0027: method})"},{"line_number":208,"context_line":"            ext \u003d ext_mgr[act.action].obj"},{"line_number":209,"context_line":"            getattr(ext, method)(node_info, act.params,"},{"line_number":210,"context_line":"                                 introspection_data\u003ddata)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        LOG.debug(\u0027Successfully applied %(what)s to node %(node)s\u0027,"},{"line_number":213,"context_line":"                  {\u0027what\u0027: \u0027rollback actions\u0027 if rollback else \u0027actions\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_8f444b1b","line":210,"in_reply_to":"9a68dd71_8c853908","updated":"2016-01-22 16:45:48.000000000","message":"yep, we don\u0027t need extending interface, we can pass params with formatted value, also I think about verifying provided attributes on import rule time, wdyt?","commit_id":"cc4ab1dbf769499e480646dded485b7801628fc5"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"0895b2a414b30cd393554e8aa170bef5fd1d4bbc","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            if act.params.get(\u0027value\u0027):"},{"line_number":201,"context_line":"                # NOTE(aarefiev): verify provided value with introspection"},{"line_number":202,"context_line":"                # data format specifications."},{"line_number":203,"context_line":"                # TODO: simple verify on import rule time."},{"line_number":204,"context_line":"                try:"},{"line_number":205,"context_line":"                    act.params[\u0027value\u0027] \u003d act.params[\u0027value\u0027].format(data\u003ddata)"},{"line_number":206,"context_line":"                except KeyError as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_d4794f83","line":203,"range":{"start_line":203,"start_character":18,"end_line":203,"end_character":22},"updated":"2016-02-01 06:59:14.000000000","message":"Please write like TODO(aarefiev): ...","commit_id":"346127adc135ea21528c34852780b3b88eb38223"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0aefe713b7e085cc2bd6c3c88df975cddbd40666","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            # introspection data and node info respectively. If scheme is"},{"line_number":137,"context_line":"            # missing, field is JSON path(kept for backward compatibility)"},{"line_number":138,"context_line":"            parts \u003d urlparse.urlparse(cond.field)"},{"line_number":139,"context_line":"            path \u003d \u0027\u0027.join(parts[1:])"},{"line_number":140,"context_line":"            if parts.scheme \u003d\u003d \u0027node\u0027:"},{"line_number":141,"context_line":"                field_values \u003d [node_info.get_by_path(path)]"},{"line_number":142,"context_line":"            elif parts.scheme \u003d\u003d \u0027data\u0027 or parts.scheme \u003d\u003d \u0027\u0027:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_49ad1830","line":139,"updated":"2016-02-04 17:16:18.000000000","message":"looks a bit too complex to me, and I\u0027m not sure if urlparse can fail on some tricky JSON paths. I would simply do:\n\n try:\n   index \u003d cond.field.index(\u0027://\u0027)\n except ValueError:\n   scheme \u003d \u0027data\u0027\n   path \u003d cond.field\n else:\n   scheme \u003d cond.field[:index]\n   path \u003d cond.field[index + 3:]","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e935d29092e78f05160c891911af4f67e847a1e","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            # introspection data and node info respectively. If scheme is"},{"line_number":137,"context_line":"            # missing, field is JSON path(kept for backward compatibility)"},{"line_number":138,"context_line":"            parts \u003d urlparse.urlparse(cond.field)"},{"line_number":139,"context_line":"            path \u003d \u0027\u0027.join(parts[1:])"},{"line_number":140,"context_line":"            if parts.scheme \u003d\u003d \u0027node\u0027:"},{"line_number":141,"context_line":"                field_values \u003d [node_info.get_by_path(path)]"},{"line_number":142,"context_line":"            elif parts.scheme \u003d\u003d \u0027data\u0027 or parts.scheme \u003d\u003d \u0027\u0027:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_324b492c","line":139,"in_reply_to":"5a5ae5dd_49ad1830","updated":"2016-02-05 08:46:08.000000000","message":"Agree, lets make it as simple as possible.","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0aefe713b7e085cc2bd6c3c88df975cddbd40666","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                # convert to JSON Path notation"},{"line_number":144,"context_line":"                path \u003d path.rstrip(\u0027/\u0027).replace(\u0027/\u0027, \u0027.\u0027)"},{"line_number":145,"context_line":"                field_values \u003d jsonpath.parse(path).find(data)"},{"line_number":146,"context_line":"                field_values \u003d [x.value for x in field_values]"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"            cond_ext \u003d ext_mgr[cond.op].obj"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_e9aba41b","line":146,"updated":"2016-02-04 17:16:18.000000000","message":"lets just accept JSON path. it will be less consistent with node:// but we won\u0027t be limiting a user artificially (and it will be consistent with node using a scheme)","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"024a97f31c30b1563e4310309e1b6ffe29661809","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                # convert to JSON Path notation"},{"line_number":144,"context_line":"                path \u003d path.rstrip(\u0027/\u0027).replace(\u0027/\u0027, \u0027.\u0027)"},{"line_number":145,"context_line":"                field_values \u003d jsonpath.parse(path).find(data)"},{"line_number":146,"context_line":"                field_values \u003d [x.value for x in field_values]"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"            cond_ext \u003d ext_mgr[cond.op].obj"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_ed9ab06d","line":146,"in_reply_to":"5a5ae5dd_2ddd286f","updated":"2016-02-05 09:01:54.000000000","message":"ok","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d9911aa38b783f02f443eb826034bd38b3e769ec","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                # convert to JSON Path notation"},{"line_number":144,"context_line":"                path \u003d path.rstrip(\u0027/\u0027).replace(\u0027/\u0027, \u0027.\u0027)"},{"line_number":145,"context_line":"                field_values \u003d jsonpath.parse(path).find(data)"},{"line_number":146,"context_line":"                field_values \u003d [x.value for x in field_values]"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"            cond_ext \u003d ext_mgr[cond.op].obj"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_2ddd286f","line":146,"in_reply_to":"5a5ae5dd_32c4a98f","updated":"2016-02-05 08:55:55.000000000","message":"I\u0027m fine with that essentially, but please remove the \"keep for backward compatibility\" comment above on line 137 then - these are two different features.","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e935d29092e78f05160c891911af4f67e847a1e","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                # convert to JSON Path notation"},{"line_number":144,"context_line":"                path \u003d path.rstrip(\u0027/\u0027).replace(\u0027/\u0027, \u0027.\u0027)"},{"line_number":145,"context_line":"                field_values \u003d jsonpath.parse(path).find(data)"},{"line_number":146,"context_line":"                field_values \u003d [x.value for x in field_values]"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"            cond_ext \u003d ext_mgr[cond.op].obj"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_32c4a98f","line":146,"in_reply_to":"5a5ae5dd_e9aba41b","updated":"2016-02-05 08:46:08.000000000","message":"Not get your point, why not support both approaches, imo classic path looks better for new users. So we will have 3 options here:\nold one:\n    \"inventory.bmc_address\"\nnew:\n    node://inventory.bmc_address\n    node://inventory/bmc_address\nwdyt?","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0aefe713b7e085cc2bd6c3c88df975cddbd40666","unresolved":false,"context_lines":[{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        ext_mgr \u003d plugins_base.rule_actions_manager()"},{"line_number":199,"context_line":"        for act in self._actions:"},{"line_number":200,"context_line":"            if act.params.get(\u0027value\u0027):"},{"line_number":201,"context_line":"                # NOTE(aarefiev): verify provided value with introspection"},{"line_number":202,"context_line":"                # data format specifications."},{"line_number":203,"context_line":"                # TODO(aarefiev): simple verify on import rule time."}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_09a72050","line":200,"updated":"2016-02-04 17:16:18.000000000","message":"this \"value\" thing should come from an extension itself, not be hardcoded here. we can use it as a default in the base extension class though","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e935d29092e78f05160c891911af4f67e847a1e","unresolved":false,"context_lines":[{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        ext_mgr \u003d plugins_base.rule_actions_manager()"},{"line_number":199,"context_line":"        for act in self._actions:"},{"line_number":200,"context_line":"            if act.params.get(\u0027value\u0027):"},{"line_number":201,"context_line":"                # NOTE(aarefiev): verify provided value with introspection"},{"line_number":202,"context_line":"                # data format specifications."},{"line_number":203,"context_line":"                # TODO(aarefiev): simple verify on import rule time."}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_b2f5f957","line":200,"in_reply_to":"5a5ae5dd_09a72050","updated":"2016-02-05 08:46:08.000000000","message":"Could you clarify here, please. What do you mean come from an extension","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d9911aa38b783f02f443eb826034bd38b3e769ec","unresolved":false,"context_lines":[{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        ext_mgr \u003d plugins_base.rule_actions_manager()"},{"line_number":199,"context_line":"        for act in self._actions:"},{"line_number":200,"context_line":"            if act.params.get(\u0027value\u0027):"},{"line_number":201,"context_line":"                # NOTE(aarefiev): verify provided value with introspection"},{"line_number":202,"context_line":"                # data format specifications."},{"line_number":203,"context_line":"                # TODO(aarefiev): simple verify on import rule time."}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_cd6a5481","line":200,"in_reply_to":"5a5ae5dd_b2f5f957","updated":"2016-02-05 08:55:55.000000000","message":"So, the \"value\" constant here is not defined anywhere. It should be something like:\n\n for formatted_param in ext.FORMATTED_PARAMS:\n   value \u003d act.params.get(formatter_param)\n   if not value:\n     continue\n   try:\n      ....\n\nthis FORMATTED_PARAMS thing will be a new list on the BaseAction object.","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"024a97f31c30b1563e4310309e1b6ffe29661809","unresolved":false,"context_lines":[{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        ext_mgr \u003d plugins_base.rule_actions_manager()"},{"line_number":199,"context_line":"        for act in self._actions:"},{"line_number":200,"context_line":"            if act.params.get(\u0027value\u0027):"},{"line_number":201,"context_line":"                # NOTE(aarefiev): verify provided value with introspection"},{"line_number":202,"context_line":"                # data format specifications."},{"line_number":203,"context_line":"                # TODO(aarefiev): simple verify on import rule time."}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_ade4b8e0","line":200,"in_reply_to":"5a5ae5dd_cd6a5481","updated":"2016-02-05 09:01:54.000000000","message":"oh, you mean value \"value\":), I get it, will add, thanks for clarification.","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0aefe713b7e085cc2bd6c3c88df975cddbd40666","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    for cond_json in conditions_json:"},{"line_number":259,"context_line":"        field \u003d cond_json[\u0027field\u0027]"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        url_parts \u003d urlparse.urlparse(field)"},{"line_number":262,"context_line":"        if url_parts.scheme \u003d\u003d \u0027\u0027:"},{"line_number":263,"context_line":"            # verify field as JSON path"},{"line_number":264,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_a964cc21","line":261,"updated":"2016-02-04 17:16:18.000000000","message":"ditto about parsing","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0cea4c08dfcd1fd0664aeaa791cf07e82f2c4b9b","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                    act.params[formatted_param] \u003d value.format(data\u003ddata)"},{"line_number":205,"context_line":"                except KeyError as e:"},{"line_number":206,"context_line":"                    raise utils.Error(_(\u0027Invalid introspection key provided: \u0027"},{"line_number":207,"context_line":"                                        \u0027%s\u0027) % e.args[0])"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"            LOG.debug(\u0027Running %(what)s action `%(action)s %(params)s`\u0027,"},{"line_number":210,"context_line":"                      {\u0027action\u0027: act.action, \u0027params\u0027: act.params,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a57f1b5_1add26e0","line":207,"updated":"2016-02-11 10:44:21.000000000","message":"please add node_info\u003dnode_info, data\u003ddata arguments to Error constructor for context","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"2881bf04a694a1c52d6cee0805832a9ba479f948","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                    act.params[formatted_param] \u003d value.format(data\u003ddata)"},{"line_number":205,"context_line":"                except KeyError as e:"},{"line_number":206,"context_line":"                    raise utils.Error(_(\u0027Invalid introspection key provided: \u0027"},{"line_number":207,"context_line":"                                        \u0027%s\u0027) % e.args[0])"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"            LOG.debug(\u0027Running %(what)s action `%(action)s %(params)s`\u0027,"},{"line_number":210,"context_line":"                      {\u0027action\u0027: act.action, \u0027params\u0027: act.params,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a57f1b5_456f3ac5","line":207,"in_reply_to":"3a57f1b5_1add26e0","updated":"2016-02-11 13:22:11.000000000","message":"ok","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0cea4c08dfcd1fd0664aeaa791cf07e82f2c4b9b","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        path \u003d path[index + 3:]"},{"line_number":238,"context_line":"        if scheme \u003d\u003d \u0027data\u0027:"},{"line_number":239,"context_line":"            # convert to JSON Path notation"},{"line_number":240,"context_line":"            path \u003d path.rstrip(\u0027/\u0027).replace(\u0027/\u0027, \u0027.\u0027)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    return scheme, path"},{"line_number":243,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a57f1b5_3ad822ef","line":240,"updated":"2016-02-11 10:44:21.000000000","message":"So, I still disagree here. Imagine we have the following path data://properties/my.property. People would assume it will fetch data[properties][my.property], while in reality it will be data[properties][my][property]. Actually all special symbols from JSON path can be met..\n\nIf you want consistency between data:// and path:// then we might really convert ironic node to dict and use JSON path there too (I think you had it at one stage, right?)\n\nIf we do that, we can really deprecate not using schema..","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ab09eacc8fd7ef2eccfc624bf70ffa354b2dcc95","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        path \u003d path[index + 3:]"},{"line_number":238,"context_line":"        if scheme \u003d\u003d \u0027data\u0027:"},{"line_number":239,"context_line":"            # convert to JSON Path notation"},{"line_number":240,"context_line":"            path \u003d path.rstrip(\u0027/\u0027).replace(\u0027/\u0027, \u0027.\u0027)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    return scheme, path"},{"line_number":243,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a57f1b5_71ef9487","line":240,"in_reply_to":"3a57f1b5_2bda0f79","updated":"2016-02-11 13:55:04.000000000","message":"Not required, we can think about deprecation later, if we want.","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"2881bf04a694a1c52d6cee0805832a9ba479f948","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        path \u003d path[index + 3:]"},{"line_number":238,"context_line":"        if scheme \u003d\u003d \u0027data\u0027:"},{"line_number":239,"context_line":"            # convert to JSON Path notation"},{"line_number":240,"context_line":"            path \u003d path.rstrip(\u0027/\u0027).replace(\u0027/\u0027, \u0027.\u0027)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    return scheme, path"},{"line_number":243,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a57f1b5_2bda0f79","line":240,"in_reply_to":"3a57f1b5_3ad822ef","updated":"2016-02-11 13:22:11.000000000","message":"ok,  simple - less bugs :)\nSo we use JSON path everywhere:\n\nnode://property.path\ndata://introspection.path\nintrospection.path\n\nAbout deprecation \u0027introspection.path\u0027 I\u0027m not sure, should we?","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"6e38a6c14cf1329f886e953e02b01b9a1c462cb7","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        path \u003d path[index + 3:]"},{"line_number":238,"context_line":"        if scheme \u003d\u003d \u0027data\u0027:"},{"line_number":239,"context_line":"            # convert to JSON Path notation"},{"line_number":240,"context_line":"            path \u003d path.rstrip(\u0027/\u0027).replace(\u0027/\u0027, \u0027.\u0027)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    return scheme, path"},{"line_number":243,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a57f1b5_d102080b","line":240,"in_reply_to":"3a57f1b5_71ef9487","updated":"2016-02-11 13:58:23.000000000","message":"ok","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2ce889fbf6ed610558a69338cd9600e0bbb1cf1d","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            scheme, path \u003d _parse_path(cond.field)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"            if scheme \u003d\u003d \u0027node\u0027:"},{"line_number":137,"context_line":"                source_data \u003d node_info.node_to_dict()"},{"line_number":138,"context_line":"            elif scheme \u003d\u003d \u0027data\u0027:"},{"line_number":139,"context_line":"                source_data \u003d data"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a57f1b5_6718f31e","line":137,"updated":"2016-02-12 16:00:27.000000000","message":"not any better than just node().to_dict()","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"91bc89ceca81d3da4ba939e662ba9f7f9851a907","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        try:"},{"line_number":289,"context_line":"            jsonpath.parse(path)"},{"line_number":290,"context_line":"        except Exception as exc:"},{"line_number":291,"context_line":"            raise utils.Error("},{"line_number":292,"context_line":"                _(\u0027Unable to parse field JSON path %(field)s: \u0027"},{"line_number":293,"context_line":"                  \u0027%(error)s\u0027) % {\u0027field\u0027: field, \u0027error\u0027: exc})"},{"line_number":294,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a57f1b5_690e963c","line":291,"range":{"start_line":291,"start_character":29,"end_line":291,"end_character":30},"updated":"2016-02-12 13:03:32.000000000","message":"hmm, unintentional change","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"68340a3470aed228f5b0b88404bc28e61d7779db","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                try:"},{"line_number":205,"context_line":"                    act.params[formatted_param] \u003d value.format(data\u003ddata)"},{"line_number":206,"context_line":"                except KeyError as e:"},{"line_number":207,"context_line":"                    raise utils.Error(_(\u0027Invalid introspection key provided: \u0027"},{"line_number":208,"context_line":"                                        \u0027%s\u0027) % e.args[0],"},{"line_number":209,"context_line":"                                      node_info\u003dnode_info, data\u003ddata)"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"dae33548_ec6a52ec","line":207,"updated":"2016-02-17 16:32:44.000000000","message":"maybe s/introspection key/formatting variable key/ ? dunno what\u0027s better, but \"introspection key\" does not look clear to me","commit_id":"27940b27d53b6e225d088140d839654f46588838"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"68340a3470aed228f5b0b88404bc28e61d7779db","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                    act.params[formatted_param] \u003d value.format(data\u003ddata)"},{"line_number":206,"context_line":"                except KeyError as e:"},{"line_number":207,"context_line":"                    raise utils.Error(_(\u0027Invalid introspection key provided: \u0027"},{"line_number":208,"context_line":"                                        \u0027%s\u0027) % e.args[0],"},{"line_number":209,"context_line":"                                      node_info\u003dnode_info, data\u003ddata)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"            LOG.debug(\u0027Running %(what)s action `%(action)s %(params)s`\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"dae33548_cc6f8efa","line":208,"updated":"2016-02-17 16:32:44.000000000","message":"just use e, .args[0] is not needed","commit_id":"27940b27d53b6e225d088140d839654f46588838"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"324d414cc2f0518fd69367975e4342df6ee0d897","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                    continue"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"                # NOTE(aarefiev): verify provided value with introspection"},{"line_number":202,"context_line":"                # data format specifications."},{"line_number":203,"context_line":"                # TODO(aarefiev): simple verify on import rule time."},{"line_number":204,"context_line":"                try:"},{"line_number":205,"context_line":"                    act.params[formatted_param] \u003d value.format(data\u003ddata)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_d2b98230","line":202,"range":{"start_line":202,"start_character":18,"end_line":202,"end_character":44},"updated":"2016-02-19 13:23:32.000000000","message":"nit: formatting could have been improved but not a big deal","commit_id":"bf86545ca46cd5d33cb31e207fd276948e54ff1c"}],"ironic_inspector/test/functional.py":[{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"0895b2a414b30cd393554e8aa170bef5fd1d4bbc","unresolved":false,"context_lines":[{"line_number":341,"context_line":"        rules \u003d ["},{"line_number":342,"context_line":"            {"},{"line_number":343,"context_line":"                \u0027conditions\u0027: ["},{"line_number":344,"context_line":"                    {\u0027field\u0027: \u0027node://properties/local_gb\u0027, \u0027op\u0027: \u0027eq\u0027, \u0027value\u0027: 40},"},{"line_number":345,"context_line":"                    {\u0027field\u0027: \u0027node://driver_info/ipmi_address\u0027, \u0027op\u0027: \u0027eq\u0027,"},{"line_number":346,"context_line":"                     \u0027value\u0027: self.bmc_address},"},{"line_number":347,"context_line":"                ],"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_142e0743","line":344,"range":{"start_line":344,"start_character":71,"end_line":344,"end_character":72},"updated":"2016-02-01 06:59:14.000000000","message":"You need to split with newlines","commit_id":"346127adc135ea21528c34852780b3b88eb38223"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"0895b2a414b30cd393554e8aa170bef5fd1d4bbc","unresolved":false,"context_lines":[{"line_number":356,"context_line":"                     \u0027value\u0027: self.data[\u0027inventory\u0027][\u0027cpu\u0027][\u0027count\u0027]},"},{"line_number":357,"context_line":"                ],"},{"line_number":358,"context_line":"                \u0027actions\u0027: ["},{"line_number":359,"context_line":"                    {\u0027action\u0027: \u0027set-attribute\u0027, \u0027path\u0027: \u0027/driver_info/ipmi_address\u0027,"},{"line_number":360,"context_line":"                        \u0027value\u0027: \u0027{data[inventory][bmc_address]}\u0027}"},{"line_number":361,"context_line":"                ]"},{"line_number":362,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_343303ad","line":359,"range":{"start_line":359,"start_character":82,"end_line":359,"end_character":84},"updated":"2016-02-01 06:59:14.000000000","message":"ditto","commit_id":"346127adc135ea21528c34852780b3b88eb38223"}],"ironic_inspector/test/test_node_cache.py":[{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"0895b2a414b30cd393554e8aa170bef5fd1d4bbc","unresolved":false,"context_lines":[{"line_number":646,"context_line":"        self.assertTrue(node_info._locked)"},{"line_number":647,"context_line":"        get_lock_mock.return_value.acquire.assert_called_with(False)"},{"line_number":648,"context_line":"        self.assertEqual(2, get_lock_mock.return_value.acquire.call_count)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"@mock.patch.object(node_cache, \u0027add_node\u0027, autospec\u003dTrue)"},{"line_number":651,"context_line":"@mock.patch.object(utils, \u0027get_client\u0027, autospec\u003dTrue)"},{"line_number":652,"context_line":"class TestNodeCreate(test_base.NodeTest):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_14912747","line":649,"range":{"start_line":649,"start_character":0,"end_line":649,"end_character":0},"updated":"2016-02-01 06:59:14.000000000","message":"One more blank line is required","commit_id":"346127adc135ea21528c34852780b3b88eb38223"}],"ironic_inspector/test/test_plugins_discovery.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2ce889fbf6ed610558a69338cd9600e0bbb1cf1d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Red Hat, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a57f1b5_6701d3ae","line":1,"updated":"2016-02-12 16:00:27.000000000","message":"IIRC you\u0027re not from Red Hat :)","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c400cf1fa9705a0f664e4e912d83639153c6362b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Red Hat, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a57f1b5_85e2c72d","line":1,"in_reply_to":"3a57f1b5_6701d3ae","updated":"2016-02-12 16:26:08.000000000","message":"copy-paste issue :)","commit_id":"b2b5e11aa521a77b846adda8cf51b3b464fd151c"}],"ironic_inspector/test/test_rules.py":[{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"0895b2a414b30cd393554e8aa170bef5fd1d4bbc","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from ironic_inspector import db"},{"line_number":20,"context_line":"from ironic_inspector import node_cache"},{"line_number":21,"context_line":"from ironic_inspector.plugins import base as plugins_base"},{"line_number":22,"context_line":"from ironic_inspector import rules"},{"line_number":23,"context_line":"from ironic_inspector.test import base as test_base"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_d4a86f8e","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":39},"updated":"2016-02-01 06:59:14.000000000","message":"Here is no longer needed","commit_id":"346127adc135ea21528c34852780b3b88eb38223"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"0895b2a414b30cd393554e8aa170bef5fd1d4bbc","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                                actions_json\u003dself.actions_json)"},{"line_number":354,"context_line":"            self.assertIs(res,"},{"line_number":355,"context_line":"                          rule.check_conditions(self.node_info, self.data))"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"@mock.patch.object(plugins_base, \u0027rule_actions_manager\u0027, autospec\u003dTrue)"},{"line_number":358,"context_line":"class TestApplyActions(BaseTest):"},{"line_number":359,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_148a871b","line":356,"range":{"start_line":356,"start_character":0,"end_line":356,"end_character":0},"updated":"2016-02-01 06:59:14.000000000","message":"One more blank line is required","commit_id":"346127adc135ea21528c34852780b3b88eb38223"}],"ironic_inspector/utils.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"90700d294dcd408971fdebb3ce979886154f5847","unresolved":false,"context_lines":[{"line_number":36,"context_line":"GREEN_POOL \u003d None"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"# 1.11 is API version, which support \u0027enroll\u0027 state"},{"line_number":39,"context_line":"DEFAULT_IRONIC_API_VERSION \u003d \u00271.11\u0027"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class Error(Exception):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_2c98cd77","line":39,"updated":"2016-01-22 16:22:40.000000000","message":"please update http://docs.openstack.org/developer/ironic-inspector/install.html#version-support-matrix, it still mentions 1.6","commit_id":"cc4ab1dbf769499e480646dded485b7801628fc5"}],"releasenotes/notes/auto-discovery-9a9d38701e970611.yaml":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0aefe713b7e085cc2bd6c3c88df975cddbd40666","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Add new node_not_found hook - discovery, which allow to automatically"},{"line_number":4,"context_line":"    enroll Ironic\u0027s node. Also extend conditions to support fields from"},{"line_number":5,"context_line":"    node info and actions fetch values from introspection data."},{"line_number":6,"context_line":"    See http://docs.openstack.org/developer/ironic-inspector/usage.html#introspection-rules"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5a5ae5dd_29b21c95","line":6,"updated":"2016-02-04 17:16:18.000000000","message":"these should be 2 separate features + please add an upgrade note about switching to API 1.11","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e935d29092e78f05160c891911af4f67e847a1e","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Add new node_not_found hook - discovery, which allow to automatically"},{"line_number":4,"context_line":"    enroll Ironic\u0027s node. Also extend conditions to support fields from"},{"line_number":5,"context_line":"    node info and actions fetch values from introspection data."},{"line_number":6,"context_line":"    See http://docs.openstack.org/developer/ironic-inspector/usage.html#introspection-rules"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5a5ae5dd_325ee944","line":6,"in_reply_to":"5a5ae5dd_29b21c95","updated":"2016-02-05 08:46:08.000000000","message":"ahh,I forgot add about API 1.11\nSo, it should be 2 separate notes, and one with 2 features section, am I right?","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d9911aa38b783f02f443eb826034bd38b3e769ec","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Add new node_not_found hook - discovery, which allow to automatically"},{"line_number":4,"context_line":"    enroll Ironic\u0027s node. Also extend conditions to support fields from"},{"line_number":5,"context_line":"    node info and actions fetch values from introspection data."},{"line_number":6,"context_line":"    See http://docs.openstack.org/developer/ironic-inspector/usage.html#introspection-rules"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5a5ae5dd_6d29e036","line":6,"in_reply_to":"5a5ae5dd_325ee944","updated":"2016-02-05 08:55:55.000000000","message":"It can be done in one note:\n\n ---\n upgrade:\n  - upgrade note\n features:\n  - feature 1\n  - feature 2","commit_id":"b04737acffb09d6f182916137fb512fdb0dd906e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0cea4c08dfcd1fd0664aeaa791cf07e82f2c4b9b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - Switch default Ironic API version to \u00271.11\u0027,  which supports \u0027enroll\u0027 state."},{"line_number":4,"context_line":"features:"},{"line_number":5,"context_line":"  - Add new node_not_found hook - discovery, which allow to automatically"},{"line_number":6,"context_line":"    enroll Ironic\u0027s node."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"3a57f1b5_dafd4e3b","line":3,"updated":"2016-02-11 10:44:21.000000000","message":"s/default/required/","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0cea4c08dfcd1fd0664aeaa791cf07e82f2c4b9b","unresolved":false,"context_lines":[{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - Switch default Ironic API version to \u00271.11\u0027,  which supports \u0027enroll\u0027 state."},{"line_number":4,"context_line":"features:"},{"line_number":5,"context_line":"  - Add new node_not_found hook - discovery, which allow to automatically"},{"line_number":6,"context_line":"    enroll Ironic\u0027s node."},{"line_number":7,"context_line":"  - Extend conditions to support fields from node info and actions fetch values from"},{"line_number":8,"context_line":"    introspection data."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"3a57f1b5_faf84a4b","line":5,"updated":"2016-02-11 10:44:21.000000000","message":"s/allow/allows/","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"}],"releasenotes/notes/extend-rules-9a9d38701e970611.yaml":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"68340a3470aed228f5b0b88404bc28e61d7779db","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Extend conditions to support fields from node info and actions fetch values from"},{"line_number":4,"context_line":"    introspection data."},{"line_number":5,"context_line":"    See http://docs.openstack.org/developer/ironic-inspector/usage.html#introspection-rules"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"dae33548_2c79dac8","line":5,"updated":"2016-02-17 16:32:44.000000000","message":"one more feature to add is about actions supporting formatting","commit_id":"27940b27d53b6e225d088140d839654f46588838"}],"setup.cfg":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0cea4c08dfcd1fd0664aeaa791cf07e82f2c4b9b","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    root_device_hint \u003d ironic_inspector.plugins.raid_device:RaidDeviceDetection"},{"line_number":36,"context_line":"ironic_inspector.hooks.node_not_found \u003d"},{"line_number":37,"context_line":"    example \u003d ironic_inspector.plugins.example:example_not_found_hook"},{"line_number":38,"context_line":"    discovery \u003d ironic_inspector.plugins.discovery:enroll_node_not_found_hook"},{"line_number":39,"context_line":"ironic_inspector.rules.conditions \u003d"},{"line_number":40,"context_line":"    eq \u003d ironic_inspector.plugins.rules:EqCondition"},{"line_number":41,"context_line":"    lt \u003d ironic_inspector.plugins.rules:LtCondition"}],"source_content_type":"text/x-ttcn-cfg","patch_set":8,"id":"3a57f1b5_7ad53ab7","line":38,"updated":"2016-02-11 10:44:21.000000000","message":"what about calling the hook \"enroll\"?","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"2881bf04a694a1c52d6cee0805832a9ba479f948","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    root_device_hint \u003d ironic_inspector.plugins.raid_device:RaidDeviceDetection"},{"line_number":36,"context_line":"ironic_inspector.hooks.node_not_found \u003d"},{"line_number":37,"context_line":"    example \u003d ironic_inspector.plugins.example:example_not_found_hook"},{"line_number":38,"context_line":"    discovery \u003d ironic_inspector.plugins.discovery:enroll_node_not_found_hook"},{"line_number":39,"context_line":"ironic_inspector.rules.conditions \u003d"},{"line_number":40,"context_line":"    eq \u003d ironic_inspector.plugins.rules:EqCondition"},{"line_number":41,"context_line":"    lt \u003d ironic_inspector.plugins.rules:LtCondition"}],"source_content_type":"text/x-ttcn-cfg","patch_set":8,"id":"3a57f1b5_6b5c87ed","line":38,"in_reply_to":"3a57f1b5_7ad53ab7","updated":"2016-02-11 13:22:11.000000000","message":"sure","commit_id":"1db6b76fe5c12b700e98a44364899ddfa447b4d1"}]}
