neutron surround you(4)
来源:互联网 发布:淘宝描述图片尺寸 编辑:程序博客网 时间:2024/05/20 15:11
前面讲了mechanism drivers(manager)的用途,剩下个type_drivers 没有说,在setup.cfg的entry_points中:
neutron.ml2.type_drivers =
flat = neutron.plugins.ml2.drivers.type_flat:FlatTypeDriver
local = neutron.plugins.ml2.drivers.type_local:LocalTypeDriver
vlan = neutron.plugins.ml2.drivers.type_vlan:VlanTypeDriver
gre = neutron.plugins.ml2.drivers.type_gre:GreTypeDriver
vxlan = neutron.plugins.ml2.drivers.type_vxlan:VxlanTypeDriver
nexus_vxlan = neutron.plugins.ml2.drivers.cisco.nexus.type_nexus_vxlan:NexusVxlanTypeDriver
一般常用的flat,vlan,gre三种,vxlan有时候也用,不过前面三种我亲自配过并用过。实际上实现一个type_driver只要实现
特定的几个方法就行了,validate_provider_segment,reserve_provider_segment,allocate_tenant_segment,release_segment等,那么type drivers用来干什么呢?
总结一句话:维护数据表,记录和网络类型相关的数据。 还是比较抽象的话,来看看数据库中的几个表格:
| ml2_vlan_allocations | CREATE TABLE `ml2_vlan_allocations` (
`physical_network` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`vlan_id` int(11) NOT NULL,
`allocated` tinyint(1) NOT NULL,
PRIMARY KEY (`physical_network`,`vlan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci |
| ml2_flat_allocations | CREATE TABLE `ml2_flat_allocations` (
`physical_network` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`physical_network`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci |
| ml2_vxlan_allocations | CREATE TABLE `ml2_vxlan_allocations` (
`vxlan_vni` int(11) NOT NULL,
`allocated` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`vxlan_vni`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci |
| ml2_gre_allocations | CREATE TABLE `ml2_gre_allocations` (
`gre_id` int(11) NOT NULL,
`allocated` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`gre_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci |
分别是vlan,flat,vxlan,gre, 而在ML2Plugin中,创建网络时,会根据不同的network_type进行不同的操作
type_drivers 和 mechanism drivers结合使用,灵活性更强
至于最后一个setup.cfg中的service_providers,和core plugin中对应的有type driver 和 mechanism driver, 对于service_plugin来说,
一个service_plugin可能有不同的driver,这些driver就由service_provider提供,不再trace其load 过程
从前面到这里,即使你把neutron的code 都trace一遍,只是和其他的openstack module一样,你知道了wsgi服务怎么运行起来的,知道了
rpc服务怎么用的(neutron的rpc不特别分析,之后会专门说rpc),知道了配置core plugin到manager到driver,到extensions,service_plguins以及service plugin
的driver,你甚至可以写自己的driver了,然而,这仅仅是理论,网络的复杂性在于,作为admin,你得面对真实的网络,你得和真实的网卡,交换机,路由器打交道,因此要对不同的网络类型再深入的分析一下。
- neutron surround you(4)
- neutron surround you(1)
- neutron surround you(2)
- neutron surround you(3)
- Surround the Trees 7.1.4
- Neutron印象4:neutron-openvswitch-agent
- neutron
- Neutron
- Neutron DHCP-Agent问题分析定位(4)
- Neutron 的物理部署方案(4)
- Neutron 理解 (4): Neutron OVS OpenFlow 流表 和 L2 Population [Netruon OVS OpenFlow tables + L2 Populatio
- Neutron 理解 (4): Neutron OVS OpenFlow 流表 和 L2 Population [Netruon OVS OpenFlow tables + L2 Population
- 1392 Surround the Trees
- Surround the Trees
- Surround the Trees
- Surround the Trees
- Surround the Trees
- html基础-surround
- Java中split()函数用法技巧
- tcp/ip ---------- traceroute
- 将博客搬至51CTO
- android 在ide中下载帮助文档
- 6lowpan入门学习知识储备
- neutron surround you(4)
- 自己常见的一些JavaScript兼容总结
- 对于不返回任何键列信息的 selectcommand 不支持 updatecommand 的动态 sql 生成
- 欢迎使用CSDN-markdown编辑器
- LeetCode 056-Merge Intervals
- codrops
- Linux进程间通信--mmap()共享内存(二)
- 黑马程序员——IO流1:概述
- JavaScript笔记--数据属性和访问器属性