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

Function provider_refresh_status

crates/openshell-cli/src/run.rs:5232–5264  ·  view source on GitHub ↗
(
    server: &str,
    name: &str,
    credential_key: Option<&str>,
    tls: &TlsOptions,
)

Source from the content-addressed store, hash-verified

5230}
5231
5232pub async fn provider_refresh_status(
5233 server: &str,
5234 name: &str,
5235 credential_key: Option<&str>,
5236 tls: &TlsOptions,
5237) -> Result<()> {
5238 let mut client = grpc_client(server, tls).await?;
5239 let response = client
5240 .get_provider_refresh_status(GetProviderRefreshStatusRequest {
5241 provider: name.to_string(),
5242 credential_key: credential_key.unwrap_or_default().to_string(),
5243 })
5244 .await
5245 .into_diagnostic()?
5246 .into_inner();
5247
5248 if response.credentials.is_empty() {
5249 if let Some(credential_key) = credential_key {
5250 println!(
5251 "No refresh configuration found for provider '{name}' credential '{credential_key}'."
5252 );
5253 } else {
5254 println!("No refresh configurations found for provider '{name}'.");
5255 }
5256 return Ok(());
5257 }
5258
5259 println!("{}", refresh_status_header());
5260 for status in response.credentials {
5261 print_refresh_status_row(&status);
5262 }
5263 Ok(())
5264}
5265
5266fn refresh_status_header() -> String {
5267 format!(

Callers 2

mainFunction · 0.85

Calls 4

grpc_clientFunction · 0.85
print_refresh_status_rowFunction · 0.85
is_emptyMethod · 0.45