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

Function provider_rotate

crates/openshell-cli/src/run.rs:5321–5354  ·  view source on GitHub ↗
(
    server: &str,
    name: &str,
    credential_key: &str,
    tls: &TlsOptions,
)

Source from the content-addressed store, hash-verified

5319}
5320
5321pub async fn provider_rotate(
5322 server: &str,
5323 name: &str,
5324 credential_key: &str,
5325 tls: &TlsOptions,
5326) -> Result<()> {
5327 let mut client = grpc_client(server, tls).await?;
5328 let status = client
5329 .rotate_provider_credential(RotateProviderCredentialRequest {
5330 provider: name.to_string(),
5331 credential_key: credential_key.to_string(),
5332 })
5333 .await
5334 .into_diagnostic()?
5335 .into_inner()
5336 .status
5337 .ok_or_else(|| miette!("provider refresh status missing from response"))?;
5338
5339 if status.last_error.is_empty() {
5340 println!(
5341 "{} Rotation requested for {} {} ({})",
5342 "✓".green().bold(),
5343 status.provider_name,
5344 status.credential_key,
5345 status.status
5346 );
5347 } else {
5348 println!(
5349 "Rotation request recorded for {} {} ({}): {}",
5350 status.provider_name, status.credential_key, status.status, status.last_error
5351 );
5352 }
5353 Ok(())
5354}
5355
5356pub async fn provider_refresh_delete(
5357 server: &str,

Callers 2

mainFunction · 0.85

Calls 3

grpc_clientFunction · 0.85
is_emptyMethod · 0.45