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

class neutron_fwaas.services.firewall.service_drivers.agents.l2.fwaas_v2.FWaaSL2PluginApi(topic: str, host: str, rpc_version: str = '1.1')

Bases: FWaaSPluginApiMixin

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

firewall_group_deleted(context: Context, fwg_id: str, host: str) → Any

Notifies the plugin that a firewall group has been deleted.

get_firewall_group_for_port(context: Context, port_id: str | None, host: str) → dict[str, Any] | None

Get firewall group is associated with a port

set_firewall_group_status(context: Context, fwg_id: str, status: str | None, host: str) → Any

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: Any) → None

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: Context, firewall_group: dict[str, Any], host: str) → None

Handles create firewall group event

delete_firewall_group(context: Context, firewall_group: dict[str, Any], host: str) → None

Handles delete firewall group event

delete_port(context: Context, port: dict[str, Any]) → None

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

handle_port(context: Context, port: dict[str, Any]) → None

Handle port update event

initialize(connection: Any, driver_type: str) → None

Perform Agent Extension initialization

start_rpc_listeners() → list[Any]
target = <Target version=1.1>
update_firewall_group(context: Context, firewall_group: dict[str, Any], host: str) → None

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: str) → dict[str, Any] | None
get_port(port: dict[str, Any] | str) → dict[str, Any] | None
get_port_fwg(port: dict[str, Any] | str) → dict[str, Any] | None
known_fwgs: dict[str, dict[str, Any]]
port_detail: dict[str, dict[str, Any]]
port_fwg: dict[str, str]
port_id(port: dict[str, Any] | str) → str | None
remove_fwg(fwg: dict[str, Any]) → None

Remove firewall_group from known_fwgs dictionary

When removing firewall_group, it should be removed from this map

remove_port(port: dict[str, Any]) → None

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: dict[str, Any]) → None
set_port(port: dict[str, Any]) → None

Add a new port into port_detail

set_port_fwg(port: dict[str, Any], fwg: dict[str, Any]) → None

Add a new port into fwg[‘ports’]