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
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions nexus/src/external_api/http_entrypoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use dropshot::HttpResponseAccepted;
use dropshot::HttpResponseCreated;
use dropshot::HttpResponseDeleted;
use dropshot::HttpResponseOk;
use dropshot::HttpResponseUpdatedNoContent;
use dropshot::Path;
use dropshot::Query;
use dropshot::RequestContext;
Expand Down Expand Up @@ -1143,7 +1144,7 @@ async fn project_vpcs_put_vpc(
rqctx: Arc<RequestContext<Arc<ServerContext>>>,
path_params: Path<VpcPathParam>,
updated_vpc: TypedBody<params::VpcUpdate>,
) -> Result<HttpResponseOk<()>, HttpError> {
) -> Result<HttpResponseUpdatedNoContent, HttpError> {
let apictx = rqctx.context();
let nexus = &apictx.nexus;
let path = path_params.into_inner();
Expand All @@ -1156,7 +1157,7 @@ async fn project_vpcs_put_vpc(
&updated_vpc.into_inner(),
)
.await?;
Ok(HttpResponseOk(()))
Ok(HttpResponseUpdatedNoContent())
};
apictx.external_latencies.instrument_dropshot_handler(&rqctx, handler).await
}
Expand Down Expand Up @@ -1328,7 +1329,7 @@ async fn vpc_subnets_put_subnet(
rqctx: Arc<RequestContext<Arc<ServerContext>>>,
path_params: Path<VpcSubnetPathParam>,
subnet_params: TypedBody<params::VpcSubnetUpdate>,
) -> Result<HttpResponseOk<()>, HttpError> {
) -> Result<HttpResponseUpdatedNoContent, HttpError> {
let apictx = rqctx.context();
let nexus = &apictx.nexus;
let path = path_params.into_inner();
Expand All @@ -1342,7 +1343,7 @@ async fn vpc_subnets_put_subnet(
&subnet_params.into_inner(),
)
.await?;
Ok(HttpResponseOk(()))
Ok(HttpResponseUpdatedNoContent())
};
apictx.external_latencies.instrument_dropshot_handler(&rqctx, handler).await
}
Expand Down Expand Up @@ -1564,7 +1565,7 @@ async fn vpc_routers_put_router(
rqctx: Arc<RequestContext<Arc<ServerContext>>>,
path_params: Path<VpcRouterPathParam>,
router_params: TypedBody<params::VpcRouterUpdate>,
) -> Result<HttpResponseOk<()>, HttpError> {
) -> Result<HttpResponseUpdatedNoContent, HttpError> {
let apictx = rqctx.context();
let nexus = &apictx.nexus;
let path = path_params.into_inner();
Expand All @@ -1578,7 +1579,7 @@ async fn vpc_routers_put_router(
&router_params.into_inner(),
)
.await?;
Ok(HttpResponseOk(()))
Ok(HttpResponseUpdatedNoContent())
};
apictx.external_latencies.instrument_dropshot_handler(&rqctx, handler).await
}
Expand Down Expand Up @@ -1734,7 +1735,7 @@ async fn routers_routes_put_route(
rqctx: Arc<RequestContext<Arc<ServerContext>>>,
path_params: Path<RouterRoutePathParam>,
router_params: TypedBody<RouterRouteUpdateParams>,
) -> Result<HttpResponseOk<()>, HttpError> {
) -> Result<HttpResponseUpdatedNoContent, HttpError> {
let apictx = rqctx.context();
let nexus = &apictx.nexus;
let path = path_params.into_inner();
Expand All @@ -1749,7 +1750,7 @@ async fn routers_routes_put_route(
&router_params.into_inner(),
)
.await?;
Ok(HttpResponseOk(()))
Ok(HttpResponseUpdatedNoContent())
};
apictx.external_latencies.instrument_dropshot_handler(&rqctx, handler).await
}
Expand Down
2 changes: 1 addition & 1 deletion nexus/tests/test_router_routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ async fn test_router_routes() {
"loopback".parse().unwrap(),
),
}),
StatusCode::OK,
StatusCode::NO_CONTENT,
)
.await
.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion nexus/tests/test_vpc_routers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async fn test_vpc_routers() {
Method::PUT,
&router_url,
Some(update_params),
StatusCode::OK,
StatusCode::NO_CONTENT,
)
.await
.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion nexus/tests/test_vpc_subnets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ async fn test_vpc_subnets() {
Method::PUT,
&subnet_url,
Some(update_params),
StatusCode::OK,
StatusCode::NO_CONTENT,
)
.await
.unwrap();
Expand Down
7 changes: 6 additions & 1 deletion nexus/tests/test_vpcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ async fn vpc_put(
params: params::VpcUpdate,
) {
client
.make_request(Method::PUT, &vpc_url, Some(params), StatusCode::OK)
.make_request(
Method::PUT,
&vpc_url,
Some(params),
StatusCode::NO_CONTENT,
)
.await
.unwrap();
}
Expand Down
16 changes: 8 additions & 8 deletions openapi/nexus.json
Original file line number Diff line number Diff line change
Expand Up @@ -1522,8 +1522,8 @@
"required": true
},
"responses": {
"200": {
"description": "successful operation"
"204": {
"description": "resource updated"
}
}
},
Expand Down Expand Up @@ -1939,8 +1939,8 @@
"required": true
},
"responses": {
"200": {
"description": "successful operation"
"204": {
"description": "resource updated"
}
}
},
Expand Down Expand Up @@ -2268,8 +2268,8 @@
"required": true
},
"responses": {
"200": {
"description": "successful operation"
"204": {
"description": "resource updated"
}
}
},
Expand Down Expand Up @@ -2570,8 +2570,8 @@
"required": true
},
"responses": {
"200": {
"description": "successful operation"
"204": {
"description": "resource updated"
}
}
},
Expand Down