Skip to content

Move /sagas/ under /system/ as per RFD-288 #1696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 9, 2022
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
16 changes: 8 additions & 8 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions nexus/src/external_api/http_entrypoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3981,8 +3981,8 @@ async fn updates_refresh(
/// List sagas
#[endpoint {
method = GET,
path = "/sagas",
tags = ["sagas"],
path = "/system/sagas",
tags = ["system"],
}]
async fn saga_list(
rqctx: Arc<RequestContext<Arc<ServerContext>>>,
Expand Down Expand Up @@ -4014,8 +4014,8 @@ struct SagaPathParam {
/// Fetch a saga
#[endpoint {
method = GET,
path = "/sagas/{saga_id}",
tags = ["sagas"],
path = "/system/sagas/{saga_id}",
tags = ["system"],
}]
async fn saga_view(
rqctx: Arc<RequestContext<Arc<ServerContext>>>,
Expand Down
4 changes: 2 additions & 2 deletions nexus/tests/integration_tests/endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1342,14 +1342,14 @@ lazy_static! {
/* Sagas */

VerifyEndpoint {
url: "/sagas",
url: "/system/sagas",
visibility: Visibility::Public,
unprivileged_access: UnprivilegedAccess::None,
allowed_methods: vec![AllowedMethod::Get],
},

VerifyEndpoint {
url: "/sagas/48a1b8c8-fc1c-6fea-9de9-fdeb8dda7823",
url: "/system/sagas/48a1b8c8-fc1c-6fea-9de9-fdeb8dda7823",
visibility: Visibility::Public,
unprivileged_access: UnprivilegedAccess::None,
allowed_methods: vec![AllowedMethod::GetNonexistent],
Expand Down
7 changes: 2 additions & 5 deletions nexus/tests/output/nexus_tags.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ OPERATION ID URL PATH
role_list /roles
role_view /roles/{role_name}

API operations found with tag "sagas"
OPERATION ID URL PATH
saga_list /sagas
saga_view /sagas/{saga_id}

API operations found with tag "session"
OPERATION ID URL PATH
session_sshkey_create /session/me/sshkeys
Expand Down Expand Up @@ -150,6 +145,8 @@ API operations found with tag "system"
OPERATION ID URL PATH
rack_list /system/hardware/racks
rack_view /system/hardware/racks/{rack_id}
saga_list /system/sagas
saga_view /system/sagas/{saga_id}
sled_list /system/hardware/sleds
sled_view /system/hardware/sleds/{sled_id}
system_user_list /system/user
Expand Down
198 changes: 99 additions & 99 deletions openapi/nexus.json
Original file line number Diff line number Diff line change
Expand Up @@ -5862,105 +5862,6 @@
}
}
},
"/sagas": {
"get": {
"tags": [
"sagas"
],
"summary": "List sagas",
"operationId": "saga_list",
"parameters": [
{
"in": "query",
"name": "limit",
"description": "Maximum number of items returned by a single call",
"schema": {
"nullable": true,
"type": "integer",
"format": "uint32",
"minimum": 1
},
"style": "form"
},
{
"in": "query",
"name": "page_token",
"description": "Token returned by previous call to retrieve the subsequent page",
"schema": {
"nullable": true,
"type": "string"
},
"style": "form"
},
{
"in": "query",
"name": "sort_by",
"schema": {
"$ref": "#/components/schemas/IdSortMode"
},
"style": "form"
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SagaResultsPage"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
},
"x-dropshot-pagination": true
}
},
"/sagas/{saga_id}": {
"get": {
"tags": [
"sagas"
],
"summary": "Fetch a saga",
"operationId": "saga_view",
"parameters": [
{
"in": "path",
"name": "saga_id",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
},
"style": "simple"
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Saga"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/session/me": {
"get": {
"tags": [
Expand Down Expand Up @@ -6837,6 +6738,105 @@
}
}
},
"/system/sagas": {
"get": {
"tags": [
"system"
],
"summary": "List sagas",
"operationId": "saga_list",
"parameters": [
{
"in": "query",
"name": "limit",
"description": "Maximum number of items returned by a single call",
"schema": {
"nullable": true,
"type": "integer",
"format": "uint32",
"minimum": 1
},
"style": "form"
},
{
"in": "query",
"name": "page_token",
"description": "Token returned by previous call to retrieve the subsequent page",
"schema": {
"nullable": true,
"type": "string"
},
"style": "form"
},
{
"in": "query",
"name": "sort_by",
"schema": {
"$ref": "#/components/schemas/IdSortMode"
},
"style": "form"
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SagaResultsPage"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
},
"x-dropshot-pagination": true
}
},
"/system/sagas/{saga_id}": {
"get": {
"tags": [
"system"
],
"summary": "Fetch a saga",
"operationId": "saga_view",
"parameters": [
{
"in": "path",
"name": "saga_id",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
},
"style": "simple"
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Saga"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/system/updates/refresh": {
"post": {
"tags": [
Expand Down