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: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ jobs:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
test_args: ""
rust_ver: 1.91
# Must match cli/config/Cargo.toml's `rust-version` (pinned
# there for yamlpatch/yamlpath, comment/anchor-preserving YAML
# edits). The workspace default build (no -p filter below)
# includes cli/config, so bumping either value without the
# other breaks this job.
rust_ver: 1.97
# - target: x86_64-unknown-linux-musl
# os: ubuntu-latest
# - target: x86_64-apple-darwin
Expand Down
146 changes: 146 additions & 0 deletions Cargo.lock

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

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ http-body-util = "^0.1"
httpmock = { version = "^0.8" }
hyper = { version = "^1.11" }
hyper-util = { version = "^0.1" }
indexmap = { version = "^2.14" }
inventory = { version = "0.3" }
itertools = { version = "^0.15" }
jsonschema = { version = "0.53", default-features = false }
Expand All @@ -83,6 +84,7 @@ openstack-cli-auth = { path="cli/auth", version = "0.13.8" }
openstack-cli-block-storage = { path="cli/block-storage/", version = "0.13.8" }
openstack-cli-catalog = { path="cli/catalog/", version = "0.13.8" }
openstack-cli-compute = { path="cli/compute/", version = "0.13.8" }
openstack-cli-config = { path="cli/config/", version = "0.13.8" }
openstack-cli-container-infrastructure-management = { path="cli/container-infrastructure-management/", version = "0.13.8" }
openstack-cli-core = { path="cli/core", version = "0.13.8" }
openstack-cli-dns = { path="cli/dns/", version = "0.13.8" }
Expand Down Expand Up @@ -131,6 +133,13 @@ webauthn-authenticator-rs = { version = "^0.5", features = ["ctap2", "mozilla",
webauthn-rs-proto = { version = "^0.5" }
uuid = { version = "^1.26" }
x509-parser = { version = "^0.18" }
# Comment/anchor-preserving YAML editing, used by cli/config's yaml_edit
# module. Both pin to zizmor's release train (the project they originate
# from); yaml_serde is the actively maintained fork of the now-archived
# serde_yaml, with the same API shape.
yaml_serde = { version = "^0.10" }
yamlpatch = { version = "^1.30" }
yamlpath = { version = "^1.30" }
zeroize = { version = "^1.9" }

[profile.dev]
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.8"
license.workspace = true
edition.workspace = true
authors.workspace = true
# `yamlpatch`/`yamlpath` (see src/yaml_edit.rs) require a newer toolchain
# than the rest of the workspace. Scoped to this crate only: nothing else
# in the workspace depends on `openstack-cli-config`, so SDK-only consumers
# never pull this requirement in. See CONTRIBUTING.md / the PR description
# for context.
# Keep in sync with .github/workflows/ci.yml's `rust_ver` — the workspace
# default build includes this crate, so a mismatch breaks CI.
rust-version = "1.97"
homepage.workspace = true
repository.workspace = true

[dependencies]
indexmap.workspace = true
serde.workspace = true
thiserror.workspace = true
yaml_serde.workspace = true
yamlpatch.workspace = true
yamlpath.workspace = true

[lints]
workspace = true
21 changes: 21 additions & 0 deletions cli/config/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// 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
//! Local client configuration file operations.
//!
//! This crate is the foundation for `osc config` commands that read and
//! edit `clouds.yaml`/`secure.yaml` in place. It currently provides
//! [`yaml_edit`], a comment- and anchor-preserving YAML editor; command
//! implementations built on top of it (e.g. `clouds add`) land separately.

pub mod yaml_edit;
Loading
Loading