diff options
author | Alex Auvolat <alex@adnab.me> | 2024-03-27 13:32:13 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-03-27 13:32:13 +0100 |
commit | 01a0bd54106941156ca998be1a44b8ac2c3aa74a (patch) | |
tree | d5bd53646d878f5039d39fe811354322fefbddae /src/api/admin | |
parent | c0eeb0b0f32ed0a27cfdf9297d0e71e1b9948b73 (diff) | |
download | garage-01a0bd54106941156ca998be1a44b8ac2c3aa74a.tar.gz garage-01a0bd54106941156ca998be1a44b8ac2c3aa74a.zip |
[next-0.10] remove impl Deref for LayoutHelper
Diffstat (limited to 'src/api/admin')
-rw-r--r-- | src/api/admin/cluster.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/api/admin/cluster.rs b/src/api/admin/cluster.rs index 8c9cb1e5..e5877fcd 100644 --- a/src/api/admin/cluster.rs +++ b/src/api/admin/cluster.rs @@ -78,7 +78,7 @@ pub async fn handle_get_cluster_status(garage: &Arc<Garage>) -> Result<Response< } } - for ver in layout.versions.iter().rev().skip(1) { + for ver in layout.versions().iter().rev().skip(1) { for (id, _, role) in ver.roles.items().iter() { if let layout::NodeRoleV(Some(r)) = role { if !nodes.contains_key(id) && r.capacity.is_some() { @@ -156,7 +156,7 @@ pub async fn handle_connect_cluster_nodes( } pub async fn handle_get_cluster_layout(garage: &Arc<Garage>) -> Result<Response<ResBody>, Error> { - let res = format_cluster_layout(&garage.system.cluster_layout()); + let res = format_cluster_layout(garage.system.cluster_layout().inner()); Ok(json_ok_response(&res)?) } @@ -295,7 +295,7 @@ pub async fn handle_update_cluster_layout( ) -> Result<Response<ResBody>, Error> { let updates = parse_json_body::<UpdateClusterLayoutRequest, _, Error>(req).await?; - let mut layout = garage.system.cluster_layout().clone(); + let mut layout = garage.system.cluster_layout().inner().clone(); let mut roles = layout.current().roles.clone(); roles.merge(&layout.staging.get().roles); @@ -341,7 +341,7 @@ pub async fn handle_apply_cluster_layout( ) -> Result<Response<ResBody>, Error> { let param = parse_json_body::<ApplyLayoutRequest, _, Error>(req).await?; - let layout = garage.system.cluster_layout().clone(); + let layout = garage.system.cluster_layout().inner().clone(); let (layout, msg) = layout.apply_staged_changes(Some(param.version))?; garage @@ -360,7 +360,7 @@ pub async fn handle_apply_cluster_layout( pub async fn handle_revert_cluster_layout( garage: &Arc<Garage>, ) -> Result<Response<ResBody>, Error> { - let layout = garage.system.cluster_layout().clone(); + let layout = garage.system.cluster_layout().inner().clone(); let layout = layout.revert_staged_changes()?; garage .system |