This Page

The quantum.plugins.nec.nec_plugin Module

class quantum.plugins.nec.nec_plugin.DhcpRpcCallback

Bases: quantum.db.dhcp_rpc_base.DhcpRpcCallbackMixin

RPC_API_VERSION = '1.0'
class quantum.plugins.nec.nec_plugin.L3RpcCallback

Bases: quantum.db.l3_rpc_base.L3RpcCallbackMixin

RPC_API_VERSION = '1.0'
class quantum.plugins.nec.nec_plugin.NECPluginV2

Bases: quantum.plugins.nec.db.nec_plugin_base.NECPluginV2Base, quantum.db.extraroute_db.ExtraRoute_db_mixin, quantum.db.securitygroups_rpc_base.SecurityGroupServerRpcMixin, quantum.db.agentschedulers_db.AgentSchedulerDbMixin

NECPluginV2 controls an OpenFlow Controller.

The Quantum NECPluginV2 maps L2 logical networks to L2 virtualized networks on an OpenFlow enabled network. An OpenFlow Controller (OFC) provides L2 network isolation without VLAN and this plugin controls the OFC.

NOTE: This is for Quantum API V2. Codes for V1.0 and V1.1 are available
at https://github.com/nec-openstack/quantum-openflow-plugin .

The port binding extension enables an external application relay information to and from the plugin.

activate_port_if_ready(context, port, network=None)

Activate port by creating port on OFC if ready.

Activate port and packet_filters associated with the port. Conditions to activate port on OFC are:

  • port admin_state is UP
  • network admin_state is UP
  • portinfo are available (to identify port on OFC)
binding_set = 'extension:port_binding:set'
binding_view = 'extension:port_binding:view'
create_network(context, network)

Create a new network entry on DB, and create it on OFC.

create_packet_filter(context, packet_filter)

Create a new packet_filter entry on DB, then try to activate it.

create_port(context, port)

Create a new port entry on DB, then try to activate it.

deactivate_port(context, port)

Deactivate port by deleting port from OFC if exists.

Deactivate port and packet_filters associated with the port.

delete_network(context, id)

Delete network and packet_filters associated with the network.

Delete network entry from DB and OFC. Then delete packet_filters associated with the network. If the network is the last resource of the tenant, delete unnessary ofc_tenant.

delete_packet_filter(context, id)

Deactivate and delete packet_filter.

delete_port(context, id, l3_port_check=True)

Delete port and packet_filters associated with the port.

get_network(context, id, fields=None)
get_networks(context, filters=None, fields=None)
get_port(context, id, fields=None)
get_ports(context, filters=None, fields=None)
setup_rpc()
supported_extension_aliases
update_network(context, id, network)

Update network and handle resources associated with the network.

Update network entry on DB. If ‘admin_state_up’ was changed, activate or deactivate ports and packetfilters associated with the network.

update_packet_filter(context, id, packet_filter)

Update packet_filter entry on DB, and recreate it if changed.

If any rule of the packet_filter was changed, recreate it on OFC.

update_port(context, id, port)

Update port, and handle packetfilters associated with the port.

Update network entry on DB. If admin_state_up was changed, activate or deactivate the port and packetfilters associated with it.

class quantum.plugins.nec.nec_plugin.NECPluginV2AgentNotifierApi(topic)

Bases: quantum.openstack.common.rpc.proxy.RpcProxy, quantum.agent.securitygroups_rpc.SecurityGroupAgentRpcApiMixin

RPC API for NEC plugin agent

BASE_RPC_API_VERSION = '1.0'
port_update(context, port)
class quantum.plugins.nec.nec_plugin.NECPluginV2RPCCallbacks(plugin)

Bases: object

RPC_API_VERSION = '1.0'
create_rpc_dispatcher()

Get the rpc dispatcher for this manager.

If a manager would like to set an rpc API version, or support more than one class as the target of rpc messages, override this method.

update_ports(rpc_context, **kwargs)

Update ports’ information and activate/deavtivate them.

Expected input format is:
{‘topic’: ‘q-agent-notifier’,
‘agent_id’: ‘nec-q-agent.’ + <hostname>, ‘datapath_id’: <datapath_id of br-int on remote host>, ‘port_added’: [<new PortInfo>,...], ‘port_removed’: [<removed Port ID>,...]}
class quantum.plugins.nec.nec_plugin.OperationalStatus

Enumeration for operational status.

ACTIVE: The resource is available. DOWN: The resource is not operational. This might indicate

admin_state_up=False, or lack of OpenFlow info for the port.

BUILD: The plugin is creating the resource. ERROR: Some error occured.

ACTIVE = 'ACTIVE'
BUILD = 'BUILD'
DOWN = 'DOWN'
ERROR = 'ERROR'
class quantum.plugins.nec.nec_plugin.SecurityGroupServerRpcCallback

Bases: quantum.db.securitygroups_rpc_base.SecurityGroupServerRpcCallbackMixin

RPC_API_VERSION = '1.1'
static get_port_from_device(device)