From f77fc29df926ba1d0a57836a9921c12a8e04a3cd Mon Sep 17 00:00:00 2001 From: Artem Goncharov Date: Tue, 23 Dec 2025 12:50:03 +0100 Subject: [PATCH] Singularize the bs.scheduler_stats Change-Id: I56edee5e022a5cbaa90b974b1cf414466b1ea6e3 Signed-off-by: Artem Goncharov --- codegenerator/common/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codegenerator/common/__init__.py b/codegenerator/common/__init__.py index 2447871..a46b263 100644 --- a/codegenerator/common/__init__.py +++ b/codegenerator/common/__init__.py @@ -11,9 +11,9 @@ # under the License. # import logging +import re from pathlib import Path from typing import Any -import re import jsonref import yaml @@ -511,7 +511,7 @@ def get_operation_variants(spec: dict, action_name: str | None = None): return operation_variants -def get_resource_names_from_url(path: str): +def get_resource_names_from_url(path: str) -> list[str]: """Construct Resource name from the URL""" path_elements = list(filter(None, path.split("/"))) if path_elements and VERSION_RE.match(path_elements[0]): @@ -619,7 +619,7 @@ def get_resource_names_from_url(path: str): elif path == "/v1/{account}/{container}/{object}": return ["object"] if path == "/v3/scheduler-stats/get_pools": - return ["scheduler_stats", "pool"] + return ["scheduler_stat", "pool"] if len(path_resource_names) == 0: return ["version"]