> 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/etc/neutron.md).

# neutron/

## plugins/

包括bigswitch、brocade、cisco、……等多种插件的配置文件（ini文件）。

## rootwrap.d

包括一系列的filter文件。包括debug.filters rootwrap是实现让非特权用户以root权限去运行某些命令。这些命令就在filter中指定。 以neutron用户为例，在/etc/sudoers.d/neutron文件中有

```
neutron ALL = (root) NOPASSWD: SETENV: /usr/bin/neutron-rootwrap
```

使得neutron可以以root权限运行neutron-rootwrap。

而在/etc/neutron/rootwarp.conf中定义了

```
filters_path=/etc/neutron/rootwrap.d,/usr/share/neutron/rootwrap,/etc/quantum/rootwrap.d,/usr/share/quantum/rootwrap
```

这些目录中定义了命令的filter，也就是说匹配这些filter中定义的命令就可以用root权限执行了。这些filter中命令的典型格式为

```
cmd-name: filter-name, raw-command, user, args
```

例如/usr/share/neutron/rootwrap/dhcp.filters文件中的如下命令允许以root身份执行ovs-vsctl命令。

```
ovs-vsctl: CommandFilter, ovs-vsctl, root
```

需要注意/etc/neutron/rootwrap.d，/usr/neutron/nova/rootwrap必须是root权限才能修改。


---

# 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/etc/neutron.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.
