neutron_fwaas.services.firewall.service_drivers.agents.l2.fwaas_v2 module

class neutron_fwaas.services.firewall.service_drivers.agents.l2.fwaas_v2.FWaaSL2PluginApi(topic, host)

Bases: FWaaSPluginApiMixin

L2 agent side of FWaaS agent-to-plugin RPC API

firewall_group_deleted(context, fwg_id, host)

Notifies the plugin that a firewall group has been deleted.

get_firewall_group_for_port(context, port_id)

Get firewall group is associated with a port

set_firewall_group_status(context, fwg_id, status, host)

Set the status of a group operation.

class neutron_fwaas.services.firewall.service_drivers.agents.l2.fwaas_v2.FWaaSV2AgentExtension

Bases: L2AgentExtension

consume_api(agent_api)

Consume the AgentAPI instance from the AgentExtensionsManager.

Allows an extension to gain access to resources internal to the neutron agent and otherwise unavailable to the extension. Examples of such resources include bridges, ports, and routers.

Parameters:

agent_api – An instance of an agent-specific API.

create_firewall_group(context, firewall_group, host)

Handles create firewall group event

delete_firewall_group(context, firewall_group, host)

Handles delete firewall group event

delete_port(context, port)

This is being called when a port is deleted by the agent.

handle_port(context, port)

Handle port update event

initialize(connection, driver_type)

Perform Agent Extension initialization

start_rpc_listeners()
update_firewall_group(context, firewall_group, host)

Handles update firewall group event

class neutron_fwaas.services.firewall.service_drivers.agents.l2.fwaas_v2.PortFirewallGroupMap

Bases: object

Store relations between Port and Firewall Group and trusted port

This map is used in deleting firewall_group because the firewall_group has been deleted at that time. Therefore, it is impossible to refer ‘ports’. This map enables to refer ‘ports’ for specified firewall_group. Furthermore, it is necessary to check ‘device_owner’ for trusted port, this Map also stores trusted port data.

get_fwg(fwg_id)
get_port(port)
get_port_fwg(port)
port_id(port)
remove_fwg(fwg)

Remove firewall_group from known_fwgs dictionary

When removing firewall_group, it should be removed from this map

remove_port(port)

Remove port from fwg[‘ports’] and port_fwg dictionary

When removing ‘port’ from several cases, the port should be removed from this map.

set_fwg(fwg)
set_port(port)

Add a new port into port_detail

set_port_fwg(port, fwg)

Add a new port into fwg[‘ports’]