This Page

The quantum.db.l3_db Module

class quantum.db.l3_db.ExternalNetwork(**kwargs)

Bases: sqlalchemy.ext.declarative.Base

network_id
class quantum.db.l3_db.FloatingIP(**kwargs)

Bases: sqlalchemy.ext.declarative.Base, quantum.db.models_v2.HasId, quantum.db.models_v2.HasTenant

Represents a floating IP, which may or many not be allocated to a tenant, and may or may not be associated with an internal port/ip address/router.

fixed_ip_address
fixed_port_id
floating_ip_address
floating_network_id
floating_port_id
id
router_id
tenant_id
class quantum.db.l3_db.L3_NAT_db_mixin

Bases: quantum.extensions.l3.RouterPluginBase

Mixin class to add L3/NAT router methods to db_plugin_base_v2

add_router_interface(context, router_id, interface_info)
create_floatingip(context, floatingip)
create_router(context, router)
delete_floatingip(context, id)
delete_router(context, id)
disassociate_floatingips(context, port_id)
get_assoc_data(context, fip, floating_network_id)

When a floating IP is associated with an internal port, we need to extract/determine some data associated with the internal port, including the internal_ip_address, and router_id. We also need to confirm that this internal port is owned by the tenant who owns the floating IP.

get_external_network_id(context)
get_floatingip(context, id, fields=None)
get_floatingips(context, filters=None, fields=None, sorts=None, limit=None, marker=None, page_reverse=False)
get_floatingips_count(context, filters=None)
get_router(context, id, fields=None)
get_routers(context, filters=None, fields=None, sorts=None, limit=None, marker=None, page_reverse=False)
get_routers_count(context, filters=None)
get_sync_data(context, router_ids=None, active=None)

Query routers and their related floating_ips, interfaces.

get_sync_gw_ports(context, gw_port_ids)
get_sync_interfaces(context, router_ids, device_owner='network:router_interface')

Query router interfaces that relate to list of router_ids.

prevent_l3_port_deletion(context, port_id)

Checks to make sure a port is allowed to be deleted, raising an exception if this is not the case. This should be called by any plugin when the API requests the deletion of a port, since some ports for L3 are not intended to be deleted directly via a DELETE to /ports, but rather via other API calls that perform the proper deletion checks.

remove_router_interface(context, router_id, interface_info)
update_floatingip(context, id, floatingip)
update_router(context, id, router)
class quantum.db.l3_db.Router(**kwargs)

Bases: sqlalchemy.ext.declarative.Base, quantum.db.models_v2.HasId, quantum.db.models_v2.HasTenant

Represents a v2 quantum router.

admin_state_up
gw_port
gw_port_id
id
name
status
tenant_id