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 <shivam.shukla3@india.nec.com>
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
from osc_lib.cli import format_columns
|
||||||
from osc_lib.command import command
|
from osc_lib.command import command
|
||||||
from osc_lib import utils
|
from osc_lib import utils
|
||||||
from oslo_utils import strutils
|
from oslo_utils import strutils
|
||||||
@@ -258,9 +259,9 @@ class UpdateVIM(command.ShowOne):
|
|||||||
|
|
||||||
|
|
||||||
_formatters = {
|
_formatters = {
|
||||||
'auth_cred': tacker_osc_utils.format_dict_with_indention,
|
'auth_cred': format_columns.DictColumn,
|
||||||
'placement_attr': tacker_osc_utils.format_dict_with_indention,
|
'placement_attr': format_columns.DictColumn,
|
||||||
'vim_project': tacker_osc_utils.format_dict_with_indention,
|
'vim_project': format_columns.DictColumn,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user