Replace wrongly used logging.warn

This was long time deprecated and it is a surprise no linter found that
before.

Change-Id: I921c01254fa04ff57d309f63265313dcc26257da
This commit is contained in:
Artem Goncharov
2024-11-04 17:44:30 +01:00
parent f10ba9dc39
commit 12e62d6d09
4 changed files with 10 additions and 10 deletions

View File

@@ -336,7 +336,7 @@ class MetadataGenerator(BaseGenerator):
elif method == "delete":
operation_key = "delete"
if not operation_key:
logging.warn(
logging.warning(
f"Cannot identify op name for {path}:{method}"
)
@@ -459,7 +459,7 @@ class MetadataGenerator(BaseGenerator):
# Flavor update/create/delete
# operations are exposed ALSO as wsgi
# actions. This is wrong and useless.
logging.warn(
logging.warning(
"Skipping generating %s:%s action",
resource_name,
action_name,

View File

@@ -419,7 +419,7 @@ class OpenStackServerSourceBase:
if key and key in versioned_methods:
# ACTION with version bounds
if len(versioned_methods[key]) > 1:
logging.warn(
logging.warning(
f"There are multiple callables for action {key} instead of multiple bodies"
)
for ver_method in versioned_methods[key]:
@@ -1149,7 +1149,7 @@ class OpenStackServerSourceBase:
action_name=None,
) -> tuple[str | None, str | None]:
if schema_def is UNSET:
logging.warn(
logging.warning(
"No Schema definition for %s[%s] is known", name, action_name
)
# Create dummy schema since we got no data for it

View File

@@ -313,7 +313,7 @@ class KeystoneGenerator(OpenStackServerSourceBase):
sig = inspect.signature(func)
for param in args:
if param not in sig.parameters:
logging.warn(
logging.warning(
"Skipping %s:%s because controller does not support parameter %s",
path,
method,
@@ -328,7 +328,7 @@ class KeystoneGenerator(OpenStackServerSourceBase):
and param.name not in args
):
# Param with no default is not a path argument
logging.warn(
logging.warning(
"Skipping %s:%s because controller requires parameter %s not present in path",
path,
method,

View File

@@ -156,7 +156,7 @@ def merge_api_ref_doc(
op_spec = getattr(path_spec, method.lower(), None)
if not op_spec:
logging.warn(
logging.warning(
f"Cannot find {method} operation for {url} in the spec"
)
continue
@@ -194,7 +194,7 @@ def merge_api_ref_doc(
):
# Found request details
if not details_child.table:
logging.warn(
logging.warning(
"No Parameters description table found for %s:%s in html",
url,
method,
@@ -259,7 +259,7 @@ def merge_api_ref_doc(
):
# Found response details
if not details_child.table:
logging.warn(
logging.warning(
"No Response Parameters description table found for %s:%s in html",
url,
method,
@@ -340,7 +340,7 @@ def _doc_process_operation_table(
else:
param_def = src_param
if not param_def:
logging.warn("Cannot find parameter %s", src_param)
logging.warning("Cannot find parameter %s", src_param)
if (
param_def.location == doc_param_location