![Boden R](/assets/img/avatar_default.png)
Today we have a number of extensions that must provide boilerplate/redundant code in their extension class to return basic API definition attributes such as name, description, alias, etc.. For example [1]. This patch proposes we can provide most of that boilerplate code right in a base extension descriptor class; just have extension sub-classes provide their API definition. With this patch, code such as [1] gets reduced to a class definition with a single class-level attribute to specify the API definition for the extension. For sample usage, have a look at [2] that used as a dummy patch to test PS4/PS7 of this change with neutron master. [1] https://review.openstack.org/#/c/421562/2/neutron/extensions/providernet.py@36 [2] https://review.openstack.org/#/c/433929/1/neutron/extensions/providernet.py Change-Id: I25135b39a1d26c11006bc2a7b6080cdd839f0085
7 lines
288 B
YAML
7 lines
288 B
YAML
---
|
|
features:
|
|
- The ``APIExtensionDescriptor`` was added to ``neutron_lib.api.extensions``
|
|
and can be used with extensions that have an API definition in neutron-lib
|
|
to minimize the boilplate code needed in the extension definition class.
|
|
For more details, see the dev-ref.
|