[PR #11879/77509be2 backport][stable-12] Replace .format() calls with f-strings across multiple plugins (#11881)

Replace .format() calls with f-strings across multiple plugins (#11879)

* Replace .format() calls with f-strings across multiple plugins



* Add changelog fragment for PR 11879



---------


(cherry picked from commit 77509be2aa)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
patchback[bot]
2026-04-19 12:49:29 +02:00
committed by GitHub
parent 6458abb9c1
commit 748882dfa8
15 changed files with 88 additions and 114 deletions

View File

@@ -140,7 +140,6 @@ class SanManagerModule(OneViewModuleBase):
MSG_DELETED = "SAN Manager deleted successfully."
MSG_ALREADY_PRESENT = "SAN Manager is already present."
MSG_ALREADY_ABSENT = "SAN Manager is already absent."
MSG_SAN_MANAGER_PROVIDER_DISPLAY_NAME_NOT_FOUND = "The provider '{0}' was not found."
argument_spec = dict(
state=dict(type="str", default="present", choices=["absent", "present", "connection_information_set"]),
@@ -161,7 +160,7 @@ class SanManagerModule(OneViewModuleBase):
else:
msg = 'A "name" or "connectionInfo" must be provided inside the "data" field for this operation. '
msg += 'If a "connectionInfo" is provided, the "Host" name is considered as the "name" for the resource.'
raise OneViewModuleValueError(msg.format())
raise OneViewModuleValueError(msg)
resource = self.resource_client.get_by_name(resource_name)
@@ -211,7 +210,7 @@ class SanManagerModule(OneViewModuleBase):
provider_uri = self.resource_client.get_provider_uri(display_name)
if not provider_uri:
raise OneViewModuleValueError(self.MSG_SAN_MANAGER_PROVIDER_DISPLAY_NAME_NOT_FOUND.format(display_name))
raise OneViewModuleValueError(f"The provider '{display_name}' was not found.")
return provider_uri