Skip to content

Commit e71b23d

Browse files
committed
add allow_ddm_traffic to PortConfig
1 parent 238e6b3 commit e71b23d

30 files changed

Lines changed: 467 additions & 31 deletions

File tree

dev-tools/rack-init-config/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ mod tests {
147147
autoneg: false,
148148
lldp: Some(lldp("uplink-0")),
149149
tx_eq: None,
150+
allow_ddm_traffic: false,
150151
};
151152
RackInitializeRequest {
152153
trust_quorum_peers: Some(trust_quorum_peers()),
@@ -217,6 +218,7 @@ mod tests {
217218
autoneg: false,
218219
lldp: Some(lldp("uplink-0")),
219220
tx_eq: None,
221+
allow_ddm_traffic: false,
220222
};
221223
let mut request = static_bfd_request();
222224
request.rack_network_config = RackNetworkConfig {

nexus/mgs-updates/src/test_util/host_phase_2_test_state.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ mod api_impl {
278278
use sled_agent_types_versions::v33;
279279
use sled_agent_types_versions::v39;
280280
use sled_agent_types_versions::v42;
281+
use sled_agent_types_versions::v46;
281282
use sled_diagnostics::SledDiagnosticsQueryOutput;
282283
use std::collections::BTreeMap;
283284
use std::collections::BTreeSet;
@@ -772,6 +773,13 @@ mod api_impl {
772773
unimplemented!()
773774
}
774775

776+
async fn write_network_bootstore_config_v46(
777+
_rqctx: RequestContext<Self::Context>,
778+
_body: TypedBody<v46::system_networking::WriteNetworkConfigRequest>,
779+
) -> Result<HttpResponseUpdatedNoContent, HttpError> {
780+
unimplemented!()
781+
}
782+
775783
async fn write_network_bootstore_config_v42(
776784
_rqctx: RequestContext<Self::Context>,
777785
_body: TypedBody<v42::system_networking::WriteNetworkConfigRequest>,

nexus/switch-config/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ pub fn build_rack_network_config(
460460
management_addrs: c.management_ip.map(|ip| vec![ip]),
461461
}),
462462
tx_eq,
463+
allow_ddm_traffic: false,
463464
};
464465

465466
ports.push(port_config);

openapi/bootstrap-agent-lockstep.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,11 @@
13531353
"$ref": "#/components/schemas/UplinkAddressConfig"
13541354
}
13551355
},
1356+
"allow_ddm_traffic": {
1357+
"description": "Whether or not to allow DDM traffic on this port",
1358+
"default": false,
1359+
"type": "boolean"
1360+
},
13561361
"autoneg": {
13571362
"description": "Whether or not to set autonegotiation",
13581363
"default": false,

openapi/nexus-lockstep.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8249,6 +8249,11 @@
82498249
"$ref": "#/components/schemas/UplinkAddressConfig"
82508250
}
82518251
},
8252+
"allow_ddm_traffic": {
8253+
"description": "Whether or not to allow DDM traffic on this port",
8254+
"default": false,
8255+
"type": "boolean"
8256+
},
82528257
"autoneg": {
82538258
"description": "Whether or not to set autonegotiation",
82548259
"default": false,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1a20a12eb13a20c58f91dfae51bb3c4836b4e069:openapi/sled-agent/sled-agent-45.0.0-264d85.json

openapi/sled-agent/sled-agent-45.0.0-264d85.json renamed to openapi/sled-agent/sled-agent-46.0.0-59eec2.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://oxide.computer",
88
"email": "api@oxide.computer"
99
},
10-
"version": "45.0.0"
10+
"version": "46.0.0"
1111
},
1212
"paths": {
1313
"/artifacts": {
@@ -8264,6 +8264,11 @@
82648264
"$ref": "#/components/schemas/UplinkAddressConfig"
82658265
}
82668266
},
8267+
"allow_ddm_traffic": {
8268+
"description": "Whether or not to allow DDM traffic on this port",
8269+
"default": false,
8270+
"type": "boolean"
8271+
},
82678272
"autoneg": {
82688273
"description": "Whether or not to set autonegotiation",
82698274
"default": false,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sled-agent-45.0.0-264d85.json
1+
sled-agent-46.0.0-59eec2.json

sled-agent/api/src/lib.rs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use omicron_common::api::internal::{
2222
use sled_agent_types_versions::{
2323
latest, v1, v4, v6, v7, v9, v10, v11, v12, v14, v16, v17, v18, v20, v22,
2424
v24, v25, v26, v28, v29, v30, v31, v32, v33, v34, v37, v39, v40, v41, v42,
25+
v46,
2526
};
2627
use sled_diagnostics::SledDiagnosticsQueryOutput;
2728
use slog_error_chain::InlineErrorChain;
@@ -38,6 +39,7 @@ api_versions!([
3839
// | example for the next person.
3940
// v
4041
// (next_int, IDENT),
42+
(46, ALLOW_DDM_TRAFFIC),
4143
(45, REMOVE_UPLINK_ENSURE),
4244
(44, PROPOLIS_NVME_VWC),
4345
(43, INVENTORY_BASEBOARD_ID),
@@ -994,7 +996,7 @@ pub trait SledAgentApi {
994996
// -------------------------------------------------------------------------
995997
fn static_assert_latest_write_network_config_type() {
996998
static_assertions::assert_type_eq_all!(
997-
v42::system_networking::WriteNetworkConfigRequest,
999+
v46::system_networking::WriteNetworkConfigRequest,
9981000
latest::system_networking::WriteNetworkConfigRequest
9991001
);
10001002
}
@@ -1004,7 +1006,20 @@ pub trait SledAgentApi {
10041006
#[endpoint {
10051007
method = PUT,
10061008
path = "/network-bootstore-config",
1007-
versions = VERSION_NON_EMPTY_UPLINK_PORTS..,
1009+
versions = VERSION_ALLOW_DDM_TRAFFIC..,
1010+
operation_id = "write_network_bootstore_config",
1011+
}]
1012+
async fn write_network_bootstore_config_v46(
1013+
rqctx: RequestContext<Self::Context>,
1014+
body: TypedBody<v46::system_networking::WriteNetworkConfigRequest>,
1015+
) -> Result<HttpResponseUpdatedNoContent, HttpError>;
1016+
1017+
// As described above, this must not forward to newer versions; sled-agent
1018+
// must implement this by faithfully serializing the requested version.
1019+
#[endpoint {
1020+
method = PUT,
1021+
path = "/network-bootstore-config",
1022+
versions = VERSION_NON_EMPTY_UPLINK_PORTS..VERSION_ALLOW_DDM_TRAFFIC,
10081023
operation_id = "write_network_bootstore_config",
10091024
}]
10101025
async fn write_network_bootstore_config_v42(

sled-agent/bootstrap-agent-lockstep-types/examples/multirack_join_request.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ fn main() {
7979
system_description: None,
8080
management_addrs: None,
8181
}),
82+
allow_ddm_traffic: false,
8283
}])
8384
.expect("port list is non-empty"),
8485
bgp: vec![BgpConfig {

0 commit comments

Comments
 (0)