diff options
| author | Nir Magnezi <nmagnezi@redhat.com> | 2017-01-09 12:31:47 +0200 |
|---|---|---|
| committer | Nir Magnezi <nmagnezi@redhat.com> | 2017-01-09 16:44:08 +0200 |
| commit | 142c5faae38c0619d218e0113644d6fa7bea76a8 (patch) | |
| tree | 92c5eca5596bc497bb4a4152de8c60184cbb2905 /openstackclient/network/v2 | |
| parent | 1957690754961aed8bf9c7894e3ab140a9f2c0b9 (diff) | |
| download | python-openstackclient-142c5faae38c0619d218e0113644d6fa7bea76a8.tar.gz | |
Fix Octavia gate breakage caused by _get_columns()
The above mentioned function tries to extract keys() from an item which
is type class.
This patch fixes the issue by converting item to dict by using
to_dict().
Change-Id: Ida520ae9fe64171d105f486ba06eda127a24547b
Closes-Bug: #1654887
Diffstat (limited to 'openstackclient/network/v2')
| -rw-r--r-- | openstackclient/network/v2/security_group.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openstackclient/network/v2/security_group.py b/openstackclient/network/v2/security_group.py index 5420bc8b..df9e320b 100644 --- a/openstackclient/network/v2/security_group.py +++ b/openstackclient/network/v2/security_group.py @@ -74,7 +74,7 @@ _formatters_compute = { def _get_columns(item): # Build the display columns and a list of the property columns # that need to be mapped (display column name, property name). - columns = list(item.keys()) + columns = list(item.to_dict().keys()) property_column_mappings = [] if 'security_group_rules' in columns: columns.append('rules') @@ -156,7 +156,7 @@ class CreateSecurityGroup(common.NetworkAndComputeShowOne): parsed_args.name, description, ) - display_columns, property_columns = _get_columns(obj._info) + display_columns, property_columns = _get_columns(obj) data = utils.get_dict_properties( obj._info, property_columns, @@ -336,7 +336,7 @@ class ShowSecurityGroup(common.NetworkAndComputeShowOne): client.security_groups, parsed_args.group, ) - display_columns, property_columns = _get_columns(obj._info) + display_columns, property_columns = _get_columns(obj) data = utils.get_dict_properties( obj._info, property_columns, |
