commit
3e6b5b652f
@ -1,31 +0,0 @@
|
||||
# Config file for Metaplugin
|
||||
|
||||
[meta]
|
||||
# Comma separated list of flavor:neutron_plugin for plugins to load.
|
||||
# Extension method is searched in the list order and the first one is used.
|
||||
plugin_list = 'ml2:neutron.plugins.ml2.plugin.Ml2Plugin,nvp:neutron.plugins.vmware.plugin.NsxPluginV2'
|
||||
|
||||
# Comma separated list of flavor:neutron_plugin for L3 service plugins
|
||||
# to load.
|
||||
# This is intended for specifying L2 plugins which support L3 functions.
|
||||
# If you use a router service plugin, set this blank.
|
||||
l3_plugin_list =
|
||||
|
||||
# Default flavor to use, when flavor:network is not specified at network
|
||||
# creation.
|
||||
default_flavor = 'nvp'
|
||||
|
||||
# Default L3 flavor to use, when flavor:router is not specified at router
|
||||
# creation.
|
||||
# Ignored if 'l3_plugin_list' is blank.
|
||||
default_l3_flavor =
|
||||
|
||||
# Comma separated list of supported extension aliases.
|
||||
supported_extension_aliases = 'provider,binding,agent,dhcp_agent_scheduler'
|
||||
|
||||
# Comma separated list of method:flavor to select specific plugin for a method.
|
||||
# This has priority over method search order based on 'plugin_list'.
|
||||
extension_map = 'get_port_stats:nvp'
|
||||
|
||||
# Specifies flavor for plugin to handle 'q-plugin' RPC requests.
|
||||
rpc_flavor = 'ml2'
|
@ -1,3 +1,3 @@
|
||||
5498d17be016
|
||||
2a16083502f3
|
||||
8675309a5c4f
|
||||
kilo
|
||||
|
@ -1,64 +0,0 @@
|
||||
# Copyright 2012 Nachi Ueno, NTT MCL, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.api import extensions
|
||||
from neutron.api.v2 import attributes
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
FLAVOR_NETWORK = 'flavor:network'
|
||||
FLAVOR_ROUTER = 'flavor:router'
|
||||
|
||||
FLAVOR_ATTRIBUTE = {
|
||||
'networks': {
|
||||
FLAVOR_NETWORK: {'allow_post': True,
|
||||
'allow_put': False,
|
||||
'is_visible': True,
|
||||
'default': attributes.ATTR_NOT_SPECIFIED}
|
||||
},
|
||||
'routers': {
|
||||
FLAVOR_ROUTER: {'allow_post': True,
|
||||
'allow_put': False,
|
||||
'is_visible': True,
|
||||
'default': attributes.ATTR_NOT_SPECIFIED}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Flavor(extensions.ExtensionDescriptor):
|
||||
@classmethod
|
||||
def get_name(cls):
|
||||
return "Flavor support for network and router"
|
||||
|
||||
@classmethod
|
||||
def get_alias(cls):
|
||||
return "flavor"
|
||||
|
||||
@classmethod
|
||||
def get_description(cls):
|
||||
return "Flavor"
|
||||
|
||||
@classmethod
|
||||
def get_updated(cls):
|
||||
return "2012-07-20T10:00:00-00:00"
|
||||
|
||||
def get_extended_resources(self, version):
|
||||
if version == "2.0":
|
||||
return FLAVOR_ATTRIBUTE
|
||||
else:
|
||||
return {}
|
@ -1,6 +0,0 @@
|
||||
# NOTE
|
||||
|
||||
The main source codes of Metaplugin is now in https://github.com/ntt-sic/networking-metaplugin.
|
||||
They were moved from Neutron tree to there according to core-vendor-decomposition.
|
||||
Defining config and DB are still here according to the decomposition policy.
|
||||
Codes of 'flavor' extension and interface driver used by *-agent remain in Neutron tree too.
|
@ -1,78 +0,0 @@
|
||||
# Copyright 2012, Nachi Ueno, NTT MCL, Inc.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
|
||||
meta_plugin_opts = [
|
||||
cfg.StrOpt(
|
||||
'plugin_list',
|
||||
default='',
|
||||
help=_("Comma separated list of flavor:neutron_plugin for "
|
||||
"plugins to load. Extension method is searched in the "
|
||||
"list order and the first one is used.")),
|
||||
cfg.StrOpt(
|
||||
'l3_plugin_list',
|
||||
default='',
|
||||
help=_("Comma separated list of flavor:neutron_plugin for L3 "
|
||||
"service plugins to load. This is intended for specifying "
|
||||
"L2 plugins which support L3 functions. If you use a router "
|
||||
"service plugin, set this blank.")),
|
||||
cfg.StrOpt(
|
||||
'default_flavor',
|
||||
default='',
|
||||
help=_("Default flavor to use, when flavor:network is not "
|
||||
"specified at network creation.")),
|
||||
cfg.StrOpt(
|
||||
'default_l3_flavor',
|
||||
default='',
|
||||
help=_("Default L3 flavor to use, when flavor:router is not "
|
||||
"specified at router creation. Ignored if 'l3_plugin_list' "
|
||||
"is blank.")),
|
||||
cfg.StrOpt(
|
||||
'supported_extension_aliases',
|
||||
default='',
|
||||
help=_("Comma separated list of supported extension aliases.")),
|
||||
cfg.StrOpt(
|
||||
'extension_map',
|
||||
default='',
|
||||
help=_("Comma separated list of method:flavor to select specific "
|
||||
"plugin for a method. This has priority over method search "
|
||||
"order based on 'plugin_list'.")),
|
||||
cfg.StrOpt(
|
||||
'rpc_flavor',
|
||||
default='',
|
||||
help=_("Specifies flavor for plugin to handle 'q-plugin' RPC "
|
||||
"requests.")),
|
||||
]
|
||||
|
||||
proxy_plugin_opts = [
|
||||
cfg.StrOpt('admin_user',
|
||||
help=_("Admin user")),
|
||||
cfg.StrOpt('admin_password',
|
||||
help=_("Admin password"),
|
||||
secret=True),
|
||||
cfg.StrOpt('admin_tenant_name',
|
||||
help=_("Admin tenant name")),
|
||||
cfg.StrOpt('auth_url',
|
||||
help=_("Authentication URL")),
|
||||
cfg.StrOpt('auth_strategy', default='keystone',
|
||||
help=_("The type of authentication to use")),
|
||||
cfg.StrOpt('auth_region',
|
||||
help=_("Authentication region")),
|
||||
]
|
||||
|
||||
cfg.CONF.register_opts(meta_plugin_opts, "META")
|
||||
cfg.CONF.register_opts(proxy_plugin_opts, "PROXY")
|
@ -1,41 +0,0 @@
|
||||
# Copyright 2012, Nachi Ueno, NTT MCL, Inc.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy import Column, String
|
||||
|
||||
from neutron.db import models_v2
|
||||
|
||||
|
||||
class NetworkFlavor(models_v2.model_base.BASEV2):
|
||||
"""Represents a binding of network_id to flavor."""
|
||||
flavor = Column(String(255))
|
||||
network_id = sa.Column(sa.String(36), sa.ForeignKey('networks.id',
|
||||
ondelete="CASCADE"),
|
||||
primary_key=True)
|
||||
|
||||
def __repr__(self):
|
||||
return "<NetworkFlavor(%s,%s)>" % (self.flavor, self.network_id)
|
||||
|
||||
|
||||
class RouterFlavor(models_v2.model_base.BASEV2):
|
||||
"""Represents a binding of router_id to flavor."""
|
||||
flavor = Column(String(255))
|
||||
router_id = sa.Column(sa.String(36), sa.ForeignKey('routers.id',
|
||||
ondelete="CASCADE"),
|
||||
primary_key=True)
|
||||
|
||||
def __repr__(self):
|
||||
return "<RouterFlavor(%s,%s)>" % (self.flavor, self.router_id)
|
@ -1,19 +0,0 @@
|
||||
# Copyright 2012, Nachi Ueno, NTT MCL, Inc.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from metaplugin.plugin import meta_neutron_plugin
|
||||
|
||||
|
||||
MetaPluginV2 = meta_neutron_plugin.MetaPluginV2
|
Loading…
Reference in new issue