读文章笔记:Clean up OpenStack – Router and Networks

$ openstack --version
openstack 3.2.1

删除Neutron路由

$ neutron router-port-list RTE
+-------------------------------+------+-------------------+-------------------------------+
| id                            | name | mac_address       | fixed_ips                     |
+-------------------------------+------+-------------------+-------------------------------+
| 4f21ad82-9e1e-4712-bac0-533c2 |      | fa:16:3e:12:de:ef | {"subnet_id": "8797e2b2-d866  |
| c305f3b                       |      |                   | -49ba-a99d-96866d23d3f6",     |
|                               |      |                   | "ip_address": "10.10.20.1"}   |
| d340c2c5-8f72-46f0-af6a-      |      | fa:16:3e:34:c7:d4 | {"subnet_id": "44a15173-f83d- |
| f89be0004f64                  |      |                   | 442e-9361-4cda39c3aae5",      |
|                               |      |                   | "ip_address": "10.10.10.1"}   |
+-------------------------------+------+-------------------+-------------------------------+
$ neutron router-interface-delete RTE 10_10_10
Removed interface from router RTE.

$ neutron router-interface-delete RTE 10_10_20
Removed interface from router RTE.

注:10_10_10和10_10_20分别是两个subnet的名字。

$ neutron router-delete RTE
Deleted router(s): RTE

删除Neutron网络和子网

$ neutron net-list --name GREEN
+--------------------------------------+-------+-----------------------------------------+
| id                                   | name  | subnets                                 |
+--------------------------------------+-------+-----------------------------------------+
| 1bf07a93-749f-48b5-b5af-0c0862f00de7 | GREEN | 8797e2b2-d866-49ba-a99d-96866d23d3f6    |
|                                      |       | 10.10.20.0/24                           |
|                                      |       | 44a15173-f83d-442e-9361-4cda39c3aae5    |
|                                      |       | 10.10.10.0/24                           |
+--------------------------------------+-------+-----------------------------------------+

$ neutron net-delete GREEN
Deleted network: GREEN

参考文献

Clean up OpenStack – Router and Networks

你可能感兴趣的:(读文章笔记:Clean up OpenStack – Router and Networks)