From 00d6e14b7361f972fad0d969f67f897034e3ef12 Mon Sep 17 00:00:00 2001 From: Shivam Shukla Date: Fri, 25 Jul 2025 09:46:50 +0000 Subject: [PATCH] Replace Legacy Callable Formatter Functions osc-lib 4.x introduced a change that removed support for legacy callable functions used as formatters in CLI output. The python-tackerclient code still uses such deprecated formatters, which leads to the Invalid Formatter Provided error when used with osc-lib>=4.0.0. Replace these legacy callable formatters with compatible formatter classes provided by osc_lib.cli.format_columns. Closes-Bug: https://bugs.launchpad.net/tacker/+bug/2118585 Change-Id: Idc2a3be9fe709942904f472b7728e095ded92b19 Signed-off-by: Shivam Shukla --- tackerclient/osc/v1/nfvo/vim.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tackerclient/osc/v1/nfvo/vim.py b/tackerclient/osc/v1/nfvo/vim.py index 67072b64..597a63f2 100644 --- a/tackerclient/osc/v1/nfvo/vim.py +++ b/tackerclient/osc/v1/nfvo/vim.py @@ -16,6 +16,7 @@ import yaml +from osc_lib.cli import format_columns from osc_lib.command import command from osc_lib import utils from oslo_utils import strutils @@ -258,9 +259,9 @@ class UpdateVIM(command.ShowOne): _formatters = { - 'auth_cred': tacker_osc_utils.format_dict_with_indention, - 'placement_attr': tacker_osc_utils.format_dict_with_indention, - 'vim_project': tacker_osc_utils.format_dict_with_indention, + 'auth_cred': format_columns.DictColumn, + 'placement_attr': format_columns.DictColumn, + 'vim_project': format_columns.DictColumn, }