Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions openstack_cli/src/block_storage/v3/attachment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub mod create_327;
pub mod create_354;
pub mod delete;
pub mod list;
pub mod os_complete;
pub mod os_complete_344;
pub mod set_327;
pub mod show;

Expand Down Expand Up @@ -63,7 +63,8 @@ pub struct AttachmentCommand {
#[allow(missing_docs)]
#[derive(Subcommand)]
pub enum AttachmentCommands {
Complete(Box<os_complete::AttachmentCommand>),
#[command(visible_alias = "complete")]
Complete344(Box<os_complete_344::AttachmentCommand>),
#[command(visible_alias = "create")]
Create354(Box<create_354::AttachmentCommand>),
Create327(Box<create_327::AttachmentCommand>),
Expand All @@ -82,7 +83,7 @@ impl AttachmentCommand {
session: &mut AsyncOpenStack,
) -> Result<(), OpenStackCliError> {
match &self.command {
AttachmentCommands::Complete(cmd) => cmd.take_action(parsed_args, session).await,
AttachmentCommands::Complete344(cmd) => cmd.take_action(parsed_args, session).await,
AttachmentCommands::Create354(cmd) => cmd.take_action(parsed_args, session).await,
AttachmentCommands::Create327(cmd) => cmd.take_action(parsed_args, session).await,
AttachmentCommands::Delete(cmd) => cmd.take_action(parsed_args, session).await,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ use crate::OpenStackCliError;
use crate::output::OutputProcessor;

use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::attachment::os_complete;
use openstack_sdk::api::block_storage::v3::attachment::os_complete_344;
use serde_json::Value;

/// Empty body for os-complete action
#[derive(Args)]
Expand All @@ -41,6 +42,9 @@ pub struct AttachmentCommand {
/// Path parameters
#[command(flatten)]
path: PathParameters,

#[arg(help_heading = "Body parameters", long, value_name="JSON", value_parser=crate::common::parse_json)]
os_complete: Value,
}

/// Query parameters
Expand Down Expand Up @@ -75,10 +79,18 @@ impl AttachmentCommand {
);
op.validate_args(parsed_args)?;

let mut ep_builder = os_complete::Request::builder();
let mut ep_builder = os_complete_344::Request::builder();
ep_builder.header(
http::header::HeaderName::from_static("openstack-api-version"),
http::header::HeaderValue::from_static("volume 3.44"),
);

ep_builder.id(&self.path.id);

// Set body parameters
// Set Request.os_complete data
ep_builder.os_complete(self.os_complete.clone());

let ep = ep_builder
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;
Expand Down
3 changes: 0 additions & 3 deletions openstack_cli/src/block_storage/v3/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use crate::{Cli, OpenStackCliError};
use openstack_sdk::AsyncOpenStack;

pub mod list;
pub mod set;
pub mod show;

/// Clusters (clusters)
Expand Down Expand Up @@ -58,7 +57,6 @@ pub struct ClusterCommand {
#[derive(Subcommand)]
pub enum ClusterCommands {
List(Box<list::ClustersCommand>),
Set(Box<set::ClusterCommand>),
Show(Box<show::ClusterCommand>),
}

Expand All @@ -71,7 +69,6 @@ impl ClusterCommand {
) -> Result<(), OpenStackCliError> {
match &self.command {
ClusterCommands::List(cmd) => cmd.take_action(parsed_args, session).await,
ClusterCommands::Set(cmd) => cmd.take_action(parsed_args, session).await,
ClusterCommands::Show(cmd) => cmd.take_action(parsed_args, session).await,
}
}
Expand Down
116 changes: 0 additions & 116 deletions openstack_cli/src/block_storage/v3/cluster/set.rs

This file was deleted.

106 changes: 0 additions & 106 deletions openstack_cli/src/block_storage/v3/service/set.rs

This file was deleted.

1 change: 0 additions & 1 deletion openstack_cli/tests/block_storage/v3/cluster/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// SPDX-License-Identifier: Apache-2.0

mod list_autogen;
mod set_autogen;
mod show_autogen;

use assert_cmd::prelude::*;
Expand Down
32 changes: 0 additions & 32 deletions openstack_cli/tests/block_storage/v3/cluster/set_autogen.rs

This file was deleted.

2 changes: 1 addition & 1 deletion openstack_sdk/src/api/block_storage/v3/attachment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ pub mod delete;
pub mod get;
pub mod list;
pub mod list_detailed;
pub mod os_complete;
pub mod os_complete_344;
pub mod set_327;
Loading