The networking_cisco.plugins.ml2.drivers.cisco.ncs.driver Module

class networking_cisco.plugins.ml2.drivers.cisco.ncs.driver.NCSMechanismDriver

Bases: neutron_lib.plugins.ml2.api.MechanismDriver

Mechanism Driver for Tail-f Network Control System (NCS).

This driver makes portions of the Neutron database available for service provisioning in NCS. For example, NCS can use this information to provision physical switches and routers in response to OpenStack configuration changes.

The database is replicated from Neutron to NCS using HTTP and JSON.

The driver has two states: out-of-sync (initially) and in-sync.

In the out-of-sync state each driver event triggers an attempt to synchronize the complete database. On success the driver transitions to the in-sync state.

In the in-sync state each driver event triggers synchronization of one network or port. On success the driver stays in-sync and on failure it transitions to the out-of-sync state.

add_security_groups(context, dbcontext, port)

Populate the ‘security_groups’ field with entire records.

create_network_postcommit(context)
create_port_postcommit(context)
create_subnet_postcommit(context)
delete_network_postcommit(context)
delete_port_postcommit(context)
delete_subnet_postcommit(context)
escape(string)
escape_keys(obj)

Escape JSON keys to be NCS compatible. NCS does not allow period (.) or colon (:) characters.

initialize()
out_of_sync = True
sendjson(method, urlpath, obj)
sync_full(context)

Resync the entire database to NCS. Transition to the in-sync state on success.

sync_object(operation, object_type, context)

Synchronize the single modified record to NCS. Transition to the out-of-sync state on failure.

synchronize(operation, object_type, context)

Synchronize NCS with Neutron following a configuration change.

update_network_postcommit(context)
update_port_postcommit(context)
update_subnet_postcommit(context)