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:
@@ -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 %}
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user