Skip to content

Commit

Permalink
[nexus] remove unnecessary name_or_id param from bgp config list en…
Browse files Browse the repository at this point in the history
…dpoint (#6560)

Missed this in #6498. Closes #6467 (again).
  • Loading branch information
david-crespo authored Sep 12, 2024
1 parent 15f6e5f commit 90eedeb
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion nexus/external-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,7 @@ pub trait NexusExternalApi {
}]
async fn networking_bgp_config_list(
rqctx: RequestContext<Self::Context>,
query_params: Query<PaginatedByNameOrId<params::BgpConfigListSelector>>,
query_params: Query<PaginatedByNameOrId>,
) -> Result<HttpResponseOk<ResultsPage<BgpConfig>>, HttpError>;

//TODO pagination? the normal by-name/by-id stuff does not work here
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/external_api/http_entrypoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2991,7 +2991,7 @@ impl NexusExternalApi for NexusExternalApiImpl {

async fn networking_bgp_config_list(
rqctx: RequestContext<ApiContext>,
query_params: Query<PaginatedByNameOrId<params::BgpConfigListSelector>>,
query_params: Query<PaginatedByNameOrId>,
) -> Result<HttpResponseOk<ResultsPage<BgpConfig>>, HttpError> {
let apictx = rqctx.context();
let handler = async {
Expand Down
7 changes: 0 additions & 7 deletions nexus/types/src/external_api/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1653,13 +1653,6 @@ pub struct BgpConfigSelector {
pub name_or_id: NameOrId,
}

/// List BGP configs with an optional name or id.
#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
pub struct BgpConfigListSelector {
/// A name or id to use when selecting BGP config.
pub name_or_id: Option<NameOrId>,
}

#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema)]
pub struct BgpPeerConfig {
pub peers: Vec<BgpPeer>,
Expand Down
8 changes: 0 additions & 8 deletions openapi/nexus.json
Original file line number Diff line number Diff line change
Expand Up @@ -6423,14 +6423,6 @@
"minimum": 1
}
},
{
"in": "query",
"name": "name_or_id",
"description": "A name or id to use when selecting BGP config.",
"schema": {
"$ref": "#/components/schemas/NameOrId"
}
},
{
"in": "query",
"name": "page_token",
Expand Down

0 comments on commit 90eedeb

Please sign in to comment.