)]}'
{"ironic/drivers/modules/redfish/management.py":[{"author":{"_account_id":23847,"name":"Richard G. Pioso","email":"richard.pioso@gmail.com","username":"richard.pioso"},"change_message_id":"c5efd663ac70398290caf97fbbd6c54d91db2752","unresolved":true,"context_lines":[{"line_number":91,"context_line":"    \"\"\""},{"line_number":92,"context_line":"    desired_enabled \u003d BOOT_DEVICE_PERSISTENT_MAP_REV[persistent]"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    system.invalidate()"},{"line_number":95,"context_line":"    current_enabled \u003d system.boot.get(\u0027enabled\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    # NOTE(etingof): this can be racy, esp if BMC is not RESTful"}],"source_content_type":"text/x-python","patch_set":1,"id":"301b193b_dfcf9428","line":94,"range":{"start_line":94,"start_character":0,"end_line":94,"end_character":23},"updated":"2020-11-27 23:42:15.000000000","message":"I do not believe this causes the call below to GET the value from the Redfish service. If I correctly understand, it simply marks the System instance as stale. Did you mean refresh it?\n\n    system.invalidate(force_refresh\u003dTrue)\n\nThe default value of that optional argument is False. The following is more straightforward.\n\n    system.refresh()\n\nA more selective approach would be to only invalidate the instance when it is successfully modified. There are TODO comments in the sushy code which suggest this, including https://opendev.org/openstack/sushy/src/commit/7016cc0f31050ab656e1e26c80bd44ce3e9fd57a/sushy/resources/system/system.py#L260-L262.\n\nIf that were done, then system.refresh(force\u003dFalse) could be called here in preparation for a read, such as by the line below. refresh(force\u003dFalse) does a GET of the object only if it is invalid; otherwise, it is a no-op.\n\nEven more selective refreshing/invalidating of System instances could be explored by overriding its base class\u0027s _do_refresh() method. Sub-resources may not need to be refreshed.","commit_id":"6f9a9e100642ea2f0b5b6d2dead3beb07d731fda"},{"author":{"_account_id":23847,"name":"Richard G. Pioso","email":"richard.pioso@gmail.com","username":"richard.pioso"},"change_message_id":"c5efd663ac70398290caf97fbbd6c54d91db2752","unresolved":true,"context_lines":[{"line_number":250,"context_line":"        \"\"\""},{"line_number":251,"context_line":"        system \u003d redfish_utils.get_system(task)"},{"line_number":252,"context_line":"        # Make sure we get the latest result if System has been cached."},{"line_number":253,"context_line":"        system.invalidate()"},{"line_number":254,"context_line":"        return {\u0027boot_device\u0027: BOOT_DEVICE_MAP.get(system.boot.get(\u0027target\u0027)),"},{"line_number":255,"context_line":"                \u0027persistent\u0027: BOOT_DEVICE_PERSISTENT_MAP.get("},{"line_number":256,"context_line":"                    system.boot.get(\u0027enabled\u0027))}"}],"source_content_type":"text/x-python","patch_set":1,"id":"2830d91e_7fcf8f2b","line":253,"range":{"start_line":253,"start_character":0,"end_line":253,"end_character":27},"updated":"2020-11-27 23:42:15.000000000","message":"Ditto","commit_id":"6f9a9e100642ea2f0b5b6d2dead3beb07d731fda"},{"author":{"_account_id":27909,"name":"Aija Jauntēva","email":"code@clusums.eu","username":"ajya"},"change_message_id":"0a1940ff7fe7ced87f3f14622030b23e2ec75744","unresolved":true,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        \"\"\""},{"line_number":251,"context_line":"        system \u003d redfish_utils.get_system(task)"},{"line_number":252,"context_line":"        # Make sure we get the latest result if System has been cached."},{"line_number":253,"context_line":"        system.invalidate()"},{"line_number":254,"context_line":"        return {\u0027boot_device\u0027: BOOT_DEVICE_MAP.get(system.boot.get(\u0027target\u0027)),"},{"line_number":255,"context_line":"                \u0027persistent\u0027: BOOT_DEVICE_PERSISTENT_MAP.get("},{"line_number":256,"context_line":"                    system.boot.get(\u0027enabled\u0027))}"}],"source_content_type":"text/x-python","patch_set":1,"id":"c127a79c_3a0260fb","line":253,"range":{"start_line":251,"start_character":8,"end_line":253,"end_character":27},"updated":"2020-11-27 09:08:45.000000000","message":"maybe allow invalidating as part of get_system() call? That is, optional invalidate param defaulting to False; in this case this would be `.get_system(task, invalidate\u003dTrue)`.","commit_id":"6f9a9e100642ea2f0b5b6d2dead3beb07d731fda"},{"author":{"_account_id":23847,"name":"Richard G. Pioso","email":"richard.pioso@gmail.com","username":"richard.pioso"},"change_message_id":"c5efd663ac70398290caf97fbbd6c54d91db2752","unresolved":true,"context_lines":[{"line_number":308,"context_line":"                  None if it is unknown."},{"line_number":309,"context_line":"        \"\"\""},{"line_number":310,"context_line":"        system \u003d redfish_utils.get_system(task)"},{"line_number":311,"context_line":"        # Make sure we get the latest result if System has been cached."},{"line_number":312,"context_line":"        system.invalidate()"},{"line_number":313,"context_line":"        return BOOT_MODE_MAP.get(system.boot.get(\u0027mode\u0027))"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    @staticmethod"},{"line_number":316,"context_line":"    def _sensor2dict(resource, *fields):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1d3f081e_f8a30414","line":313,"range":{"start_line":311,"start_character":0,"end_line":313,"end_character":0},"updated":"2020-11-27 23:42:15.000000000","message":"Ditto","commit_id":"6f9a9e100642ea2f0b5b6d2dead3beb07d731fda"}],"ironic/drivers/modules/redfish/power.py":[{"author":{"_account_id":23847,"name":"Richard G. Pioso","email":"richard.pioso@gmail.com","username":"richard.pioso"},"change_message_id":"c5efd663ac70398290caf97fbbd6c54d91db2752","unresolved":true,"context_lines":[{"line_number":110,"context_line":"        :raises: RedfishError on an error from the Sushy library"},{"line_number":111,"context_line":"        \"\"\""},{"line_number":112,"context_line":"        system \u003d redfish_utils.get_system(task)"},{"line_number":113,"context_line":"        # Make sure we get the latest result if System has been cached."},{"line_number":114,"context_line":"        system.invalidate()"},{"line_number":115,"context_line":"        return GET_POWER_STATE_MAP.get(system.power_state)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    @task_manager.require_exclusive_lock"},{"line_number":118,"context_line":"    def set_power_state(self, task, power_state, timeout\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5496a8_e88d0973","line":115,"range":{"start_line":113,"start_character":0,"end_line":115,"end_character":0},"updated":"2020-11-27 23:42:15.000000000","message":"Ditto-ish. Please see https://opendev.org/openstack/sushy/src/commit/7016cc0f31050ab656e1e26c80bd44ce3e9fd57a/sushy/resources/system/system.py#L192-L194.","commit_id":"6f9a9e100642ea2f0b5b6d2dead3beb07d731fda"}],"ironic/drivers/modules/redfish/utils.py":[{"author":{"_account_id":27909,"name":"Aija Jauntēva","email":"code@clusums.eu","username":"ajya"},"change_message_id":"0a1940ff7fe7ced87f3f14622030b23e2ec75744","unresolved":true,"context_lines":[{"line_number":266,"context_line":"def get_system(task):"},{"line_number":267,"context_line":"    \"\"\"Get a Redfish System that represents a node."},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    The system is cached on the task object."},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    :param task: a TaskManager object (also accepts nodes for backward"},{"line_number":272,"context_line":"        compatibility)."}],"source_content_type":"text/x-python","patch_set":1,"id":"805174de_4eb7a525","line":269,"range":{"start_line":269,"start_character":0,"end_line":269,"end_character":44},"updated":"2020-11-27 09:08:45.000000000","message":"Would be good to add some guidelines/examples when caching needs invalidating.","commit_id":"6f9a9e100642ea2f0b5b6d2dead3beb07d731fda"},{"author":{"_account_id":27909,"name":"Aija Jauntēva","email":"code@clusums.eu","username":"ajya"},"change_message_id":"0a1940ff7fe7ced87f3f14622030b23e2ec75744","unresolved":true,"context_lines":[{"line_number":280,"context_line":"            pass"},{"line_number":281,"context_line":"        node \u003d task.node"},{"line_number":282,"context_line":"    else:"},{"line_number":283,"context_line":"        LOG.warning(\u0027Passing a node to redfish.utils.get_system is \u0027"},{"line_number":284,"context_line":"                    \u0027deprecated, pass a task instead\u0027)"},{"line_number":285,"context_line":"        node \u003d task"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    driver_info \u003d parse_driver_info(node)"}],"source_content_type":"text/x-python","patch_set":1,"id":"f43bfede_fb5757c0","line":284,"range":{"start_line":283,"start_character":0,"end_line":284,"end_character":54},"updated":"2020-11-27 09:08:45.000000000","message":"Does this message need more context to identify which codepath called it so that it can be updated?","commit_id":"6f9a9e100642ea2f0b5b6d2dead3beb07d731fda"}]}
