diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2026-03-20 18:41:24 +0200 |
|---|---|---|
| committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2026-03-24 17:02:56 +0000 |
| commit | bb2aee1e58c1cd30087b935798060e6bf3c698c8 (patch) | |
| tree | 99f692623ad596519ff26da443f62415cc3bcf59 /src/services/api/rest | |
| parent | a9a75eb7dce077bceee1ae13dc943b05d8759925 (diff) | |
| download | vyos-1x-bb2aee1e58c1cd30087b935798060e6bf3c698c8.tar.gz vyos-1x-bb2aee1e58c1cd30087b935798060e6bf3c698c8.zip | |
T8410: Fix typos and mistakes for operational and configuration commands
Fix typos and mistakes in the commands and comments
No functional changes
Diffstat (limited to 'src/services/api/rest')
| -rw-r--r-- | src/services/api/rest/models.py | 2 | ||||
| -rw-r--r-- | src/services/api/rest/routers.py | 26 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/services/api/rest/models.py b/src/services/api/rest/models.py index 70fab03ec..bfea17344 100644 --- a/src/services/api/rest/models.py +++ b/src/services/api/rest/models.py @@ -48,7 +48,7 @@ def success(data): # Pydantic models for validation # Pydantic will cast when possible, so use StrictStr validators added as # needed for additional constraints -# json_schema_extra adds anotations to OpenAPI to add examples +# json_schema_extra adds annotations to OpenAPI to add examples class ApiModel(BaseModel): diff --git a/src/services/api/rest/routers.py b/src/services/api/rest/routers.py index 25c29b4c3..058bcc20d 100644 --- a/src/services/api/rest/routers.py +++ b/src/services/api/rest/routers.py @@ -107,7 +107,7 @@ def auth_required(data: ApiModel): # override Request and APIRoute classes in order to convert form request to json; -# do all explicit validation here, for backwards compatability of error messages; +# do all explicit validation here, for backwards compatibility of error messages; # the explicit validation may be dropped, if desired, in favor of native # validation by FastAPI/Pydantic, as is used for application/json requests class MultipartRequest(Request): @@ -501,7 +501,7 @@ def _execute_configure_op( status = 500 # Don't give the details away to the outer world - error_msg = 'An internal error occured. Check the logs for details.' + error_msg = 'An internal error occurred. Check the logs for details.' finally: if 'IN_COMMIT_CONFIRM' in env: del env['IN_COMMIT_CONFIRM'] @@ -631,7 +631,7 @@ async def retrieve_op(data: RetrieveModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -719,7 +719,7 @@ async def config_file_op(data: ConfigFileModel, background_tasks: BackgroundTask return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') finally: if 'IN_COMMIT_CONFIRM' in env: del env['IN_COMMIT_CONFIRM'] @@ -747,7 +747,7 @@ def image_op(data: ImageModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -780,7 +780,7 @@ def container_image_op(data: ContainerImageModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -803,7 +803,7 @@ def generate_op(data: GenerateModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -825,7 +825,7 @@ def show_op(data: ShowModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -847,7 +847,7 @@ def reboot_op(data: RebootModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -868,7 +868,7 @@ def renew_op(data: RenewModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -889,7 +889,7 @@ def reset_op(data: ResetModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -929,7 +929,7 @@ def import_pki(data: ImportPkiModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') finally: lock.release() @@ -953,7 +953,7 @@ def poweroff_op(data: PoweroffModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) |
