2. The Flow
• Overall Architecture.
• Description of Components
– Internal Flows.
• System-wide Control and Data Flows
– Communication between the components
• Tips for extensions.
• Documentation structure.
3. Neutron AgentsCompute Node Agent(s)
RPC Mechanism
REST APIs Management
Plugin Neutron DB
Service
Plugins
Mechanism
Driver
14. Initialization
__init__
_register_mechanisms()
This method should only be called once
Register all mechanism drivers via
NamedExtensionManager!!!
initialize
_sync_vlan_allocations()
Initialize
ex: VLAN
__init__
initialize()
for driver in
self.ordered_ext_drivers:
driver.obj.initialize()
initialize each driver
__init__(self):
_register_drivers()
Register all
extension drivers
initialize(self):
driver.obj.initialize()
__init__
_register_types()
_check_tenant_ne
twork_types()
15. Handling of REST calls
Ordered List of Mechanism Drivers
ML2-Plugin
[Create/Update/Delete_Network/Subnet/Port_Pre/PostCommit]
Mechanism-Manager
[Create/Update/Delete_Network/Subnet/Port_Pre/PostCommit]
Mechanism-
Driver-1
Mechanism-
Driver-2
Mechanism-
Driver-N
For each driver in the ordered_list_of_mechanism_Drivers:
Call appropriate function in each driver.
16. Handling of REST calls
ML2-Plugin
DB
Extension Manager Mechanism Manager
17. Handling Rest Calls – Create Port
_notify_l3_agent_new_port
notify_security_groups_member_updated
_bind_port_if_needed***
binding.vif_type !=
VIF_TYPE_UNBOUND or !
binding.host
_notify_port_updated()
if allow_notify and
need_notify:
return context
_bind_port(context)
count >
MAX_BIND_TRIES
_commit_port_binding()
_update_port_dict_binding
Construct a new PortContext
mechanism_manager.bind_port()
Binding:
segment
vif_type
vif_details
vnic_type
host
driver
profile