NoneBases: object
Client for interacting with nodes via a REST API.
AgentClient.collect_system_logs(node)[source]¶Collect and package diagnostic and support data from the ramdisk.
| Parameters: | 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.
See get_commands_status() for a command result sample. |
AgentClient.execute_clean_step(step, node, ports)[source]¶Execute specified clean step.
| Parameters: |
|
|---|---|
| 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.
See {
'clean_result': <the result of execution, step specific>,
'clean_step': <the clean step issued to agent>
}
|
AgentClient.finalize_rescue(node)[source]¶Instruct the ramdisk to finalize entering of rescue mode.
| Parameters: | node – A Node object. |
|---|---|
| Raises: | IronicException if rescue_password is missing, or 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.
See get_commands_status() for a command result sample. |
AgentClient.get_clean_steps(node, ports)[source]¶Get clean steps from agent.
| Parameters: |
|
|---|---|
| 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.
See {
'clean_steps': <a list of clean steps>,
'hardware_manager_version': <manager version>
}
|
AgentClient.get_commands_status(node)[source]¶Get command status from agent.
| Parameters: | node – A Node object. |
|---|---|
| Returns: | A list of command results, each result is related to a
command been issued to agent. A typical result can be:{
'command_name': <command name related to the result>,
'command_params': <params related with the command>,
'command_status': <current command status,
e.g. 'RUNNING', 'SUCCEEDED', 'FAILED'>,
'command_error': <error message if command execution
failed>,
'command_result': <command result if command execution
succeeded, the value is command specific,
e.g.:
* a dictionary containing keys clean_result
and clean_step for the command
clean.execute_clean_step;
* a string representing result message for
the command standby.cache_image;
* None for the command standby.sync.>
}
|
AgentClient.install_bootloader(node, root_uuid, efi_system_part_uuid=None, prep_boot_part_uuid=None)[source]¶Install a boot loader on the image.
| Parameters: |
|
|---|---|
| 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.
See |
AgentClient.power_off(node)[source]¶Soft powers off the bare metal node by shutting down ramdisk OS.
| Parameters: | 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.
See get_commands_status() for a command result sample. |
AgentClient.prepare_image(node, image_info, wait=False)[source]¶Call the prepare_image method on the node.
| Parameters: |
|
|---|---|
| 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 status from agent.
See |
AgentClient.start_iscsi_target(node, iqn, portal_port=3260, wipe_disk_metadata=False)[source]¶Expose the node’s disk as an ISCSI target.
| Parameters: |
|
|---|---|
| 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.
See |
AgentClient.sync(node)[source]¶Flush file system buffers forcing changed blocks to disk.
| Parameters: | 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.
See get_commands_status() for a command result sample. |
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.