diff options
author | Cenne <cennedee+opendev@protonmail.com> | 2021-06-18 12:20:40 +0200 |
---|---|---|
committer | Cenne <cennedee+opendev@protonmail.com> | 2021-07-08 15:04:15 +0200 |
commit | 46ff51487accf8881e468b975f4479c85daa8163 (patch) | |
tree | 078719bea6b15bf757b129de559d6492e2ca495c /ironic/conductor/manager.py | |
parent | 415464db4a2309d77295fd7b2bef8e1a97351699 (diff) | |
download | ironic-46ff51487accf8881e468b975f4479c85daa8163.tar.gz |
Add `boot_mode` and `secure_boot` to node object and expose in api
* add fields to Node object
* expose them at endpoint `/v1/nodes/{node_ident}/states`
* update states on powersync / entering managed state.
* tests
* update api endpoint info in api-ref
Story: 2008567
Task: 41709
Change-Id: Iddd1421a6fa37d69da56658a2fefa5bc8cfd15e4
Diffstat (limited to 'ironic/conductor/manager.py')
-rw-r--r-- | ironic/conductor/manager.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ironic/conductor/manager.py b/ironic/conductor/manager.py index fbe4dfa38..01f340fcb 100644 --- a/ironic/conductor/manager.py +++ b/ironic/conductor/manager.py @@ -1173,6 +1173,8 @@ class ConductorManager(base_manager.BaseConductorManager): utils.node_cache_bios_settings(task, node) # Cache the vendor if possible utils.node_cache_vendor(task) + # Cache also boot_mode and secure_boot states + utils.node_cache_boot_mode(task) if power_state != node.power_state: old_power_state = node.power_state @@ -3586,6 +3588,8 @@ def do_sync_power_state(task, count): # Make sure we have the vendor cached (if for some reason it failed during # the transition to manageable or a really old API version was used). utils.node_cache_vendor(task) + # Also make sure to cache the current boot_mode and secure_boot states + utils.node_cache_boot_mode(task) if node.power_state and node.power_state == power_state: # No action is needed |