From cfa0ea6ac9275a66cacb1dcb1d9cf04726fa175a Mon Sep 17 00:00:00 2001 From: inspurericzhang Date: Wed, 17 Jan 2024 09:10:47 +0000 Subject: [PATCH] Complete all configurations in config api Change-Id: Icbef06f63c60fa414a782bbe29c4eceb1911a4c1 --- .../custom-config/get-custom-config-show-response.json | 5 +++-- venus/modules/custom_config/controller.py | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/api-ref/source/v1/samples/custom-config/get-custom-config-show-response.json b/api-ref/source/v1/samples/custom-config/get-custom-config-show-response.json index 895a7fd..6347782 100644 --- a/api-ref/source/v1/samples/custom-config/get-custom-config-show-response.json +++ b/api-ref/source/v1/samples/custom-config/get-custom-config-show-response.json @@ -1,4 +1,5 @@ { - "log_save_days": "30" - + "log_save_days": "30", + "anomaly_record_save_days": "30", + "log_max_gb": "100" } diff --git a/venus/modules/custom_config/controller.py b/venus/modules/custom_config/controller.py index 47ed321..2be1087 100644 --- a/venus/modules/custom_config/controller.py +++ b/venus/modules/custom_config/controller.py @@ -28,7 +28,10 @@ class CustomConfigController(wsgi.Controller): @wsgi.wrap_check_policy def get_config(self, req): result = dict() - result["log_save_days"] = self.config_api.get_config("log_save_days") + configs = ["log_save_days", "anomaly_record_save_days", "log_max_gb"] + for config in configs: + result[config] = self.config_api.get_config(config) + return result @wsgi.wrap_check_policy