diff options
| author | Akihiro MOTOKI <motoki@da.jp.nec.com> | 2012-12-03 13:42:00 +0900 |
|---|---|---|
| committer | Akihiro MOTOKI <motoki@da.jp.nec.com> | 2012-12-03 20:44:22 +0900 |
| commit | b8ef8ac2ee537b3e861040e2720d6086fa006637 (patch) | |
| tree | 0ed20b8609e654b8d67bf5841178d7c577e8ddc5 /quantumclient/quantum | |
| parent | f6dcfd855bd6928c37fb511bb22a288e910fba82 (diff) | |
| download | python-neutronclient-b8ef8ac2ee537b3e861040e2720d6086fa006637.tar.gz | |
Display columns in the order of -c options
Fixes bug 1085785
Change-Id: Ifd8ddfbb7fa5e32be96febe981a6baf57b5e58c7
Diffstat (limited to 'quantumclient/quantum')
| -rw-r--r-- | quantumclient/quantum/v2_0/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/quantumclient/quantum/v2_0/__init__.py b/quantumclient/quantum/v2_0/__init__.py index b067d32..c73795b 100644 --- a/quantumclient/quantum/v2_0/__init__.py +++ b/quantumclient/quantum/v2_0/__init__.py @@ -387,7 +387,9 @@ class ListCommand(QuantumCommand, lister.Lister): if not _columns: # clean the parsed_args.columns so that cliff will not break parsed_args.columns = [] - elif not parsed_args.columns and self.list_columns: + elif parsed_args.columns: + _columns = [x for x in parsed_args.columns if x in _columns] + elif self.list_columns: # if no -c(s) by user and list_columns, we use columns in # both list_columns and returned resource. # Also Keep their order the same as in list_columns |
