Skip to content
Open
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
33 changes: 33 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ openstack-cli-auth = { path="cli/auth", version = "0.13.7" }
openstack-cli-block-storage = { path="cli/block-storage/", version = "0.13.7" }
openstack-cli-catalog = { path="cli/catalog/", version = "0.13.7" }
openstack-cli-compute = { path="cli/compute/", version = "0.13.7" }
openstack-cli-config = { path="cli/config/", version = "0.13.7" }
openstack-cli-container-infrastructure-management = { path="cli/container-infrastructure-management/", version = "0.13.7" }
openstack-cli-core = { path="cli/core", version = "0.13.7" }
openstack-cli-dns = { path="cli/dns/", version = "0.13.7" }
Expand All @@ -103,6 +104,7 @@ schemars = { version = "^1.2" }
secrecy = { version = "^0.10", features = ["serde"] }
serde = { version="^1.0", features=["derive"] }
serde_json = "^1.0"
serde_yaml = "^0.9"
serde_bytes = "^0.11"
serde_urlencoded = "^0.7"
sha2 = { version = "^0.11", default-features = false }
Expand Down
28 changes: 28 additions & 0 deletions cli/config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[package]
name = "openstack-cli-config"
description = "OpenStack CLI config commands"
version = "0.13.7"
license.workspace = true
edition.workspace = true
authors.workspace = true
rust-version.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
clap.workspace = true
dirs.workspace = true
eyre.workspace = true
openstack-cli-core.workspace = true
openstack_sdk_core.workspace = true
serde.workspace = true
serde_json.workspace = true
serde_yaml.workspace = true
tracing.workspace = true
zeroize = { workspace = true, features = ["derive"] }

[dev-dependencies]
tempfile.workspace = true

[lints]
workspace = true
49 changes: 49 additions & 0 deletions cli/config/src/clouds.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0

//! Cloud entry operations on clouds.yaml/secure.yaml

use clap::{Parser, Subcommand};

use openstack_cli_core::{cli::CliArgs, error::OpenStackCliError};
use openstack_sdk_core::config::CloudConfig;

pub mod add;

/// Manage cloud entries in clouds.yaml/secure.yaml
#[derive(Parser)]
pub struct CloudsCommand {
/// Cloud entry commands
#[command(subcommand)]
pub command: CloudsCommands,
}

#[allow(missing_docs)]
#[derive(Subcommand)]
pub enum CloudsCommands {
Add(add::AddCommand),
}

impl CloudsCommand {
/// Perform command action
pub fn take_action<C: CliArgs>(
&self,
parsed_args: &C,
cloud_config: &CloudConfig,
) -> Result<(), OpenStackCliError> {
match &self.command {
CloudsCommands::Add(cmd) => cmd.take_action(parsed_args, cloud_config),
}
}
}
Loading
Loading