Skip to content

Commit

Permalink
phase two: rework imports
Browse files Browse the repository at this point in the history
  • Loading branch information
davepacheco committed Jun 21, 2024
1 parent fc933eb commit 79036c4
Show file tree
Hide file tree
Showing 21 changed files with 20 additions and 23 deletions.
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/abandoned_vmm_reaper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
//! is handled elsewhere, by `notify_instance_updated` and (eventually) the
//! `instance-update` saga.

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;
use anyhow::Context;
use futures::future::BoxFuture;
use futures::FutureExt;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/bfd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::app::{
background::tasks::networking::build_mgd_clients, map_switch_zone_addrs,
};

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;
use futures::future::BoxFuture;
use futures::FutureExt;
use internal_dns::{resolver::Resolver, ServiceName};
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/blueprint_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

//! Background task for realizing a plan blueprint

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;
use futures::future::BoxFuture;
use futures::FutureExt;
use nexus_db_queries::context::OpContext;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/blueprint_load.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//! This task triggers the `blueprint_execution` background task when the
//! blueprint changes.

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;
use futures::future::BoxFuture;
use futures::FutureExt;
use nexus_db_queries::context::OpContext;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/crdb_node_id_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
//! the status of all nodes and looking for orphans, perhaps) to determine
//! whether a zone without a known node ID ever existed.

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;
use anyhow::ensure;
use anyhow::Context;
use futures::future::BoxFuture;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/dns_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

//! Background task for keeping track of DNS configuration

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;
use dns_service_client::types::DnsConfigParams;
use futures::future::BoxFuture;
use futures::FutureExt;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/dns_propagation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

//! Background task for propagating DNS configuration to all DNS servers

use super::common::BackgroundTask;
use super::dns_servers::DnsServersList;
use crate::app::background::common::BackgroundTask;
use anyhow::Context;
use dns_service_client::types::DnsConfigParams;
use futures::future::BoxFuture;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/dns_servers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

//! Background task for keeping track of DNS servers

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;
use futures::future::BoxFuture;
use futures::FutureExt;
use internal_dns::names::ServiceName;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/external_endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//! all Silos, their externally-visible DNS names, and the TLS certificates
//! associated with those names

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;
use crate::app::external_endpoints::read_all_endpoints;
pub use crate::app::external_endpoints::ExternalEndpoints;
use futures::future::BoxFuture;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/instance_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

//! Background task for pulling instance state from sled-agents.

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;
use futures::{future::BoxFuture, FutureExt};
use http::StatusCode;
use nexus_db_model::Instance;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/inventory_collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

//! Background task for reading inventory for the rack

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;
use anyhow::ensure;
use anyhow::Context;
use futures::future::BoxFuture;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/metrics_producer_gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! Background task for garbage collecting metrics producers that have not
//! renewed their lease

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;
use chrono::TimeDelta;
use chrono::Utc;
use futures::future::BoxFuture;
Expand Down
3 changes: 0 additions & 3 deletions nexus/src/app/background/tasks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ pub mod service_firewall_rules;
pub mod sync_service_zone_nat;
pub mod sync_switch_configuration;
pub mod v2p_mappings;

// XXX-dap fix up all the individual tasks to fix up this import
use super::common;
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/nat_cleanup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

use crate::app::map_switch_zone_addrs;

use super::common::BackgroundTask;
use super::networking::build_dpd_clients;
use crate::app::background::common::BackgroundTask;
use chrono::{Duration, Utc};
use futures::future::BoxFuture;
use futures::FutureExt;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/phantom_disks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! this background task is required to apply the same fix for disks that are
//! already in this phantom state.

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;
use futures::future::BoxFuture;
use futures::FutureExt;
use nexus_db_queries::context::OpContext;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/physical_disk_adoption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//!
//! In the future, this may become more explicitly operator-controlled.

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;
use futures::future::BoxFuture;
use futures::FutureExt;
use nexus_db_model::PhysicalDisk;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/region_replacement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//! for any requests that are in state "Requested". See the documentation there
//! for more information.

use super::common::BackgroundTask;
use crate::app::authn;
use crate::app::background::common::BackgroundTask;
use crate::app::sagas;
use crate::app::RegionAllocationStrategy;
use futures::future::BoxFuture;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/service_firewall_rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//! handle general changes to customer-visible VPC firewalls, and is mostly in
//! place to propagate changes in the IP allowlist for user-facing services.

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;
use futures::future::BoxFuture;
use futures::FutureExt;
use nexus_db_queries::context::OpContext;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/sync_service_zone_nat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

use crate::app::map_switch_zone_addrs;

use super::common::BackgroundTask;
use super::networking::build_dpd_clients;
use crate::app::background::common::BackgroundTask;
use anyhow::Context;
use futures::future::BoxFuture;
use futures::FutureExt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use nexus_db_model::{
};
use uuid::Uuid;

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;
use display_error_chain::DisplayErrorChain;
use dpd_client::types::PortId;
use futures::future::BoxFuture;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/v2p_mappings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use omicron_common::api::external::Vni;
use serde_json::json;
use sled_agent_client::types::VirtualNetworkInterfaceHost;

use super::common::BackgroundTask;
use crate::app::background::common::BackgroundTask;

pub struct V2PManager {
datastore: Arc<DataStore>,
Expand Down

0 comments on commit 79036c4

Please sign in to comment.