diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-02-15 19:01:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-15 19:01:35 +0200 |
commit | d530c0363df192bd02ab21f329b42e6c9ecd7274 (patch) | |
tree | 5f76afe1e7e2945aa5ecb547259ac5a746b17ee2 | |
parent | e0e550ad1187e10bcd730675c11714a075abc4a0 (diff) | |
parent | 53bc5334d4da917920c08e0b207e49254566d73d (diff) | |
download | vyos-1x-d530c0363df192bd02ab21f329b42e6c9ecd7274.tar.gz vyos-1x-d530c0363df192bd02ab21f329b42e6c9ecd7274.zip |
Merge pull request #1823 from jestabro/api-async
http-api: T5006: add explicit async to retrieve/configure methods for REST
-rwxr-xr-x | src/services/vyos-http-api-server | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server index f59e089ae..cd73f38ec 100755 --- a/src/services/vyos-http-api-server +++ b/src/services/vyos-http-api-server @@ -425,7 +425,7 @@ async def validation_exception_handler(request, exc): return error(400, str(exc.errors()[0])) @app.post('/configure') -def configure_op(data: Union[ConfigureModel, ConfigureListModel]): +async def configure_op(data: Union[ConfigureModel, ConfigureListModel]): session = app.state.vyos_session env = session.get_session_env() config = vyos.config.Config(session_env=env) @@ -494,7 +494,7 @@ def configure_op(data: Union[ConfigureModel, ConfigureListModel]): return success(None) @app.post("/retrieve") -def retrieve_op(data: RetrieveModel): +async def retrieve_op(data: RetrieveModel): session = app.state.vyos_session env = session.get_session_env() config = vyos.config.Config(session_env=env) |