Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ahl committed May 24, 2024
1 parent 266771a commit 7a69ee5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
5 changes: 2 additions & 3 deletions nexus/src/app/rack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ impl super::Nexus {
.parse()
.unwrap(),
),
network: ipv4_net.clone().into(),
network: (*ipv4_net).into(),
})
.collect(),
},
Expand Down Expand Up @@ -822,8 +822,7 @@ impl super::Nexus {
rack_subnet,
allocation.subnet_octet.try_into().unwrap(),
)
.net()
.into(),
.net(),
},
},
},
Expand Down
7 changes: 6 additions & 1 deletion sled-agent/src/rack_setup/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ mod test {
use omicron_common::address::IpRange;
use omicron_common::api::internal::shared::AllowedSourceIps;
use omicron_common::api::internal::shared::RackNetworkConfig;
use oxnet::Ipv6Net;
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};

#[test]
Expand Down Expand Up @@ -125,7 +126,11 @@ mod test {
.unwrap(),
},
rack_network_config: RackNetworkConfig {
rack_subnet: "fd00:1122:3344:0100::".parse().unwrap(),
rack_subnet: Ipv6Net::new(
"fd00:1122:3344:0100::".parse().unwrap(),
RACK_PREFIX,
)
.unwrap(),
infra_ip_first: Ipv4Addr::LOCALHOST,
infra_ip_last: Ipv4Addr::LOCALHOST,
ports: Vec::new(),
Expand Down
4 changes: 2 additions & 2 deletions sled-agent/src/rack_setup/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ impl ServiceInner {
let rack_network_config = {
let config = &config.rack_network_config;
NexusTypes::RackNetworkConfigV1 {
rack_subnet: config.rack_subnet.into(),
rack_subnet: config.rack_subnet,
infra_ip_first: config.infra_ip_first,
infra_ip_last: config.infra_ip_last,
ports: config
Expand All @@ -746,7 +746,7 @@ impl ServiceInner {
.routes
.iter()
.map(|r| NexusTypes::RouteConfig {
destination: r.destination.into(),
destination: r.destination,
nexthop: r.nexthop,
vlan_id: r.vlan_id,
})
Expand Down

0 comments on commit 7a69ee5

Please sign in to comment.