Skip to content

Commit

Permalink
copy-pastes, minor diskfilter cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
smklein committed Jul 3, 2024
1 parent 05a9f38 commit df9835e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
4 changes: 2 additions & 2 deletions dev-tools/omdb/src/bin/omdb/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1438,8 +1438,8 @@ async fn cmd_db_physical_disks(
let sleds = datastore
.physical_disk_list(&opctx, &first_page(limit), filter)
.await
.context("listing sleds")?;
check_limit(&sleds, limit, || String::from("listing sleds"));
.context("listing physical disks")?;
check_limit(&sleds, limit, || String::from("listing physical disks"));

let rows = sleds.into_iter().map(|s| PhysicalDiskRow::from(s));
let table = tabled::Table::new(rows)
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/omdb/src/bin/omdb/nexus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,7 @@ async fn cmd_nexus_sled_expunge_disk(
}
};

// Now check whether its sled-agent or SP were found in the most recent
// Now check whether its sled-agent was found in the most recent
// inventory collection.
match datastore
.inventory_get_latest_collection(opctx)
Expand Down
10 changes: 1 addition & 9 deletions nexus/types/src/deployment/planning_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,7 @@ impl DiskFilter {
policy: PhysicalDiskPolicy,
state: PhysicalDiskState,
) -> bool {
match self {
DiskFilter::All => true,
DiskFilter::InService => match (policy, state) {
(PhysicalDiskPolicy::InService, PhysicalDiskState::Active) => {
true
}
_ => false,
},
}
policy.matches(self) && state.matches(self)
}
}

Expand Down

0 comments on commit df9835e

Please sign in to comment.