> For the complete documentation index, see [llms.txt](https://yeasy.gitbook.io/openstack_code_neutron/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yeasy.gitbook.io/openstack_code_neutron/neutron/plugins/ibm/sdnve_neutron_pluginpy.md).

# sdnve\_neutron\_plugin.py

主要定义了 SdnvePluginV2 类，继承自如下几个基础类：

* db\_base\_plugin\_v2.NeutronDbPluginV2：提供在数据库中对网络、子网、端口的CRUD操作API；
* external\_net\_db.External\_net\_db\_mixin：为db\_base\_plugin\_v2添加对外部网络的操作方法；
* portbindings\_db.PortBindingMixin：端口绑定相关的操作；
* l3\_gwmode\_db.L3\_NAT\_db\_mixin：添加可配置的网关模式，为端口和网络提供字典风格的扩展函数。
* agents\_db.AgentDbMixin：为db\_base\_plugin\_v2添加agent扩展，对agent的创建、删除、获取等。

SdnvePluginV2类实现了neutron中定义的API，实现基于SDN-VE对上提供网络抽象的支持。包括对网络、子网、端口、路由器等资源的CRUD操作。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://yeasy.gitbook.io/openstack_code_neutron/neutron/plugins/ibm/sdnve_neutron_pluginpy.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
