Fix bug: AttributeError arises while sorting with standard attributes
Common neutron resource(e.g, Port) consists of:
1. Resource Attributes, e.g: Port.mac_address, etc.
2. Standard Attributes, e.g: created_at, and are shared among all
neutron resources.
The `sort` opt only supports limited attributes. We need to filter
attributes that are defined with `is_sort_key=True` and it's preferred
to explicitly warn CLI & API users of illegal sort keys rather than
just accept without check, pass forward and then hit a internal error
which's quite confusing.
Reviewed: https:/ /review. opendev. org/653903 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=335ac4e2d95 c164d66a3b09d9f d08e9c563edfc2
Committed: https:/
Submitter: Zuul
Branch: master
commit 335ac4e2d95c164 d66a3b09d9fd08e 9c563edfc2
Author: pandatt <guojy8993@163.com>
Date: Fri Apr 19 11:29:54 2019 +0800
Fix bug: AttributeError arises while sorting with standard attributes
Common neutron resource(e.g, Port) consists of:
1. Resource Attributes, e.g: Port.mac_address, etc.
2. Standard Attributes, e.g: created_at, and are shared among all
neutron resources.
The `sort` opt only supports limited attributes. We need to filter
attributes that are defined with `is_sort_key=True` and it's preferred
to explicitly warn CLI & API users of illegal sort keys rather than
just accept without check, pass forward and then hit a internal error
which's quite confusing.
Depends-on: https:/ /review. opendev. org/#/c/ 660097/ 279dfcdc25c3998 9a67bff93d5
Change-Id: I8d206f909b09f1
Closes-Bug: #1659175