Guided Tour: The Neutron Security Group API¶
The API extension is the ‘front’ end portion of the code, which handles defining a REST-ful API, which is used by projects.
The Security Group API extension adds a number of methods to the database layer of Neutron
This portion of the code handles processing requests from projects, after they have been stored in the database. It involves messaging all the L2 agents running on the compute nodes, and modifying the IPTables rules on each hypervisor.
SecurityGroupServerRpcMixin - defines the RPC API that the plugin uses to communicate with the agents running on the compute nodes
SecurityGroupServerRpcMixin - Defines the API methods used to fetch data from the database, in order to return responses to agents via the RPC API
The SecurityGroupServerRpcApi defines the API methods that can be called by agents, back to the plugin that runs on the Neutron controller
The SecurityGroupAgentRpcCallbackMixin defines methods that a plugin uses to call back to an agent after performing an action called by an agent.
portargument, which is a
dictionaryobject that contains information about the port - including the
prepare_port_filterappends the port to an internal dictionary,
filtered_portswhich is used to track the internal state.
Each security group has a chain in Iptables.
IptablesFirewallDriverhas a method to convert security group rules into iptables statements.