Change 'zenith tenant list' API to return tenant state added in 0dc7a3fc

This commit is contained in:
anastasia
2021-10-19 11:11:25 +03:00
committed by lubennikovaav
parent 13f4e173c9
commit 7f9d2a7d05
10 changed files with 51 additions and 31 deletions

View File

@@ -20,6 +20,7 @@ use zenith_utils::zid::ZTenantId;
use crate::local_env::LocalEnv;
use crate::read_pidfile;
use pageserver::branches::BranchInfo;
use pageserver::tenant_mgr::TenantInfo;
use zenith_utils::connstring::connection_address;
#[derive(Error, Debug)]
@@ -269,7 +270,7 @@ impl PageServerNode {
Ok(())
}
pub fn tenant_list(&self) -> Result<Vec<String>> {
pub fn tenant_list(&self) -> Result<Vec<TenantInfo>> {
Ok(self
.http_request(Method::GET, format!("{}/{}", self.http_base_url, "tenant"))
.send()?