MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / gateway_setting_delete

Function gateway_setting_delete

crates/openshell-cli/src/run.rs:6565–6600  ·  view source on GitHub ↗
(
    server: &str,
    key: &str,
    yes: bool,
    tls: &TlsOptions,
)

Source from the content-addressed store, hash-verified

6563}
6564
6565pub async fn gateway_setting_delete(
6566 server: &str,
6567 key: &str,
6568 yes: bool,
6569 tls: &TlsOptions,
6570) -> Result<()> {
6571 confirm_global_setting_delete(key, yes)?;
6572
6573 let mut client = grpc_client(server, tls).await?;
6574 let response = client
6575 .update_config(UpdateConfigRequest {
6576 name: String::new(),
6577 policy: None,
6578 setting_key: key.to_string(),
6579 setting_value: None,
6580 delete_setting: true,
6581 global: true,
6582 merge_operations: vec![],
6583 expected_resource_version: 0,
6584 })
6585 .await
6586 .into_diagnostic()?
6587 .into_inner();
6588
6589 if response.deleted {
6590 println!(
6591 "{} Deleted global setting {} (revision {})",
6592 "✓".green().bold(),
6593 key,
6594 response.settings_revision
6595 );
6596 } else {
6597 println!("{} Global setting {} not found", "!".yellow(), key);
6598 }
6599 Ok(())
6600}
6601
6602pub async fn sandbox_setting_delete(
6603 server: &str,

Callers 1

mainFunction · 0.85

Calls 3

grpc_clientFunction · 0.85
update_configMethod · 0.45

Tested by

no test coverage detected