diff options
author | Dmitry Tantsur <dtantsur@protonmail.com> | 2020-05-29 14:44:36 +0200 |
---|---|---|
committer | Dmitry Tantsur <dtantsur@protonmail.com> | 2020-06-05 14:41:32 +0200 |
commit | 2509d282a36a1ab8a6138ae77a11762ffcb42d28 (patch) | |
tree | e84804009ce0f75ce370c9d38dea067a666b4f5a /ironic/drivers/modules/agent_client.py | |
parent | c25921f90ae4b1c0ccc79e6cb3a65cf520f21bbc (diff) | |
download | ironic-2509d282a36a1ab8a6138ae77a11762ffcb42d28.tar.gz |
Use the new extension call for getting partition UUIDs
This is more efficient (one call instead of up to three) and easier
to debug and understand.
Also remove a bogus warning when no root UUID is returned for whole
disk images. We don't strictly needed, nor do we actually return
anything meaningful.
Change-Id: Ib9ca43b8fe86481179b3045a26e6e3b500f87511
Depends-On: https://review.opendev.org/731742
Diffstat (limited to 'ironic/drivers/modules/agent_client.py')
-rw-r--r-- | ironic/drivers/modules/agent_client.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ironic/drivers/modules/agent_client.py b/ironic/drivers/modules/agent_client.py index eba9e6de8..3edd89196 100644 --- a/ironic/drivers/modules/agent_client.py +++ b/ironic/drivers/modules/agent_client.py @@ -467,6 +467,22 @@ class AgentClient(object): method='deploy.execute_deploy_step', params=params) + @METRICS.timer('AgentClient.get_partition_uuids') + def get_partition_uuids(self, node): + """Get deploy steps from agent. + + :param node: A node object. + :raises: IronicException when failed to issue the request or there was + a malformed response from the agent. + :raises: AgentAPIError when agent failed to execute specified command. + :returns: A dict containing command response from agent. + + """ + return self._command(node=node, + method='standby.get_partition_uuids', + params={}, + wait=True) + @METRICS.timer('AgentClient.power_off') def power_off(self, node): """Soft powers off the bare metal node by shutting down ramdisk OS. |