Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions dev-tools/reconfigurator-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ impl ReconfiguratorSim {
let rng = state.rng_mut().next_example_rng();

let builder = f(ExampleSystemBuilder::new_with_rng(&self.log, rng)
.nexus_count(
.with_nexus_count(
state
.config_mut()
.num_nexus()
Expand Down Expand Up @@ -3623,11 +3623,11 @@ fn cmd_load_example(
) -> anyhow::Result<Option<String>> {
sim.load_example(args.seed, |builder| {
let mut builder = builder
.nsleds(args.nsleds)
.ndisks_per_sled(args.ndisks_per_sled)
.external_dns_count(3)
.with_nsleds(args.nsleds)
.with_ndisks_per_sled(args.ndisks_per_sled)
.with_external_dns_count(3)
.context("invalid external DNS zone count")?
.create_disks_in_blueprint(!args.no_disks_in_blueprint);
.with_create_disks_in_blueprint(!args.no_disks_in_blueprint);
for sled_policy in args.sled_policy {
builder = builder
.with_sled_policy(sled_policy.index, sled_policy.policy)
Expand Down
10 changes: 5 additions & 5 deletions nexus/db-queries/src/db/datastore/deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4312,13 +4312,13 @@ mod tests {
// Nexus zone).
let (example_system, blueprint1) =
ExampleSystemBuilder::new(&opctx.log, test_name)
.nsleds(1)
.nexus_count(1)
.internal_dns_count(0)
.with_nsleds(1)
.with_nexus_count(1)
.with_internal_dns_count(0)
.expect("internal DNS count can be 0")
.external_dns_count(0)
.with_external_dns_count(0)
.expect("external DNS count can be 0")
.crucible_pantry_count(0)
.with_crucible_pantry_count(0)
.build();
let blueprint2 = BlueprintBuilder::new_based_on(
&logctx.log,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ mod tests {
// Create a blueprint with no external DNS zones.
let (example_system, bp1) =
ExampleSystemBuilder::new(&opctx.log, TEST_NAME)
.external_dns_count(0)
.with_external_dns_count(0)
.expect("external DNS count can be 0")
.build();

Expand Down
12 changes: 6 additions & 6 deletions nexus/reconfigurator/blippy/src/checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ mod tests {
let logctx = test_setup_log(TEST_NAME);
let (_, mut blueprint) =
ExampleSystemBuilder::new(&logctx.log, TEST_NAME)
.external_dns_count(2)
.with_external_dns_count(2)
.unwrap()
.build();

Expand Down Expand Up @@ -1356,7 +1356,7 @@ mod tests {
let logctx = test_setup_log(TEST_NAME);
let (_, mut blueprint) =
ExampleSystemBuilder::new(&logctx.log, TEST_NAME)
.external_dns_count(2)
.with_external_dns_count(2)
.unwrap()
.build();

Expand Down Expand Up @@ -2050,8 +2050,8 @@ mod tests {
static TEST_NAME: &str = "test_nexus_generation_no_nexus";
let logctx = test_setup_log(TEST_NAME);
let (_, blueprint) = ExampleSystemBuilder::new(&logctx.log, TEST_NAME)
.nsleds(1)
.nexus_count(0)
.with_nsleds(1)
.with_nexus_count(0)
.build();

// Run blippy checks
Expand All @@ -2078,8 +2078,8 @@ mod tests {
let logctx = test_setup_log(TEST_NAME);
let (_, mut blueprint) =
ExampleSystemBuilder::new(&logctx.log, TEST_NAME)
.nsleds(3)
.nexus_count(3)
.with_nsleds(3)
.with_nexus_count(3)
.build();

// Find the Nexus zones
Expand Down
6 changes: 3 additions & 3 deletions nexus/reconfigurator/execution/src/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1058,10 +1058,10 @@ mod test {
static TEST_NAME: &str = "test_blueprint_external_dns_basic";
let logctx = test_setup_log(TEST_NAME);
let system_builder = ExampleSystemBuilder::new(&logctx.log, TEST_NAME)
.nsleds(5)
.external_dns_count(3)
.with_nsleds(5)
.with_external_dns_count(3)
.expect("can set external dns count");
let external_dns_count = system_builder.get_external_dns_zones();
let external_dns_count = system_builder.external_dns_zones();
let (_, mut blueprint) = system_builder.build();
blueprint.internal_dns_version = Generation::new();
blueprint.external_dns_version = Generation::new();
Expand Down
5 changes: 3 additions & 2 deletions nexus/reconfigurator/execution/src/sagas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ mod test {

// First, create a basic blueprint with several Nexus zones in
// generation 1.
let (example, blueprint1) =
ExampleSystemBuilder::new(log, TEST_NAME).nexus_count(4).build();
let (example, blueprint1) = ExampleSystemBuilder::new(log, TEST_NAME)
.with_nexus_count(4)
.build();
let g1 = Generation::new();
let g1_nexus_ids: Vec<_> = blueprint1
.in_service_nexus_zones()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2936,8 +2936,8 @@ pub mod test {
// the disks around so that `sled_add_disks` can add them.
let (example, parent) =
ExampleSystemBuilder::new(&logctx.log, TEST_NAME)
.create_zones(false)
.create_disks_in_blueprint(false)
.with_create_zones(false)
.with_create_disks_in_blueprint(false)
.build();
let input = example.input;

Expand Down Expand Up @@ -3170,7 +3170,7 @@ pub mod test {
// Start with an empty system (sleds with no zones).
let (example, parent) =
ExampleSystemBuilder::new(&logctx.log, TEST_NAME)
.create_zones(false)
.with_create_zones(false)
.build();
let collection = example.collection;
let input = example.input;
Expand Down Expand Up @@ -3521,7 +3521,7 @@ pub mod test {

// Use our example system.
let (system, blueprint1) =
ExampleSystemBuilder::new(&log, TEST_NAME).nsleds(1).build();
ExampleSystemBuilder::new(&log, TEST_NAME).with_nsleds(1).build();

// Find a zone and change its image source.
let mut blueprint_builder = BlueprintBuilder::new_based_on(
Expand Down
Loading
Loading