vmware-nsx/neutron/plugins/metaplugin
Amir Sadoughi 3a75160742 Added check on plugin.supported_extension_aliases
Added check to neutron.api.extensions.PluginAwareExtensionManager
which raises an exception when an alias in the plugin's
`supported_extension_aliases` list is not found in the set of loaded
extension aliases. If an alias is missing, it means the extension for
that alias has not been loaded, has not been found, and the file is
missing from paths listed in `oslo.config.CONF.api_extensions_path`.

This guards against a common class of bugs in plugins,
such as typographical errors in the `supported_extension_aliases`
property.

Plugin changes:

* bigswitch.plugin: Moves api_extensions_path override to plugin's
__init__ method, similar to other plugins.

* cisco.n1kv.n1kv_neutron_plugin: Removes "policy_profile_binding" and
"network_profile_binding" as they don't exist in Neutron currently.
Removed override of api_extensions_path as it is loaded through
cisco.network_plugin.

* cisco.network_plugin: Renames "Cisco Credential" to "credential".
Adds api_extension_path override to plugin's __init__ method.

* metaplugin.meta_neutron_plugin: Avoids alias of empty string when
cfg.CONF.META.supported_extension_aliases is an empty string.

* midonet.plugin: Fixes regression of 98e16a06 from 715b16ac.

* nec.nec_plugin: Extended override of api_extensions_path to append
nec extensions path to existing configured path.

* nicira.NeutronPlugin: Extended override of api_extensions_path to
append NXP_EXT_PATH to existing configured path.

Fixes: bug 1225080

Change-Id: Idcaade221d83c611fcbd87b503b2c8377d106962
2013-11-19 12:51:21 -06:00
..
common Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
__init__.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
meta_db_v2.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
meta_models_v2.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
meta_neutron_plugin.py Added check on plugin.supported_extension_aliases 2013-11-19 12:51:21 -06:00
proxy_neutron_plugin.py Adds support for L3 routing/NAT as a service plugin 2013-09-11 12:12:10 +02:00
README Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00

# -- Background

This plugin supports multiple plugin at same time. This plugin is for L3 connectivility
between networks which are realized by different plugins.This plugin adds new attributes 'flavor:network' and 'flavor:router".
flavor:network corresponds to specific l2 plugin ( flavor-plugin mapping could be configureable by plugin_list config.
flavor:router corresponds to specific l3 plugin ( flavor-plugin mapping could be configureable by l3_plugin_list config. Note that Metaplugin can provide l3 functionaliteis for l2 plugin which didn't support l3 extension yet.
This plugin also support extensions. We can map extension to plugin by using extension_map config.

[database]
# This line MUST be changed to actually run the plugin.
# Example:
# connection = mysql://root:nova@127.0.0.1:3306/ovs_neutron
# Replace 127.0.0.1 above with the IP address of the database used by the
# main neutron server. (Leave it as is if the database runs on this host.)
connection = mysql://root:password@localhost/neutron_metaplugin?charset=utf8

# Database reconnection retry times - in event connectivity is lost
# set to -1 implgies an infinite retry count
# max_retries = 10
# Database reconnection interval in seconds - in event connectivity is lost
retry_interval = 2

[meta]
## This is list of flavor:neutron_plugins
# extension method is used in the order of this list
plugin_list= 'openvswitch:neutron.plugins.openvswitch.ovs_neutron_plugin.OVSneutronPluginV2,linuxbridge:neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2'
# plugin for l3
l3_plugin_list= 'openvswitch:neutron.plugins.openvswitch.ovs_neutron_plugin.OVSneutronPluginV2,linuxbridge:neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2'

# Default value of flavor
default_flavor = 'openvswitch'
# Default value for l3
default_l3_flavor = 'openvswitch'

# supported extentions
supported_extension_aliases = 'providernet'
# specific method map for each flavor to extensions
extension_map = 'get_port_stats:nvp'

# -- BridgeDriver Configration
# In order to use metaplugin, you should use MetaDriver. Following configation is needed.

[DEFAULT]
# Meta Plugin
# Mapping between flavor and driver
meta_flavor_driver_mappings = openvswitch:neutron.agent.linux.interface.OVSInterfaceDriver, linuxbridge:neutron.agent.linux.interface.BridgeInterfaceDriver
# interface driver for MetaPlugin
interface_driver = neutron.agent.linux.interface.MetaInterfaceDriver

[proxy]
auth_url = http://10.0.0.1:35357/v2.0
auth_region = RegionOne
admin_tenant_name = service
admin_user =      neutron
admin_password = password


# -- Agent
Agents for Metaplugin are in neutron/plugins/metaplugin/agent
linuxbridge_neutron_agent and ovs_neutron_agent is available.

# -- Extensions

- flavor
MetaPlugin supports flavor and provider net extension.
Metaplugin select plugin_list using flavor.
One plugin may use multiple flavor value. If the plugin support flavor, it may provide
multiple flavor of network.

- Attribute extension
Each plugin can use attribute extension such as provider_net, if you specify that in supported_extension_aliases.

- providernet
Vlan ID range of each plugin should be different, since Metaplugin dose not manage that.

#- limitations

Basically, All plugin should inherit NeutronDbPluginV2.
Metaplugin assumes all plugin share same Database expecially for IPAM part in NeutronV2 API.
You can use another plugin if you use ProxyPluginV2, which proxies request to the another neutron server.

Example flavor configration for ProxyPluginV2

meta_flavor_driver_mappings = "openvswitch:neutron.agent.linux.interface.OVSInterfaceDriver,proxy:neutron.plugins.metaplugin.proxy_neutron_plugin.ProxyPluginV2"

- Limited L3 support
In folsom version, l3 is an extension. There is no way to extend exntension attributes.
so you can set flavor:router value but you can't get flavor:router value in API output.
L3 agent dont's support flavor:router.