Skip to content

Commit

Permalink
Rename enum variant and apply to vpc_routes rpw
Browse files Browse the repository at this point in the history
  • Loading branch information
Levon Tarver committed Jul 3, 2024
1 parent c160cd6 commit 74204a3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dev-tools/omdb/tests/usage_errors.out
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ Options:
for discretionary services)
- query-during-inventory: Sleds whose sled agents should be queried for inventory
- reservation-create: Sleds on which reservations can be created
- v2p-mapping: Sleds which should be sent OPTE V2P mappings
- vpc-routing: Sleds which should be sent OPTE V2P mappings
- vpc-firewall: Sleds which should be sent VPC firewall rules

--log-level <LOG_LEVEL>
Expand Down
4 changes: 2 additions & 2 deletions nexus/db-queries/src/db/datastore/v2p_mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl DataStore {
.filter(
network_interface::kind.eq(NetworkInterfaceKind::Instance),
)
.sled_filter(SledFilter::V2PMapping)
.sled_filter(SledFilter::VpcRouting)
.select((
NetworkInterface::as_select(),
Sled::as_select(),
Expand Down Expand Up @@ -116,7 +116,7 @@ impl DataStore {
.inner_join(sled_dsl::sled.on(sled_dsl::id.eq(probe_dsl::sled)))
.filter(network_interface::time_deleted.is_null())
.filter(network_interface::kind.eq(NetworkInterfaceKind::Probe))
.sled_filter(SledFilter::V2PMapping)
.sled_filter(SledFilter::VpcRouting)
.select((
NetworkInterface::as_select(),
Sled::as_select(),
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 @@ -42,7 +42,7 @@ impl BackgroundTask for V2PManager {

// Get sleds
// we only care about sleds that are active && inservice
let sleds = match self.datastore.sled_list_all_batched(opctx, SledFilter::V2PMapping).await
let sleds = match self.datastore.sled_list_all_batched(opctx, SledFilter::VpcRouting).await
{
Ok(v) => v,
Err(e) => {
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/background/tasks/vpc_routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl BackgroundTask for VpcRouteManager {

let sleds = match self
.datastore
.sled_list_all_batched(opctx, SledFilter::InService)
.sled_list_all_batched(opctx, SledFilter::VpcRouting)
.await
{
Ok(v) => v,
Expand Down
12 changes: 6 additions & 6 deletions nexus/types/src/deployment/planning_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ pub enum SledFilter {
ReservationCreate,

/// Sleds which should be sent OPTE V2P mappings.
V2PMapping,
VpcRouting,

/// Sleds which should be sent VPC firewall rules.
VpcFirewall,
Expand Down Expand Up @@ -541,7 +541,7 @@ impl SledPolicy {
SledFilter::InService => true,
SledFilter::QueryDuringInventory => true,
SledFilter::ReservationCreate => true,
SledFilter::V2PMapping => true,
SledFilter::VpcRouting => true,
SledFilter::VpcFirewall => true,
},
SledPolicy::InService {
Expand All @@ -553,7 +553,7 @@ impl SledPolicy {
SledFilter::InService => true,
SledFilter::QueryDuringInventory => true,
SledFilter::ReservationCreate => false,
SledFilter::V2PMapping => true,
SledFilter::VpcRouting => true,
SledFilter::VpcFirewall => true,
},
SledPolicy::Expunged => match filter {
Expand All @@ -563,7 +563,7 @@ impl SledPolicy {
SledFilter::InService => false,
SledFilter::QueryDuringInventory => false,
SledFilter::ReservationCreate => false,
SledFilter::V2PMapping => false,
SledFilter::VpcRouting => false,
SledFilter::VpcFirewall => false,
},
}
Expand Down Expand Up @@ -595,7 +595,7 @@ impl SledState {
SledFilter::InService => true,
SledFilter::QueryDuringInventory => true,
SledFilter::ReservationCreate => true,
SledFilter::V2PMapping => true,
SledFilter::VpcRouting => true,
SledFilter::VpcFirewall => true,
},
SledState::Decommissioned => match filter {
Expand All @@ -605,7 +605,7 @@ impl SledState {
SledFilter::InService => false,
SledFilter::QueryDuringInventory => false,
SledFilter::ReservationCreate => false,
SledFilter::V2PMapping => false,
SledFilter::VpcRouting => false,
SledFilter::VpcFirewall => false,
},
}
Expand Down

0 comments on commit 74204a3

Please sign in to comment.