Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions nexus/internal-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,6 @@ pub trait NexusInternalApi {
sled_info: TypedBody<SledAgentInfo>,
) -> Result<HttpResponseUpdatedNoContent, HttpError>;

/// Request a new set of firewall rules for a sled.
///
/// 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.
#[endpoint {
method = POST,
path = "/sled-agents/{sled_id}/firewall-rules-update",
}]
async fn sled_firewall_rules_request(
rqctx: RequestContext<Self::Context>,
path_params: Path<SledAgentPathParam>,
) -> Result<HttpResponseUpdatedNoContent, HttpError>;

/// Report that the Rack Setup Service initialization is complete
///
/// See RFD 278 for more details.
Expand Down
10 changes: 0 additions & 10 deletions nexus/src/app/sled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,6 @@ impl super::Nexus {
Ok(prev_policy)
}

pub(crate) async fn sled_request_firewall_rules(
&self,
opctx: &OpContext,
id: SledUuid,
) -> Result<(), Error> {
info!(self.log, "requesting firewall rules"; "sled_uuid" => id.to_string());
self.plumb_service_firewall_rules(opctx, &[id]).await?;
Ok(())
}

pub(crate) async fn sled_list(
&self,
opctx: &OpContext,
Expand Down
19 changes: 0 additions & 19 deletions nexus/src/internal_api/http_entrypoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,25 +90,6 @@ impl NexusInternalApi for NexusInternalApiImpl {
.await
}

async fn sled_firewall_rules_request(
rqctx: RequestContext<Self::Context>,
path_params: Path<SledAgentPathParam>,
) -> Result<HttpResponseUpdatedNoContent, HttpError> {
let apictx = &rqctx.context().context;
let nexus = &apictx.nexus;
let opctx = crate::context::op_context_for_internal_api(&rqctx).await;
let path = path_params.into_inner();
let sled_id = &path.sled_id;
let handler = async {
nexus.sled_request_firewall_rules(&opctx, *sled_id).await?;
Ok(HttpResponseUpdatedNoContent())
};
apictx
.internal_latencies
.instrument_dropshot_handler(&rqctx, handler)
.await
}

async fn rack_initialization_complete(
rqctx: RequestContext<Self::Context>,
path_params: Path<RackPathParam>,
Expand Down
28 changes: 0 additions & 28 deletions openapi/nexus-internal.json
Original file line number Diff line number Diff line change
Expand Up @@ -671,34 +671,6 @@
}
}
},
"/sled-agents/{sled_id}/firewall-rules-update": {
"post": {
"summary": "Request a new set of firewall rules for a sled.",
"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.",
"operationId": "sled_firewall_rules_request",
"parameters": [
{
"in": "path",
"name": "sled_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/SledUuid"
}
}
],
"responses": {
"204": {
"description": "resource updated"
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/switch/{switch_id}": {
"put": {
"operationId": "switch_put",
Expand Down
Loading