Update the cli output initialization

Switch to the new cli OutputProcessor initialization interface with
resource_key and oepration_type parameters for enabling command specific
hints.

Change-Id: I67eaef1fd5f9f1ed72a5f11a23e8559739792f8a
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
This commit is contained in:
Artem Goncharov
2025-06-02 11:17:25 +02:00
parent 5cdd70602e
commit 1a64217aec
2 changed files with 2 additions and 2 deletions

View File

@@ -119,7 +119,7 @@ impl {{ target_class_name }}Command {
) -> Result<(), OpenStackCliError> {
info!("{{ operation_type | title }} {{ target_class_name }}");
let op = OutputProcessor::from_args_with_resource_key(parsed_args, "{{ resource_key }}");
let op = OutputProcessor::from_args(parsed_args, Some("{{ resource_key }}"), Some("{{ operation_type }}"));
op.validate_args(parsed_args)?;
{%- if operation_type == "download" and is_image_download %}

View File

@@ -97,7 +97,7 @@ impl fooCommand {
) -> Result<(), OpenStackCliError> {
info!("Dummy foo");
let op = OutputProcessor::from_args_with_resource_key(parsed_args, "srv.foo");
let op = OutputProcessor::from_args(parsed_args, Some("srv.foo"), Some("dummy"));
op.validate_args(parsed_args)?;
let mut ep_builder = srv::Request::builder();