)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"18a8dde56aa905433de5f8d8be262e90229840d3","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Added scope to introspection rules."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Added \u0027scope\u0027 property to IntrospectionRule and logic to check if a node falls in the same scope."},{"line_number":10,"context_line":"This allows introspection rules to be applied on selected nodes instead of every one on them."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Story: #2006995"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3fa7e38b_601ebdbd","line":9,"updated":"2020-01-14 10:07:25.000000000","message":"please respect the limit of 80 characters per line","commit_id":"ac2a454a3ba7fd4eacac6fe4576459bd98046fc2"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"18a8dde56aa905433de5f8d8be262e90229840d3","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Added scope to introspection rules."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Added \u0027scope\u0027 property to IntrospectionRule and logic to check if a node falls in the same scope."},{"line_number":10,"context_line":"This allows introspection rules to be applied on selected nodes instead of every one on them."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Story: #2006995"},{"line_number":13,"context_line":"Change-Id: I77034f032ea0ec16886afdd928546eb801f7a90a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3fa7e38b_807c19eb","line":10,"range":{"start_line":10,"start_character":85,"end_line":10,"end_character":87},"updated":"2020-01-14 10:07:25.000000000","message":"nit: of","commit_id":"ac2a454a3ba7fd4eacac6fe4576459bd98046fc2"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"18a8dde56aa905433de5f8d8be262e90229840d3","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Added \u0027scope\u0027 property to IntrospectionRule and logic to check if a node falls in the same scope."},{"line_number":10,"context_line":"This allows introspection rules to be applied on selected nodes instead of every one on them."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Story: #2006995"},{"line_number":13,"context_line":"Change-Id: I77034f032ea0ec16886afdd928546eb801f7a90a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3fa7e38b_a08115c5","line":12,"updated":"2020-01-14 10:07:25.000000000","message":"nit: missing Task number","commit_id":"ac2a454a3ba7fd4eacac6fe4576459bd98046fc2"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"2746c3910a630b72b2e029fd96d1a80ecb91e203","unresolved":false,"context_lines":[{"line_number":11,"context_line":"selected nodes instead of every one of them."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Story: #2006995"},{"line_number":14,"context_line":"Task:  #37763"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I77034f032ea0ec16886afdd928546eb801f7a90a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3fa7e38b_ef0a2327","line":14,"range":{"start_line":14,"start_character":7,"end_line":14,"end_character":13},"updated":"2020-02-10 05:57:07.000000000","message":"nit: the link doesn\u0027t show up, maybe need to remove the #.\n# is not required for story/task numbers.","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"},{"author":{"_account_id":31258,"name":"Zygimantas Matonis","email":"zygimantas.matonis@cern.ch","username":"gudrutis"},"change_message_id":"b15101e041cf9bfa57b78554f7e2c6ca6ee09990","unresolved":false,"context_lines":[{"line_number":11,"context_line":"selected nodes instead of every one of them."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Story: #2006995"},{"line_number":14,"context_line":"Task:  #37763"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I77034f032ea0ec16886afdd928546eb801f7a90a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3fa7e38b_9fa619bf","line":14,"range":{"start_line":14,"start_character":7,"end_line":14,"end_character":13},"in_reply_to":"3fa7e38b_ef0a2327","updated":"2020-02-12 12:59:19.000000000","message":"it was due to double space","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"}],"api-ref/source/introspection-api-v1-rules.inc":[{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"6c55a65cc80148df5f25db1950ad7755295d63ae","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    - conditions: conditions"},{"line_number":34,"context_line":"    - actions: actions"},{"line_number":35,"context_line":"    - description: description"},{"line_number":36,"context_line":"    - scope: scope"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"**Example creating rule request:**"}],"source_content_type":"text/x-c++src","patch_set":12,"id":"3fa7e38b_08c62e6a","line":36,"updated":"2020-02-17 01:38:50.000000000","message":"On current implementation, we only need to add this line, others are not implemented thus should be removed.\n\nIf you planned to do so, please check this method:\nhttps://opendev.org/openstack/ironic-inspector/src/commit/3d473dc2ea05bf2a474129480f3ad37de80806c6/ironic_inspector/rules.py#L111-L121\n\nI am also wondering do need CLI patch for this feature?","commit_id":"f9de5c6c92b6baf5beba9f3973591f66c0571875"},{"author":{"_account_id":31258,"name":"Zygimantas Matonis","email":"zygimantas.matonis@cern.ch","username":"gudrutis"},"change_message_id":"3722c7bf6afa35c532e090a5fd1c4d4678fbad91","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    - conditions: conditions"},{"line_number":34,"context_line":"    - actions: actions"},{"line_number":35,"context_line":"    - description: description"},{"line_number":36,"context_line":"    - scope: scope"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"**Example creating rule request:**"}],"source_content_type":"text/x-c++src","patch_set":12,"id":"3fa7e38b_79e52b3d","line":36,"in_reply_to":"3fa7e38b_08c62e6a","updated":"2020-02-17 16:45:04.000000000","message":"I think I already did that, have a look here \nhttps://review.opendev.org/#/c/702215/12/ironic_inspector/rules.py\n\nI tested REST API and CLI and see the results\nhttp://paste.openstack.org/show/789657/\nI assume that POST works as well since the \u0027scope\u0027 I successfully created rules with `scope` field.","commit_id":"f9de5c6c92b6baf5beba9f3973591f66c0571875"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"6c2c89e84ed9e3147a1722106c811481afc67dc6","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    - conditions: conditions"},{"line_number":34,"context_line":"    - actions: actions"},{"line_number":35,"context_line":"    - description: description"},{"line_number":36,"context_line":"    - scope: scope"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"**Example creating rule request:**"}],"source_content_type":"text/x-c++src","patch_set":12,"id":"3fa7e38b_bc24e7b2","line":36,"in_reply_to":"3fa7e38b_79e52b3d","updated":"2020-02-18 05:42:15.000000000","message":"\u003e I think I already did that, have a look here\n \u003e https://review.opendev.org/#/c/702215/12/ironic_inspector/rules.py\n\nOh, sorry I didn\u0027t notice the change there, because I was comparing patch set differences, you are right!\n\n \u003e I tested REST API and CLI and see the results\n \u003e http://paste.openstack.org/show/789657/\n \u003e I assume that POST works as well since the \u0027scope\u0027 I successfully\n \u003e created rules with `scope` field.\n\nIt appears the CLI will need a patch to show the scope by rule list, but that\u0027s another thing.","commit_id":"f9de5c6c92b6baf5beba9f3973591f66c0571875"}],"doc/source/user/usage.rst":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8d70ee0494f3fbdd8a5fb7829f7afe6bc0fe6894","unresolved":false,"context_lines":[{"line_number":104,"context_line":"operations require a ``value`` field to compare against."},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"Scope"},{"line_number":107,"context_line":"^^^^^^^^^^^^"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"By default, introspection rules are applied to all nodes being inspected."},{"line_number":110,"context_line":"In order for the rule to be applied only to specific nodes, a matching scope"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_5dd1f459","line":107,"range":{"start_line":107,"start_character":5,"end_line":107,"end_character":12},"updated":"2020-02-04 22:58:42.000000000","message":"You have excess characters, I\u0027m kind of surprised this passes docs builds.","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"2746c3910a630b72b2e029fd96d1a80ecb91e203","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    $ cat \u003cjson file\u003e"},{"line_number":115,"context_line":"      {"},{"line_number":116,"context_line":"        ..."},{"line_number":117,"context_line":"        \"scope\": \"SCOPE\""},{"line_number":118,"context_line":"        ..."},{"line_number":119,"context_line":"      }"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_4f62573f","line":117,"updated":"2020-02-10 05:57:07.000000000","message":"Would be good to append some context here, e.g.:\n\n{\n  \"actions\" [ ... ]\n  \"conditions\"\" [ ... ]\n  \"scope\": \"SCOPE\"\n}\n\nbtw, do we have any limitation on the SCOPE string? length, special chars?","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"2746c3910a630b72b2e029fd96d1a80ecb91e203","unresolved":false,"context_lines":[{"line_number":126,"context_line":"Now, when inspecting, the rule will be applied only to nodes with matching"},{"line_number":127,"context_line":"scope value. Note that if a rule has no scope set, it will be applied to all"},{"line_number":128,"context_line":"nodes, regardless if they have property ``inspection_scope`` set or not."},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"Actions"},{"line_number":131,"context_line":"^^^^^^^"},{"line_number":132,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_2f74bb03","line":129,"updated":"2020-02-10 05:57:07.000000000","message":"What if a rule has scope set, but node.property[inspection_scope] is missing? I didn\u0027t see description on this.","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"}],"ironic_inspector/main.py":[{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"7b7dce05619dc02ceb294c764d29370206f92610","unresolved":false,"context_lines":[{"line_number":413,"context_line":"        body \u003d flask.request.get_json(force\u003dTrue)"},{"line_number":414,"context_line":"        if body.get(\u0027uuid\u0027) and not uuidutils.is_uuid_like(body[\u0027uuid\u0027]):"},{"line_number":415,"context_line":"            raise utils.Error(_(\u0027Invalid UUID value\u0027), code\u003d400)"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"        rule \u003d rules.create(conditions_json\u003dbody.get(\u0027conditions\u0027, []),"},{"line_number":418,"context_line":"                            actions_json\u003dbody.get(\u0027actions\u0027, []),"},{"line_number":419,"context_line":"                            uuid\u003dbody.get(\u0027uuid\u0027),"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_7a74afcd","line":416,"updated":"2020-02-10 08:19:11.000000000","message":"Let\u0027s validate scope has valid length here (within 255)","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"2746c3910a630b72b2e029fd96d1a80ecb91e203","unresolved":false,"context_lines":[{"line_number":418,"context_line":"                            actions_json\u003dbody.get(\u0027actions\u0027, []),"},{"line_number":419,"context_line":"                            uuid\u003dbody.get(\u0027uuid\u0027),"},{"line_number":420,"context_line":"                            description\u003dbody.get(\u0027description\u0027),"},{"line_number":421,"context_line":"                            scope\u003dbody.get(\u0027scope\u0027))"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        response_code \u003d (200 if _get_version() \u003c (1, 6) else 201)"},{"line_number":424,"context_line":"        return flask.make_response("}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_8ffb6f14","line":421,"updated":"2020-02-10 05:57:07.000000000","message":"Quite simple API change, but please update api-ref as well :)","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"6c55a65cc80148df5f25db1950ad7755295d63ae","unresolved":false,"context_lines":[{"line_number":415,"context_line":"            raise utils.Error(_(\u0027Invalid UUID value\u0027), code\u003d400)"},{"line_number":416,"context_line":"        if body.get(\u0027scope\u0027) and len(body.get(\u0027scope\u0027)) \u003e 255:"},{"line_number":417,"context_line":"            raise utils.Error("},{"line_number":418,"context_line":"                _(\"Length of \u0027scope\u0027 is greater then 255 characters\"), code\u003d400"},{"line_number":419,"context_line":"            )"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        rule \u003d rules.create(conditions_json\u003dbody.get(\u0027conditions\u0027, []),"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_68cec28f","line":418,"range":{"start_line":418,"start_character":48,"end_line":418,"end_character":52},"updated":"2020-02-17 01:38:50.000000000","message":"nit: than\nor usually we say something like: Invalid scope, the length of the scope should be within 255 characters.","commit_id":"f9de5c6c92b6baf5beba9f3973591f66c0571875"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c222296d41aa059d5ac4442ec7f16e58de976bdd","unresolved":false,"context_lines":[{"line_number":41,"context_line":"LOG \u003d utils.getProcessingLogger(__name__)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"MINIMUM_API_VERSION \u003d (1, 0)"},{"line_number":44,"context_line":"CURRENT_API_VERSION \u003d (1, 15)"},{"line_number":45,"context_line":"DEFAULT_API_VERSION \u003d CURRENT_API_VERSION"},{"line_number":46,"context_line":"_LOGGING_EXCLUDED_KEYS \u003d (\u0027logs\u0027,)"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1fa4df85_32d36506","line":44,"updated":"2020-03-10 10:53:18.000000000","message":"This needs a bump to signify the new feature. And I think we have a version history somewhere in the documentation.","commit_id":"b3b6f948e9b6690087bc4aa49b997c84700f89da"}],"ironic_inspector/rules.py":[{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"18a8dde56aa905433de5f8d8be262e90229840d3","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                          code\u003d409)"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"    LOG.info(\u0027Created rule %(uuid)s with description \"%(descr)s\" \u0027"},{"line_number":413,"context_line":"             \u0027and scope \"%(scope)s\"\u0027,"},{"line_number":414,"context_line":"             {\u0027uuid\u0027: uuid, \u0027descr\u0027: description, \u0027scope\u0027: scope})"},{"line_number":415,"context_line":"    return IntrospectionRule(uuid\u003duuid,"},{"line_number":416,"context_line":"                             conditions\u003drule.conditions,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_a0e8357b","line":413,"updated":"2020-01-14 10:07:25.000000000","message":"what happen here if scope is None ?","commit_id":"ac2a454a3ba7fd4eacac6fe4576459bd98046fc2"},{"author":{"_account_id":31258,"name":"Zygimantas Matonis","email":"zygimantas.matonis@cern.ch","username":"gudrutis"},"change_message_id":"2c8cfbc7a96d7d59f29d218e3507fd78d55ddcce","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                          code\u003d409)"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"    LOG.info(\u0027Created rule %(uuid)s with description \"%(descr)s\" \u0027"},{"line_number":413,"context_line":"             \u0027and scope \"%(scope)s\"\u0027,"},{"line_number":414,"context_line":"             {\u0027uuid\u0027: uuid, \u0027descr\u0027: description, \u0027scope\u0027: scope})"},{"line_number":415,"context_line":"    return IntrospectionRule(uuid\u003duuid,"},{"line_number":416,"context_line":"                             conditions\u003drule.conditions,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_e38b7e1f","line":413,"in_reply_to":"3fa7e38b_4c041a1a","updated":"2020-01-15 10:07:08.000000000","message":"In that case,  \"%(descr)s\" also should be changed since it can be \u0027None\u0027 as well.","commit_id":"ac2a454a3ba7fd4eacac6fe4576459bd98046fc2"},{"author":{"_account_id":31258,"name":"Zygimantas Matonis","email":"zygimantas.matonis@cern.ch","username":"gudrutis"},"change_message_id":"09560b65b41f5d4c2a72a0ff24c8696bf3110573","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                          code\u003d409)"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"    LOG.info(\u0027Created rule %(uuid)s with description \"%(descr)s\" \u0027"},{"line_number":413,"context_line":"             \u0027and scope \"%(scope)s\"\u0027,"},{"line_number":414,"context_line":"             {\u0027uuid\u0027: uuid, \u0027descr\u0027: description, \u0027scope\u0027: scope})"},{"line_number":415,"context_line":"    return IntrospectionRule(uuid\u003duuid,"},{"line_number":416,"context_line":"                             conditions\u003drule.conditions,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_b194059a","line":413,"in_reply_to":"3fa7e38b_a0e8357b","updated":"2020-01-14 13:00:02.000000000","message":"It will output \u0027... and scope \"None\"\u0027. It will not break the logger.","commit_id":"ac2a454a3ba7fd4eacac6fe4576459bd98046fc2"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"9a4a4537cee16435cc4be6fc3b990965106384f4","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                          code\u003d409)"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"    LOG.info(\u0027Created rule %(uuid)s with description \"%(descr)s\" \u0027"},{"line_number":413,"context_line":"             \u0027and scope \"%(scope)s\"\u0027,"},{"line_number":414,"context_line":"             {\u0027uuid\u0027: uuid, \u0027descr\u0027: description, \u0027scope\u0027: scope})"},{"line_number":415,"context_line":"    return IntrospectionRule(uuid\u003duuid,"},{"line_number":416,"context_line":"                             conditions\u003drule.conditions,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_4c041a1a","line":413,"in_reply_to":"3fa7e38b_b194059a","updated":"2020-01-14 13:33:26.000000000","message":"I think there was a misunderstanding, I should\u0027ve expressed my thought in a wider way, I was not implying that it would\u0027ve broken the logger.\nI wonder if it would be worth to give a meaning to None instead of just reporting it as None.","commit_id":"ac2a454a3ba7fd4eacac6fe4576459bd98046fc2"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"0807d5c276dc7c44d7250ec1fa9a1535d0aec312","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        \"\"\""},{"line_number":222,"context_line":"        node_scope \u003d \u0027\u0027"},{"line_number":223,"context_line":"        if \u0027inspection_scope\u0027 in node_info.node().properties:"},{"line_number":224,"context_line":"            node_scope \u003d node_info.node().properties[\u0027inspection_scope\u0027]"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        if not self._scope:"},{"line_number":227,"context_line":"            return True  # rule\u0027s scope is not set, rule is global"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_d1eeac1e","line":224,"updated":"2020-01-27 13:52:55.000000000","message":"Reading the release note didn\u0027t quite completely cause this to connect for me that inspection scope is a node properties side value.\n\nAs a result, I think it would be good if there was a little more documentation coupled with this patch to act as instructions for use, so non-ironic experts can understand how they can leverage the feature.","commit_id":"6a83c220a5963be8a4aa3faf8e66779822c3c1ec"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"2746c3910a630b72b2e029fd96d1a80ecb91e203","unresolved":false,"context_lines":[{"line_number":101,"context_line":"class IntrospectionRule(object):"},{"line_number":102,"context_line":"    \"\"\"High-level class representing an introspection rule.\"\"\""},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def __init__(self, uuid, conditions, actions, description, scope):"},{"line_number":105,"context_line":"        \"\"\"Create rule object from database data.\"\"\""},{"line_number":106,"context_line":"        self._uuid \u003d uuid"},{"line_number":107,"context_line":"        self._conditions \u003d conditions"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_4fbed764","line":104,"range":{"start_line":104,"start_character":63,"end_line":104,"end_character":68},"updated":"2020-02-10 05:57:07.000000000","message":"Please set None as the default value, to be consistent.","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"2746c3910a630b72b2e029fd96d1a80ecb91e203","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        LOG.debug(\u0027Successfully applied actions\u0027,"},{"line_number":214,"context_line":"                  node_info\u003dnode_info, data\u003ddata)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def check_if_rule_applies(self, node_info):"},{"line_number":217,"context_line":"        \"\"\"Check if node\u0027s scope falls under rule._scope and rule is applicable"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        :param node_info: a NodeInfo object"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_cf572727","line":216,"range":{"start_line":216,"start_character":8,"end_line":216,"end_character":29},"updated":"2020-02-10 05:57:07.000000000","message":"A rule applies when the scope and condition check passed, I think check_scope just fine here tbh.","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"2746c3910a630b72b2e029fd96d1a80ecb91e203","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        :returns: True if conditions match, otherwise False"},{"line_number":221,"context_line":"        \"\"\""},{"line_number":222,"context_line":"        node_scope \u003d \u0027\u0027"},{"line_number":223,"context_line":"        if \u0027inspection_scope\u0027 in node_info.node().properties:"},{"line_number":224,"context_line":"            node_scope \u003d node_info.node().properties[\u0027inspection_scope\u0027]"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        if not self._scope:"},{"line_number":227,"context_line":"            return True  # rule\u0027s scope is not set, rule is global"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_cf6e47fd","line":224,"range":{"start_line":223,"start_character":8,"end_line":224,"end_character":72},"updated":"2020-02-10 05:57:07.000000000","message":"can be simplified via get()","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"cf25adfbcd29740ea341ec1d170207377fc0242d","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        :returns: True if conditions match, otherwise False"},{"line_number":221,"context_line":"        \"\"\""},{"line_number":222,"context_line":"        node_scope \u003d \u0027\u0027"},{"line_number":223,"context_line":"        if \u0027inspection_scope\u0027 in node_info.node().properties:"},{"line_number":224,"context_line":"            node_scope \u003d node_info.node().properties[\u0027inspection_scope\u0027]"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        if not self._scope:"},{"line_number":227,"context_line":"            return True  # rule\u0027s scope is not set, rule is global"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_e5945b44","line":224,"range":{"start_line":223,"start_character":8,"end_line":224,"end_character":72},"in_reply_to":"3fa7e38b_7edd6310","updated":"2020-02-12 01:11:37.000000000","message":"I mean you don\u0027t need the checking at L223 after using get(\u0027inspection_scope\u0027), just a suggestion.","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"},{"author":{"_account_id":31258,"name":"Zygimantas Matonis","email":"zygimantas.matonis@cern.ch","username":"gudrutis"},"change_message_id":"fdc8a5c226e95e58674069cff06aaa8870387b35","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        :returns: True if conditions match, otherwise False"},{"line_number":221,"context_line":"        \"\"\""},{"line_number":222,"context_line":"        node_scope \u003d \u0027\u0027"},{"line_number":223,"context_line":"        if \u0027inspection_scope\u0027 in node_info.node().properties:"},{"line_number":224,"context_line":"            node_scope \u003d node_info.node().properties[\u0027inspection_scope\u0027]"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        if not self._scope:"},{"line_number":227,"context_line":"            return True  # rule\u0027s scope is not set, rule is global"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_7edd6310","line":224,"range":{"start_line":223,"start_character":8,"end_line":224,"end_character":72},"in_reply_to":"3fa7e38b_cf6e47fd","updated":"2020-02-11 16:53:41.000000000","message":"What do you mean? `node_info.node().properties.get(\u0027inspection_scope\u0027)` ?\nI don\u0027t see how it simplifies it (it\u0027s more typing)","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"},{"author":{"_account_id":31258,"name":"Zygimantas Matonis","email":"zygimantas.matonis@cern.ch","username":"gudrutis"},"change_message_id":"b15101e041cf9bfa57b78554f7e2c6ca6ee09990","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        :returns: True if conditions match, otherwise False"},{"line_number":221,"context_line":"        \"\"\""},{"line_number":222,"context_line":"        node_scope \u003d \u0027\u0027"},{"line_number":223,"context_line":"        if \u0027inspection_scope\u0027 in node_info.node().properties:"},{"line_number":224,"context_line":"            node_scope \u003d node_info.node().properties[\u0027inspection_scope\u0027]"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        if not self._scope:"},{"line_number":227,"context_line":"            return True  # rule\u0027s scope is not set, rule is global"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_d0bc7408","line":224,"range":{"start_line":223,"start_character":8,"end_line":224,"end_character":72},"in_reply_to":"3fa7e38b_e5945b44","updated":"2020-02-12 12:59:19.000000000","message":"Ah I see, it will return None in this case. Thanks for the tip.","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"2746c3910a630b72b2e029fd96d1a80ecb91e203","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        if \u0027inspection_scope\u0027 in node_info.node().properties:"},{"line_number":224,"context_line":"            node_scope \u003d node_info.node().properties[\u0027inspection_scope\u0027]"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        if not self._scope:"},{"line_number":227,"context_line":"            return True  # rule\u0027s scope is not set, rule is global"},{"line_number":228,"context_line":"        if self._scope !\u003d node_scope:"},{"line_number":229,"context_line":"            # rule\u0027s scope is set but does not match Node\u0027s scope or"},{"line_number":230,"context_line":"            # Node\u0027s scope is not set"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_ef630317","line":227,"range":{"start_line":226,"start_character":8,"end_line":227,"end_character":66},"updated":"2020-02-10 05:57:07.000000000","message":"this is a shortcut, let\u0027s move these prior to reading node properties.","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c222296d41aa059d5ac4442ec7f16e58de976bdd","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        :returns: True if conditions match, otherwise False"},{"line_number":221,"context_line":"        \"\"\""},{"line_number":222,"context_line":"        if not self._scope:  # if \u0027\u0027 or None"},{"line_number":223,"context_line":"            return True  # rule\u0027s scope is not set, rule is global"},{"line_number":224,"context_line":"        if self._scope !\u003d node_info.node().properties.get(\u0027inspection_scope\u0027):"},{"line_number":225,"context_line":"            # rule\u0027s scope is set but does not match Node\u0027s scope or"},{"line_number":226,"context_line":"            # Node\u0027s scope is not set"}],"source_content_type":"text/x-python","patch_set":14,"id":"1fa4df85_72e55ddb","line":223,"updated":"2020-03-10 10:53:18.000000000","message":"nit: the comments here seem quite obvious, I\u0027d remove them","commit_id":"b3b6f948e9b6690087bc4aa49b997c84700f89da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c222296d41aa059d5ac4442ec7f16e58de976bdd","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        \"\"\""},{"line_number":222,"context_line":"        if not self._scope:  # if \u0027\u0027 or None"},{"line_number":223,"context_line":"            return True  # rule\u0027s scope is not set, rule is global"},{"line_number":224,"context_line":"        if self._scope !\u003d node_info.node().properties.get(\u0027inspection_scope\u0027):"},{"line_number":225,"context_line":"            # rule\u0027s scope is set but does not match Node\u0027s scope or"},{"line_number":226,"context_line":"            # Node\u0027s scope is not set"},{"line_number":227,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":14,"id":"1fa4df85_92e819b3","line":224,"updated":"2020-03-10 10:53:18.000000000","message":"nit: return self._scope \u003d\u003d node_info....","commit_id":"b3b6f948e9b6690087bc4aa49b997c84700f89da"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"3ac4516b9dacdba802da13b9e185bb0d28c45168","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        \"\"\""},{"line_number":222,"context_line":"        if not self._scope:"},{"line_number":223,"context_line":"            return True"},{"line_number":224,"context_line":"        return self._scope \u003d\u003d node_info.node().properties.get(\u0027inspection_scope\u0027)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":""},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"df33271e_ada93fde","line":224,"updated":"2020-03-26 06:22:08.000000000","message":"it violates pep8 so needs a fix","commit_id":"24cf4756344f65558378b40290fd8046b390994a"}],"ironic_inspector/test/functional.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c222296d41aa059d5ac4442ec7f16e58de976bdd","unresolved":false,"context_lines":[{"line_number":468,"context_line":"                     \u0027value\u0027: \u0027foo\u0027},"},{"line_number":469,"context_line":"                    {\u0027action\u0027: \u0027fail\u0027, \u0027message\u0027: \u0027boom\u0027}"},{"line_number":470,"context_line":"                ]"},{"line_number":471,"context_line":"            },"},{"line_number":472,"context_line":"        ]"},{"line_number":473,"context_line":"        for rule in rules:"},{"line_number":474,"context_line":"            self.call_add_rule(rule)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1fa4df85_d2e211d5","line":471,"updated":"2020-03-10 10:53:18.000000000","message":"Let\u0027s add a rule that won\u0027t be applied because of scope?\n\nMaybe actually add a test that explicitly exercises scopes: add a scope to a node and make sure only matching rules apply.","commit_id":"b3b6f948e9b6690087bc4aa49b997c84700f89da"},{"author":{"_account_id":31258,"name":"Zygimantas Matonis","email":"zygimantas.matonis@cern.ch","username":"gudrutis"},"change_message_id":"28a1deb4d9f6076c8c0f8c72de81ae451bcb5a5b","unresolved":false,"context_lines":[{"line_number":468,"context_line":"                     \u0027value\u0027: \u0027foo\u0027},"},{"line_number":469,"context_line":"                    {\u0027action\u0027: \u0027fail\u0027, \u0027message\u0027: \u0027boom\u0027}"},{"line_number":470,"context_line":"                ]"},{"line_number":471,"context_line":"            },"},{"line_number":472,"context_line":"        ]"},{"line_number":473,"context_line":"        for rule in rules:"},{"line_number":474,"context_line":"            self.call_add_rule(rule)"}],"source_content_type":"text/x-python","patch_set":14,"id":"df33271e_e5ea4973","line":471,"in_reply_to":"1fa4df85_d2e211d5","updated":"2020-03-25 20:01:42.000000000","message":"I think I have these unit test you are talking about :\nironic_inspector/test/unit/test_rules.py:581","commit_id":"b3b6f948e9b6690087bc4aa49b997c84700f89da"}],"ironic_inspector/test/unit/test_rules.py":[{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"18a8dde56aa905433de5f8d8be262e90229840d3","unresolved":false,"context_lines":[{"line_number":583,"context_line":"Check that:"},{"line_number":584,"context_line":"1 global rule is applied to all nodes"},{"line_number":585,"context_line":"2 different rules with scopes are applied to different nodes"},{"line_number":586,"context_line":"1 rule with scope is not applied"},{"line_number":587,"context_line":"\"\"\""},{"line_number":588,"context_line":"@mock.patch.object(rules, \u0027get_all\u0027, autospec\u003dTrue)"},{"line_number":589,"context_line":"class TestRuleScope(BaseTest):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_e0938dfe","line":586,"range":{"start_line":586,"start_character":0,"end_line":586,"end_character":1},"updated":"2020-01-14 10:07:25.000000000","message":"nit: should this be 3 ?","commit_id":"ac2a454a3ba7fd4eacac6fe4576459bd98046fc2"}],"releasenotes/notes/introspection_rules_scope-9b06c3ad4e273a52.yaml":[{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"18a8dde56aa905433de5f8d8be262e90229840d3","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Previously, all imported introspection rules were applied when inspecting"},{"line_number":4,"context_line":"    any type of node. There was no mechanism to apply only a selected set of"},{"line_number":5,"context_line":"    rules. This change fixes it by introducing scopes to nodes and rules."},{"line_number":6,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3fa7e38b_80665928","line":5,"range":{"start_line":5,"start_character":22,"end_line":5,"end_character":29},"updated":"2020-01-14 10:07:25.000000000","message":"not sure this is a \"fix\", maybe try to reword it as introducing a new feature ?","commit_id":"ac2a454a3ba7fd4eacac6fe4576459bd98046fc2"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"18a8dde56aa905433de5f8d8be262e90229840d3","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Previously, all imported introspection rules were applied when inspecting"},{"line_number":4,"context_line":"    any type of node. There was no mechanism to apply only a selected set of"},{"line_number":5,"context_line":"    rules. This change fixes it by introducing scopes to nodes and rules."},{"line_number":6,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3fa7e38b_00010908","line":5,"range":{"start_line":5,"start_character":54,"end_line":5,"end_character":62},"updated":"2020-01-14 10:07:25.000000000","message":"you\u0027re not adding a scope to nodes, this could be misleading, the mechanism should be explained differently","commit_id":"ac2a454a3ba7fd4eacac6fe4576459bd98046fc2"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"0807d5c276dc7c44d7250ec1fa9a1535d0aec312","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Previously, all imported introspection rules were applied when inspecting"},{"line_number":4,"context_line":"    any type of node. There was no mechanism to apply only a selected set of"},{"line_number":5,"context_line":"    rules. This change improves it by introducing a `scope` field to"},{"line_number":6,"context_line":"    introspection rules. If a scope is set on an introspection rule, it will"},{"line_number":7,"context_line":"    only apply to nodes that have a matching \u0027inspection_scope\u0027 property. If"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_119be4c7","line":4,"range":{"start_line":3,"start_character":4,"end_line":4,"end_character":22},"updated":"2020-01-27 13:52:55.000000000","message":"Perhaps start this with \"Added the capability to define a scope for the inspection process. Previously, all imported introspection rules were applied when inspecting any type of node....\"","commit_id":"6a83c220a5963be8a4aa3faf8e66779822c3c1ec"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8d70ee0494f3fbdd8a5fb7829f7afe6bc0fe6894","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    .. code-block:: shell"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"      $ openstack baremetal node set --property inspection_scope\u003d\"SCOPE\" $NODE"},{"line_number":31,"context_line":"      $ openstack baremetal node inspect $NODE"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fa7e38b_1ddb7c7a","line":31,"updated":"2020-02-04 22:58:42.000000000","message":"Wow, that is a reno! I _suspect_ this will be trimmed down for the release\u0027s release notes.","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"2746c3910a630b72b2e029fd96d1a80ecb91e203","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    .. code-block:: shell"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"      $ openstack baremetal node set --property inspection_scope\u003d\"SCOPE\" $NODE"},{"line_number":31,"context_line":"      $ openstack baremetal node inspect $NODE"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fa7e38b_0f377fff","line":31,"in_reply_to":"3fa7e38b_1ddb7c7a","updated":"2020-02-10 05:57:07.000000000","message":"Yeah, we can wrap detail in the docs.","commit_id":"3de688f9e701af7f78d0db22b2b4514def616c79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c222296d41aa059d5ac4442ec7f16e58de976bdd","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Added the capability to define a scope for the inspection process."},{"line_number":5,"context_line":"    Previously, all imported introspection rules were applied when inspecting"},{"line_number":6,"context_line":"    any type of node. There was no mechanism to apply only a selected set of"},{"line_number":7,"context_line":"    rules. This change improves it by introducing a ``scope`` field to"},{"line_number":8,"context_line":"    introspection rules. If a scope is set on an introspection rule, it will"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"1fa4df85_f2c38d36","line":5,"updated":"2020-03-10 10:53:18.000000000","message":"nit: s/imported//","commit_id":"b3b6f948e9b6690087bc4aa49b997c84700f89da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c222296d41aa059d5ac4442ec7f16e58de976bdd","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Added the capability to define a scope for the inspection process."},{"line_number":5,"context_line":"    Previously, all imported introspection rules were applied when inspecting"},{"line_number":6,"context_line":"    any type of node. There was no mechanism to apply only a selected set of"},{"line_number":7,"context_line":"    rules. This change improves it by introducing a ``scope`` field to"},{"line_number":8,"context_line":"    introspection rules. If a scope is set on an introspection rule, it will"},{"line_number":9,"context_line":"    only apply to nodes that have a matching ``inspection_scope`` property. If"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"1fa4df85_12bf49aa","line":6,"updated":"2020-03-10 10:53:18.000000000","message":"nit: s/type of//","commit_id":"b3b6f948e9b6690087bc4aa49b997c84700f89da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c222296d41aa059d5ac4442ec7f16e58de976bdd","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Added the capability to define a scope for the inspection process."},{"line_number":5,"context_line":"    Previously, all imported introspection rules were applied when inspecting"},{"line_number":6,"context_line":"    any type of node. There was no mechanism to apply only a selected set of"},{"line_number":7,"context_line":"    rules. This change improves it by introducing a ``scope`` field to"},{"line_number":8,"context_line":"    introspection rules. If a scope is set on an introspection rule, it will"},{"line_number":9,"context_line":"    only apply to nodes that have a matching ``inspection_scope`` property. If"},{"line_number":10,"context_line":"    not set, it will apply to all nodes."}],"source_content_type":"text/x-yaml","patch_set":14,"id":"1fa4df85_b2df550b","line":7,"updated":"2020-03-10 10:53:18.000000000","message":"nit: s/improves it by introducing/introduces/","commit_id":"b3b6f948e9b6690087bc4aa49b997c84700f89da"}]}
