diff options
| author | judy-yu <yujie@cmss.chinamobile.com> | 2016-12-04 18:03:33 +0800 |
|---|---|---|
| committer | judy-yu <yujie@cmss.chinamobile.com> | 2016-12-04 18:03:33 +0800 |
| commit | 83675e9ee080d82b7c927180847d27fae6903e5a (patch) | |
| tree | 5bb60ea6e5b3ab29d26c62d2ba988a8bc7508283 /openstackclient/network/v2/security_group.py | |
| parent | e05c8d7bb04f477797e46e5728e93a35c104809a (diff) | |
| download | python-openstackclient-83675e9ee080d82b7c927180847d27fae6903e5a.tar.gz | |
Avoid duplicated project_id when show network resources
Project_id appear twice when show network resources. This
patch check and not append if it already has one.
Change-Id: I744988f3f52d4a744e397a6a82fefdc4c17eacbf
Closes-Bug: #1636123
Partially-Implements: blueprint duplicated-project-id
Diffstat (limited to 'openstackclient/network/v2/security_group.py')
| -rw-r--r-- | openstackclient/network/v2/security_group.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/openstackclient/network/v2/security_group.py b/openstackclient/network/v2/security_group.py index 554dd61d..8c5c7fee 100644 --- a/openstackclient/network/v2/security_group.py +++ b/openstackclient/network/v2/security_group.py @@ -81,8 +81,9 @@ def _get_columns(item): columns.remove('security_group_rules') property_column_mappings.append(('rules', 'security_group_rules')) if 'tenant_id' in columns: - columns.append('project_id') columns.remove('tenant_id') + if 'project_id' not in columns: + columns.append('project_id') property_column_mappings.append(('project_id', 'tenant_id')) display_columns = sorted(columns) |
