diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-03-23 05:53:51 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-03-23 05:53:51 +0000 |
commit | f44770ab64d465c099ca893a0536e467052f9d3b (patch) | |
tree | e45cfffc298033cc34c8b9d7bed894e4696c55f8 /src/cmd/inspect.rs | |
parent | 4a9b26903d48d622f7f2a01eb54eec88e92da868 (diff) | |
parent | d692b1877a18e83e23cfbcad1b5e9f91f561e7c1 (diff) | |
download | obnam2-f44770ab64d465c099ca893a0536e467052f9d3b.tar.gz |
Merge branch 'liw/trust-root' into 'main'
Add chunk that lists all generations
Closes #62 and #34
See merge request obnam/obnam!224
Diffstat (limited to 'src/cmd/inspect.rs')
-rw-r--r-- | src/cmd/inspect.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/cmd/inspect.rs b/src/cmd/inspect.rs index d5a75c6..02801ae 100644 --- a/src/cmd/inspect.rs +++ b/src/cmd/inspect.rs @@ -1,5 +1,7 @@ //! The `inspect` subcommand. +use crate::backup_run::current_timestamp; +use crate::chunk::ClientTrust; use crate::client::BackupClient; use crate::config::ClientConfig; use crate::error::ObnamError; @@ -27,7 +29,12 @@ impl Inspect { async fn run_async(&self, config: &ClientConfig) -> Result<(), ObnamError> { let temp = NamedTempFile::new()?; let client = BackupClient::new(config)?; - let genlist = client.list_generations().await?; + let trust = client + .get_client_trust() + .await? + .or_else(|| Some(ClientTrust::new("FIXME", None, current_timestamp(), vec![]))) + .unwrap(); + let genlist = client.list_generations(&trust); let gen_id = genlist.resolve(&self.gen_id)?; info!("generation id is {}", gen_id.as_chunk_id()); |