Skip to content

Commit b8efb9a

Browse files
authored
remove unused sled_firewall_rules_request API (#9156)
This doorbell API was used by Sled Agent prior to the config reconciler introduced in #8064. Nothing currently appears to use it.
1 parent 178c3c1 commit b8efb9a

File tree

4 files changed

+0
-71
lines changed

4 files changed

+0
-71
lines changed

nexus/internal-api/src/lib.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,6 @@ pub trait NexusInternalApi {
7575
sled_info: TypedBody<SledAgentInfo>,
7676
) -> Result<HttpResponseUpdatedNoContent, HttpError>;
7777

78-
/// Request a new set of firewall rules for a sled.
79-
///
80-
/// This causes Nexus to read the latest set of rules for the sled,
81-
/// and call a Sled endpoint which applies the rules to all OPTE ports
82-
/// that happen to exist.
83-
#[endpoint {
84-
method = POST,
85-
path = "/sled-agents/{sled_id}/firewall-rules-update",
86-
}]
87-
async fn sled_firewall_rules_request(
88-
rqctx: RequestContext<Self::Context>,
89-
path_params: Path<SledAgentPathParam>,
90-
) -> Result<HttpResponseUpdatedNoContent, HttpError>;
91-
9278
/// Report that the Rack Setup Service initialization is complete
9379
///
9480
/// See RFD 278 for more details.

nexus/src/app/sled.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,6 @@ impl super::Nexus {
126126
Ok(prev_policy)
127127
}
128128

129-
pub(crate) async fn sled_request_firewall_rules(
130-
&self,
131-
opctx: &OpContext,
132-
id: SledUuid,
133-
) -> Result<(), Error> {
134-
info!(self.log, "requesting firewall rules"; "sled_uuid" => id.to_string());
135-
self.plumb_service_firewall_rules(opctx, &[id]).await?;
136-
Ok(())
137-
}
138-
139129
pub(crate) async fn sled_list(
140130
&self,
141131
opctx: &OpContext,

nexus/src/internal_api/http_entrypoints.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -90,25 +90,6 @@ impl NexusInternalApi for NexusInternalApiImpl {
9090
.await
9191
}
9292

93-
async fn sled_firewall_rules_request(
94-
rqctx: RequestContext<Self::Context>,
95-
path_params: Path<SledAgentPathParam>,
96-
) -> Result<HttpResponseUpdatedNoContent, HttpError> {
97-
let apictx = &rqctx.context().context;
98-
let nexus = &apictx.nexus;
99-
let opctx = crate::context::op_context_for_internal_api(&rqctx).await;
100-
let path = path_params.into_inner();
101-
let sled_id = &path.sled_id;
102-
let handler = async {
103-
nexus.sled_request_firewall_rules(&opctx, *sled_id).await?;
104-
Ok(HttpResponseUpdatedNoContent())
105-
};
106-
apictx
107-
.internal_latencies
108-
.instrument_dropshot_handler(&rqctx, handler)
109-
.await
110-
}
111-
11293
async fn rack_initialization_complete(
11394
rqctx: RequestContext<Self::Context>,
11495
path_params: Path<RackPathParam>,

openapi/nexus-internal.json

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -671,34 +671,6 @@
671671
}
672672
}
673673
},
674-
"/sled-agents/{sled_id}/firewall-rules-update": {
675-
"post": {
676-
"summary": "Request a new set of firewall rules for a sled.",
677-
"description": "This causes Nexus to read the latest set of rules for the sled, and call a Sled endpoint which applies the rules to all OPTE ports that happen to exist.",
678-
"operationId": "sled_firewall_rules_request",
679-
"parameters": [
680-
{
681-
"in": "path",
682-
"name": "sled_id",
683-
"required": true,
684-
"schema": {
685-
"$ref": "#/components/schemas/SledUuid"
686-
}
687-
}
688-
],
689-
"responses": {
690-
"204": {
691-
"description": "resource updated"
692-
},
693-
"4XX": {
694-
"$ref": "#/components/responses/Error"
695-
},
696-
"5XX": {
697-
"$ref": "#/components/responses/Error"
698-
}
699-
}
700-
}
701-
},
702674
"/switch/{switch_id}": {
703675
"put": {
704676
"operationId": "switch_put",

0 commit comments

Comments
 (0)