Singularize the bs.scheduler_stats
Change-Id: I56edee5e022a5cbaa90b974b1cf414466b1ea6e3 Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
This commit is contained in:
@@ -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"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user