Thanks to visit codestin.com
Credit goes to github.com

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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions cli-cmd/api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ impl ApiCommand {
})?,
))
})
.collect::<Result<Vec<(_, _)>, _>>()?
.into_iter(),
.collect::<Result<Vec<(_, _)>, _>>()?,
)
}

Expand Down
7 changes: 4 additions & 3 deletions cli-cmd/block-storage/src/v3/attachment/create_327.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use openstack_sdk::AsyncOpenStack;
use openstack_cli_core::common::parse_key_val;
use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::attachment::create_327;
use openstack_types::block_storage::v3::attachment::response::create::AttachmentResponse;
use openstack_types::block_storage::v3::attachment::response;
use serde_json::Value;

/// Create an attachment.
Expand Down Expand Up @@ -177,8 +177,9 @@ impl AttachmentCommand {
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data = ep.query_async(client).await?;
op.output_single::<AttachmentResponse>(data)?;
let data: serde_json::Value = ep.query_async(client).await?;

op.output_single::<response::create::AttachmentResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
7 changes: 4 additions & 3 deletions cli-cmd/block-storage/src/v3/attachment/create_354.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use clap::ValueEnum;
use openstack_cli_core::common::parse_key_val;
use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::attachment::create_354;
use openstack_types::block_storage::v3::attachment::response::create::AttachmentResponse;
use openstack_types::block_storage::v3::attachment::response;
use serde_json::Value;

/// Create an attachment.
Expand Down Expand Up @@ -200,8 +200,9 @@ impl AttachmentCommand {
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data = ep.query_async(client).await?;
op.output_single::<AttachmentResponse>(data)?;
let data: serde_json::Value = ep.query_async(client).await?;

op.output_single::<response::create::AttachmentResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
5 changes: 3 additions & 2 deletions cli-cmd/block-storage/src/v3/attachment/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use openstack_sdk::AsyncOpenStack;
use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::attachment::list_detailed;
use openstack_sdk::api::{Pagination, paged};
use openstack_types::block_storage::v3::attachment::response::list_detailed::AttachmentResponse;
use openstack_types::block_storage::v3::attachment::response;

/// Return a detailed list of attachments.
#[derive(Args)]
Expand Down Expand Up @@ -146,7 +146,8 @@ impl AttachmentsCommand {
let data: Vec<serde_json::Value> = paged(ep, Pagination::Limit(self.max_items))
.query_async(client)
.await?;
op.output_list::<AttachmentResponse>(data)?;

op.output_list::<response::list_detailed::AttachmentResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
7 changes: 4 additions & 3 deletions cli-cmd/block-storage/src/v3/attachment/set_327.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use openstack_sdk::AsyncOpenStack;
use openstack_cli_core::common::parse_key_val;
use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::attachment::set_327;
use openstack_types::block_storage::v3::attachment::response::set::AttachmentResponse;
use openstack_types::block_storage::v3::attachment::response;
use serde_json::Value;

/// Update an attachment record.
Expand Down Expand Up @@ -133,8 +133,9 @@ impl AttachmentCommand {
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data = ep.query_async(client).await?;
op.output_single::<AttachmentResponse>(data)?;
let data: serde_json::Value = ep.query_async(client).await?;

op.output_single::<response::set::AttachmentResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
7 changes: 4 additions & 3 deletions cli-cmd/block-storage/src/v3/attachment/show.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use openstack_sdk::AsyncOpenStack;

use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::attachment::get;
use openstack_types::block_storage::v3::attachment::response::get::AttachmentResponse;
use openstack_types::block_storage::v3::attachment::response;

/// Return data about the given attachment.
#[derive(Args)]
Expand Down Expand Up @@ -80,8 +80,9 @@ impl AttachmentCommand {
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data = ep.query_async(client).await?;
op.output_single::<AttachmentResponse>(data)?;
let data: serde_json::Value = ep.query_async(client).await?;

op.output_single::<response::get::AttachmentResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
5 changes: 3 additions & 2 deletions cli-cmd/block-storage/src/v3/availability_zone/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use openstack_sdk::AsyncOpenStack;

use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::availability_zone::list;
use openstack_types::block_storage::v3::availability_zone::response::list::AvailabilityZoneResponse;
use openstack_types::block_storage::v3::availability_zone::response;

/// Describe all known availability zones.
#[derive(Args)]
Expand Down Expand Up @@ -74,7 +74,8 @@ impl AvailabilityZonesCommand {
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data: Vec<serde_json::Value> = ep.query_async(client).await?;
op.output_list::<AvailabilityZoneResponse>(data)?;

op.output_list::<response::list::AvailabilityZoneResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
7 changes: 4 additions & 3 deletions cli-cmd/block-storage/src/v3/backup/create_30.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use openstack_sdk::AsyncOpenStack;

use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::backup::create_30;
use openstack_types::block_storage::v3::backup::response::create::BackupResponse;
use openstack_types::block_storage::v3::backup::response;

/// Create a new backup.
#[derive(Args)]
Expand Down Expand Up @@ -172,8 +172,9 @@ impl BackupCommand {
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data = ep.query_async(client).await?;
op.output_single::<BackupResponse>(data)?;
let data: serde_json::Value = ep.query_async(client).await?;

op.output_single::<response::create::BackupResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
7 changes: 4 additions & 3 deletions cli-cmd/block-storage/src/v3/backup/create_343.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use openstack_sdk::AsyncOpenStack;
use openstack_cli_core::common::parse_key_val;
use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::backup::create_343;
use openstack_types::block_storage::v3::backup::response::create::BackupResponse;
use openstack_types::block_storage::v3::backup::response;

/// Create a new backup.
#[derive(Args)]
Expand Down Expand Up @@ -183,8 +183,9 @@ impl BackupCommand {
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data = ep.query_async(client).await?;
op.output_single::<BackupResponse>(data)?;
let data: serde_json::Value = ep.query_async(client).await?;

op.output_single::<response::create::BackupResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
7 changes: 4 additions & 3 deletions cli-cmd/block-storage/src/v3/backup/create_351.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use openstack_sdk::AsyncOpenStack;
use openstack_cli_core::common::parse_key_val;
use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::backup::create_351;
use openstack_types::block_storage::v3::backup::response::create::BackupResponse;
use openstack_types::block_storage::v3::backup::response;

/// Create a new backup.
#[derive(Args)]
Expand Down Expand Up @@ -199,8 +199,9 @@ impl BackupCommand {
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data = ep.query_async(client).await?;
op.output_single::<BackupResponse>(data)?;
let data: serde_json::Value = ep.query_async(client).await?;

op.output_single::<response::create::BackupResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
7 changes: 4 additions & 3 deletions cli-cmd/block-storage/src/v3/backup/export_record/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use openstack_sdk::AsyncOpenStack;

use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::backup::export_record::get;
use openstack_types::block_storage::v3::backup::export_record::response::get::ExportRecordResponse;
use openstack_types::block_storage::v3::backup::export_record::response;

/// Export a backup.
#[derive(Args)]
Expand Down Expand Up @@ -83,8 +83,9 @@ impl ExportRecordCommand {
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data = ep.query_async(client).await?;
op.output_single::<ExportRecordResponse>(data)?;
let data: serde_json::Value = ep.query_async(client).await?;

op.output_single::<response::get::ExportRecordResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
7 changes: 4 additions & 3 deletions cli-cmd/block-storage/src/v3/backup/import_record/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use openstack_sdk::AsyncOpenStack;

use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::backup::import_record::create;
use openstack_types::block_storage::v3::backup::import_record::response::create::ImportRecordResponse;
use openstack_types::block_storage::v3::backup::import_record::response;

/// Import a backup.
#[derive(Args)]
Expand Down Expand Up @@ -105,8 +105,9 @@ impl ImportRecordCommand {
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data = ep.query_async(client).await?;
op.output_single::<ImportRecordResponse>(data)?;
let data: serde_json::Value = ep.query_async(client).await?;

op.output_single::<response::create::ImportRecordResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
5 changes: 3 additions & 2 deletions cli-cmd/block-storage/src/v3/backup/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use openstack_sdk::AsyncOpenStack;
use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::backup::list_detailed;
use openstack_sdk::api::{Pagination, paged};
use openstack_types::block_storage::v3::backup::response::list_detailed::BackupResponse;
use openstack_types::block_storage::v3::backup::response;

/// Returns a detailed list of backups.
#[derive(Args)]
Expand Down Expand Up @@ -153,7 +153,8 @@ impl BackupsCommand {
let data: Vec<serde_json::Value> = paged(ep, Pagination::Limit(self.max_items))
.query_async(client)
.await?;
op.output_list::<BackupResponse>(data)?;

op.output_list::<response::list_detailed::BackupResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
7 changes: 4 additions & 3 deletions cli-cmd/block-storage/src/v3/backup/restore/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use openstack_sdk::AsyncOpenStack;

use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::backup::restore::create;
use openstack_types::block_storage::v3::backup::restore::response::create::RestoreResponse;
use openstack_types::block_storage::v3::backup::restore::response;

/// Restore an existing backup to a volume.
#[derive(Args)]
Expand Down Expand Up @@ -121,8 +121,9 @@ impl RestoreCommand {
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data = ep.query_async(client).await?;
op.output_single::<RestoreResponse>(data)?;
let data: serde_json::Value = ep.query_async(client).await?;

op.output_single::<response::create::RestoreResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
7 changes: 4 additions & 3 deletions cli-cmd/block-storage/src/v3/backup/set_343.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::backup::find;
use openstack_sdk::api::block_storage::v3::backup::set_343;
use openstack_sdk::api::find;
use openstack_types::block_storage::v3::backup::response::set::BackupResponse;
use openstack_types::block_storage::v3::backup::response;

/// Update a backup.
#[derive(Args)]
Expand Down Expand Up @@ -147,8 +147,9 @@ impl BackupCommand {
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data = ep.query_async(client).await?;
op.output_single::<BackupResponse>(data)?;
let data: serde_json::Value = ep.query_async(client).await?;

op.output_single::<response::set::BackupResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
7 changes: 4 additions & 3 deletions cli-cmd/block-storage/src/v3/backup/set_39.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::backup::find;
use openstack_sdk::api::block_storage::v3::backup::set_39;
use openstack_sdk::api::find;
use openstack_types::block_storage::v3::backup::response::set::BackupResponse;
use openstack_types::block_storage::v3::backup::response;

/// Update a backup.
#[derive(Args)]
Expand Down Expand Up @@ -140,8 +140,9 @@ impl BackupCommand {
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data = ep.query_async(client).await?;
op.output_single::<BackupResponse>(data)?;
let data: serde_json::Value = ep.query_async(client).await?;

op.output_single::<response::set::BackupResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
4 changes: 2 additions & 2 deletions cli-cmd/block-storage/src/v3/backup/show.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use openstack_sdk::AsyncOpenStack;
use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::backup::find;
use openstack_sdk::api::find;
use openstack_types::block_storage::v3::backup::response::get::BackupResponse;
use openstack_types::block_storage::v3::backup::response;

/// Return data about the given backup.
#[derive(Args)]
Expand Down Expand Up @@ -82,7 +82,7 @@ impl BackupCommand {
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;
let find_data: serde_json::Value = find(find_ep).query_async(client).await?;

op.output_single::<BackupResponse>(find_data)?;
op.output_single::<response::get::BackupResponse>(find_data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
7 changes: 4 additions & 3 deletions cli-cmd/block-storage/src/v3/capability/show.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use openstack_sdk::AsyncOpenStack;

use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::capability::get;
use openstack_types::block_storage::v3::capability::response::get::CapabilityResponse;
use openstack_types::block_storage::v3::capability::response;

/// Return capabilities list of given backend.
#[derive(Args)]
Expand Down Expand Up @@ -81,8 +81,9 @@ impl CapabilityCommand {
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data = ep.query_async(client).await?;
op.output_single::<CapabilityResponse>(data)?;
let data: serde_json::Value = ep.query_async(client).await?;

op.output_single::<response::get::CapabilityResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
7 changes: 4 additions & 3 deletions cli-cmd/block-storage/src/v3/cgsnapshot/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use openstack_sdk::AsyncOpenStack;
use openstack_cli_core::common::parse_key_val;
use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::cgsnapshot::create;
use openstack_types::block_storage::v3::cgsnapshot::response::create::CgsnapshotResponse;
use openstack_types::block_storage::v3::cgsnapshot::response;
use serde_json::Value;

/// Create a new cgsnapshot.
Expand Down Expand Up @@ -124,8 +124,9 @@ impl CgsnapshotCommand {
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data = ep.query_async(client).await?;
op.output_single::<CgsnapshotResponse>(data)?;
let data: serde_json::Value = ep.query_async(client).await?;

op.output_single::<response::create::CgsnapshotResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
7 changes: 4 additions & 3 deletions cli-cmd/block-storage/src/v3/cgsnapshot/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use openstack_sdk::AsyncOpenStack;

use openstack_sdk::api::QueryAsync;
use openstack_sdk::api::block_storage::v3::cgsnapshot::list_detailed;
use openstack_types::block_storage::v3::cgsnapshot::response::list_detailed::CgsnapshotResponse;
use openstack_types::block_storage::v3::cgsnapshot::response;

/// Returns a detailed list of cgsnapshots.
#[derive(Args)]
Expand Down Expand Up @@ -71,8 +71,9 @@ impl CgsnapshotsCommand {
.build()
.map_err(|x| OpenStackCliError::EndpointBuild(x.to_string()))?;

let data = ep.query_async(client).await?;
op.output_single::<CgsnapshotResponse>(data)?;
let data: serde_json::Value = ep.query_async(client).await?;

op.output_single::<response::list_detailed::CgsnapshotResponse>(data.clone())?;
// Show command specific hints
op.show_command_hint()?;
Ok(())
Expand Down
Loading
Loading