neutron_fwaas.services.firewall.service_drivers.driver_api module

class neutron_fwaas.services.firewall.service_drivers.driver_api.FirewallDriver(service_plugin: Any)

Bases: object

Firewall v2 interface for driver

That driver interface does not persist Firewall v2 data in any database. The driver needs to do it by itself.

abstractmethod create_firewall_group(context: Context, firewall_group: dict[str, Any]) → Any
abstractmethod create_firewall_policy(context: Context, firewall_policy: dict[str, Any]) → Any
abstractmethod create_firewall_rule(context: Context, firewall_rule: dict[str, Any]) → Any
abstractmethod delete_firewall_group(context: Context, id: str) → None
abstractmethod delete_firewall_policy(context: Context, id: str) → None
abstractmethod delete_firewall_rule(context: Context, id: str) → None
abstractmethod get_firewall_group(context: Context, id: str, fields: dict[str, Any] | None = None) → Any
abstractmethod get_firewall_groups(context: Context, filters: dict[str, Any] | None = None, fields: dict[str, Any] | None = None) → list[Any]
abstractmethod get_firewall_policies(context: Context, filters: dict[str, Any] | None = None, fields: dict[str, Any] | None = None) → list[Any]
abstractmethod get_firewall_policy(context: Context, id: str, fields: dict[str, Any] | None = None) → Any
abstractmethod get_firewall_rule(context: Context, id: str, fields: dict[str, Any] | None = None) → Any
abstractmethod get_firewall_rules(context: Context, filters: dict[str, Any] | None = None, fields: dict[str, Any] | None = None) → list[Any]
abstractmethod insert_rule(context: Context, policy_id: str, rule_info: dict[str, Any]) → Any
is_supported_l2_port(port: dict[str, Any]) → bool
is_supported_l3_port(port: dict[str, Any]) → bool
register_logging_driver() → None
abstractmethod remove_rule(context: Context, policy_id: str, rule_info: dict[str, Any]) → Any
abstractmethod update_firewall_group(context: Context, id: str, firewall_group: dict[str, Any]) → Any
abstractmethod update_firewall_policy(context: Context, id: str, firewall_policy: dict[str, Any]) → Any
abstractmethod update_firewall_rule(context: Context, id: str, firewall_rule: dict[str, Any]) → Any
class neutron_fwaas.services.firewall.service_drivers.driver_api.FirewallDriverDB(*args: Any, **kwargs: Any)

Bases: FirewallDriverDBMixin

FirewallDriverDBMixin interface for driver with database.

Each firewall backend driver that needs a database persistency should inherit from this driver. It can overload needed methods from the following pre/postcommit methods. Any exception raised during a precommit method will result in not having related records in the databases.

create_firewall_group_postcommit(context: Context, firewall_group: dict[str, Any]) → None
create_firewall_group_precommit(context: Context, firewall_group: dict[str, Any]) → None
create_firewall_policy_postcommit(context: Context, firewall_policy: dict[str, Any]) → None
create_firewall_policy_precommit(context: Context, firewall_policy: dict[str, Any]) → None
create_firewall_rule_postcommit(context: Context, firewall_rule: dict[str, Any]) → None
create_firewall_rule_precommit(context: Context, firewall_rule: dict[str, Any]) → None
delete_firewall_group_postcommit(context: Context, firewall_group: dict[str, Any]) → None
delete_firewall_group_precommit(context: Context, firewall_group: dict[str, Any]) → None
delete_firewall_policy_postcommit(context: Context, firewall_policy: dict[str, Any]) → None
delete_firewall_policy_precommit(context: Context, firewall_policy: dict[str, Any]) → None
delete_firewall_rule_postcommit(context: Context, firewall_rule: dict[str, Any]) → None
delete_firewall_rule_precommit(context: Context, firewall_rule: dict[str, Any]) → None
insert_rule_postcommit(context: Context, policy_id: str, rule_info: dict[str, Any]) → None
insert_rule_precommit(context: Context, policy_id: str, rule_info: dict[str, Any]) → None
remove_rule_postcommit(context: Context, policy_id: str, rule_info: dict[str, Any]) → None
remove_rule_precommit(context: Context, policy_id: str, rule_info: dict[str, Any]) → None
update_firewall_group_postcommit(context: Context, old_firewall_group: dict[str, Any], new_firewall_group: dict[str, Any]) → None
update_firewall_group_precommit(context: Context, old_firewall_group: dict[str, Any], new_firewall_group: dict[str, Any]) → None
update_firewall_policy_postcommit(context: Context, old_firewall_policy: dict[str, Any], new_firewall_policy: dict[str, Any]) → None
update_firewall_policy_precommit(context: Context, old_firewall_policy: dict[str, Any], new_firewall_policy: dict[str, Any]) → None
update_firewall_rule_postcommit(context: Context, old_firewall_rule: dict[str, Any], new_firewall_rule: dict[str, Any]) → None
update_firewall_rule_precommit(context: Context, old_firewall_rule: dict[str, Any], new_firewall_rule: dict[str, Any]) → None
class neutron_fwaas.services.firewall.service_drivers.driver_api.FirewallDriverDBMixin(*args: Any, **kwargs: Any)

Bases: FirewallDriver

FirewallDriverDB mixin to provision the database on behalf of the driver

That driver interface persists Firewall data in its database and forwards the result to pre and post commit methods.

create_firewall_group(context: Context, firewall_group: dict[str, Any]) → Any
abstractmethod create_firewall_group_postcommit(context: Context, firewall_group: dict[str, Any]) → None
abstractmethod create_firewall_group_precommit(context: Context, firewall_group: dict[str, Any]) → None
create_firewall_policy(context: Context, firewall_policy: dict[str, Any]) → Any
abstractmethod create_firewall_policy_postcommit(context: Context, firewall_policy: dict[str, Any]) → None
abstractmethod create_firewall_policy_precommit(context: Context, firewall_policy: dict[str, Any]) → None
create_firewall_rule(context: Context, firewall_rule: dict[str, Any]) → Any
abstractmethod create_firewall_rule_postcommit(context: Context, firewall_rule: dict[str, Any]) → None
abstractmethod create_firewall_rule_precommit(context: Context, firewall_rule: dict[str, Any]) → None
delete_firewall_group(context: Context, id: str) → None
abstractmethod delete_firewall_group_postcommit(context: Context, firewall_group: dict[str, Any]) → None
abstractmethod delete_firewall_group_precommit(context: Context, firewall_group: dict[str, Any]) → None
delete_firewall_policy(context: Context, id: str) → None
abstractmethod delete_firewall_policy_postcommit(context: Context, firewall_policy: dict[str, Any]) → None
abstractmethod delete_firewall_policy_precommit(context: Context, firewall_policy: dict[str, Any]) → None
delete_firewall_rule(context: Context, id: str) → None
abstractmethod delete_firewall_rule_postcommit(context: Context, firewall_rule: dict[str, Any]) → None
abstractmethod delete_firewall_rule_precommit(context: Context, firewall_rule: dict[str, Any]) → None
get_firewall_group(context: Context, id: str, fields: dict[str, Any] | None = None) → Any
get_firewall_groups(context: Context, filters: dict[str, Any] | None = None, fields: dict[str, Any] | None = None) → list[Any]
get_firewall_policies(context: Context, filters: dict[str, Any] | None = None, fields: dict[str, Any] | None = None) → list[Any]
get_firewall_policy(context: Context, id: str, fields: dict[str, Any] | None = None) → Any
get_firewall_rule(context: Context, id: str, fields: dict[str, Any] | None = None) → Any
get_firewall_rules(context: Context, filters: dict[str, Any] | None = None, fields: dict[str, Any] | None = None) → list[Any]
insert_rule(context: Context, policy_id: str, rule_info: dict[str, Any]) → Any
abstractmethod insert_rule_postcommit(context: Context, policy_id: str, rule_info: dict[str, Any]) → None
abstractmethod insert_rule_precommit(context: Context, policy_id: str, rule_info: dict[str, Any]) → None
remove_rule(context: Context, policy_id: str, rule_info: dict[str, Any]) → Any
abstractmethod remove_rule_postcommit(context: Context, policy_id: str, rule_info: dict[str, Any]) → None
abstractmethod remove_rule_precommit(context: Context, policy_id: str, rule_info: dict[str, Any]) → None
update_firewall_group(context: Context, id: str, firewall_group_delta: dict[str, Any]) → Any
abstractmethod update_firewall_group_postcommit(context: Context, old_firewall_group: dict[str, Any], new_firewall_group: dict[str, Any]) → None
abstractmethod update_firewall_group_precommit(context: Context, old_firewall_group: dict[str, Any], new_firewall_group: dict[str, Any]) → None
update_firewall_policy(context: Context, id: str, firewall_policy_delta: dict[str, Any]) → Any
abstractmethod update_firewall_policy_postcommit(context: Context, old_firewall_policy: dict[str, Any], new_firewall_policy: dict[str, Any]) → None
abstractmethod update_firewall_policy_precommit(context: Context, old_firewall_policy: dict[str, Any], new_firewall_policy: dict[str, Any]) → None
update_firewall_rule(context: Context, id: str, firewall_rule_delta: dict[str, Any]) → Any
abstractmethod update_firewall_rule_postcommit(context: Context, old_firewall_rule: dict[str, Any], new_firewall_rule: dict[str, Any]) → None
abstractmethod update_firewall_rule_precommit(context: Context, old_firewall_rule: dict[str, Any], new_firewall_rule: dict[str, Any]) → None
class neutron_fwaas.services.firewall.service_drivers.driver_api.FirewallDriverRPCMixin

Bases: object

FirewallAgent interface for driver with rpc callback listener.

Each firewall backend driver that needs a rpc callback listener should inherit from this driver.

abstractmethod start_rpc_listener() → list[Any]