[Neutron] How to add Fake ML2 extension to Neutron?

Lajos Katona katonalala at gmail.com
Mon Aug 22 18:31:38 UTC 2022


Hi,
The fake_extension is used only in unit tests to test the extension
framework, i.e. :
https://opendev.org/openstack/neutron/src/branch/master/neutron/tests/unit/plugins/ml2/drivers/ext_test.py#L37

If you would like to write an API extension check
neutron-lib/api/definitions/ (and you can find the extensions "counterpart"
under neutron/extensions in neutron repository)

You can also check other Networking projects like networking-bgvpn,
neutron-dynamic-routing to have examples of API extensions.
If you have an extension under neutron/extensions and there's somebody who
uses it (see [1]) you will see it is loaded in neutron servers logs
(something like this: "Loaded extension: address-group") and you can find
it in the output of openstack extension list --network

[1]:
https://opendev.org/openstack/neutron/src/branch/master/neutron/plugins/ml2/plugin.py#L200

Best wishes
Lajos Katona

Igor Zhukov <fsb4000 at yandex.ru> ezt írta (időpont: 2022. aug. 22., H,
19:41):

> Hi all!
> Sorry for a complete noob question but I can't figure it out 😿
> So if I want to add Fake ML2 extension what should I do?
> I have neutron server installed and I have the file:
> https://github.com/openstack/neutron/blob/master/neutron/tests/unit/plugins/ml2/extensions/fake_extension.py
> How to configure neutron server, where should I put the file, should I
> create another files? How can I test that it works?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.openstack.org/pipermail/openstack-discuss/attachments/20220822/e33a5239/attachment.htm>


More information about the openstack-discuss mailing list