Openstack Quantum renamed to Neutron
This commit is contained in:
28
README.rst
28
README.rst
@@ -16,34 +16,34 @@ end of the wsgi request needs to commit the transaction, or transaction
|
||||
aware databases (MySQL InnoDB, Postgres, et. al) will never commit.
|
||||
|
||||
|
||||
The following quantum api-paste.ini enables `repoze.tm2` to in the
|
||||
The following neutron api-paste.ini enables `repoze.tm2` to in the
|
||||
pipeline after authentication so transactions are started coming
|
||||
up the pipeline and commited coming down
|
||||
|
||||
|
||||
.. code:: ini
|
||||
|
||||
[composite:quantum]
|
||||
[composite:neutron]
|
||||
use = egg:Paste#urlmap
|
||||
/: quantumversions
|
||||
/v2.0: quantumapi_v2_0
|
||||
/: neutronversions
|
||||
/v2.0: neutronapi_v2_0
|
||||
|
||||
[composite:quantumapi_v2_0]
|
||||
use = call:quantum.auth:pipeline_factory
|
||||
noauth = egg:repoze.tm2#tm extensions quantumapiapp_v2_0
|
||||
keystone = authtoken keystonecontext egg:repoze.tm2#tm extensions quantumapiapp_v2_0
|
||||
[composite:neutronapi_v2_0]
|
||||
use = call:neutron.auth:pipeline_factory
|
||||
noauth = egg:repoze.tm2#tm extensions neutronapiapp_v2_0
|
||||
keystone = authtoken keystonecontext egg:repoze.tm2#tm extensions neutronapiapp_v2_0
|
||||
|
||||
[filter:keystonecontext]
|
||||
paste.filter_factory = quantum.auth:QuantumKeystoneContext.factory
|
||||
paste.filter_factory = neutron.auth:NeutronKeystoneContext.factory
|
||||
|
||||
[filter:authtoken]
|
||||
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
|
||||
|
||||
[filter:extensions]
|
||||
paste.filter_factory = quantum.api.extensions:plugin_aware_extension_middleware_factory
|
||||
paste.filter_factory = neutron.api.extensions:plugin_aware_extension_middleware_factory
|
||||
|
||||
[app:quantumversions]
|
||||
paste.app_factory = quantum.api.versions:Versions.factory
|
||||
[app:neutronversions]
|
||||
paste.app_factory = neutron.api.versions:Versions.factory
|
||||
|
||||
[app:quantumapiapp_v2_0]
|
||||
paste.app_factory = quantum.api.v2.router:APIRouter.factory
|
||||
[app:neutronapiapp_v2_0]
|
||||
paste.app_factory = neutron.api.v2.router:APIRouter.factory
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
from quantum import context
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum import wsgi
|
||||
from neutron import context
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron import wsgi
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@@ -44,5 +44,5 @@ class NoAuthMiddleware(wsgi.Middleware):
|
||||
project_id,
|
||||
is_admin=True)
|
||||
|
||||
req.environ['quantum.context'] = ctx
|
||||
req.environ['neutron.context'] = ctx
|
||||
return self.application
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
|
||||
import webob
|
||||
|
||||
from quantum.api import extensions
|
||||
from quantum.common import exceptions
|
||||
from quantum import manager
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum import wsgi
|
||||
from neutron.api import extensions
|
||||
from neutron.common import exceptions
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron import wsgi
|
||||
|
||||
RESOURCE_NAME = 'ip_address'
|
||||
RESOURCE_COLLECTION = RESOURCE_NAME + "es"
|
||||
@@ -32,7 +32,7 @@ attr_dict[RESOURCE_NAME] = {'allow_post': True,
|
||||
'allow_put': True,
|
||||
'is_visible': True}
|
||||
|
||||
LOG = logging.getLogger("quantum.quark.api.extensions.ip_addresses")
|
||||
LOG = logging.getLogger("neutron.quark.api.extensions.ip_addresses")
|
||||
|
||||
|
||||
class IpAddressesController(wsgi.Controller):
|
||||
@@ -105,7 +105,7 @@ class Ip_addresses(object):
|
||||
@classmethod
|
||||
def get_resources(cls):
|
||||
"""Returns Ext Resources."""
|
||||
controller = IpAddressesController(manager.QuantumManager.get_plugin())
|
||||
controller = IpAddressesController(manager.NeutronManager.get_plugin())
|
||||
return [extensions.ResourceExtension(
|
||||
Ip_addresses.get_alias(),
|
||||
controller)]
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
|
||||
import webob
|
||||
|
||||
from quantum.api import extensions
|
||||
from quantum import manager
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum import wsgi
|
||||
from neutron.api import extensions
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron import wsgi
|
||||
|
||||
RESOURCE_NAME = 'mac_address_range'
|
||||
RESOURCE_COLLECTION = RESOURCE_NAME + "s"
|
||||
@@ -31,7 +31,7 @@ attr_dict[RESOURCE_NAME] = {'allow_post': True,
|
||||
'allow_put': False,
|
||||
'is_visible': True}
|
||||
|
||||
LOG = logging.getLogger("quantum.quark.api.extensions.mac_address_ranges")
|
||||
LOG = logging.getLogger("neutron.quark.api.extensions.mac_address_ranges")
|
||||
|
||||
|
||||
def mac_range_dict(mac_range):
|
||||
@@ -102,7 +102,7 @@ class Mac_address_ranges(object):
|
||||
@classmethod
|
||||
def get_resources(cls):
|
||||
"""Returns Ext Resources."""
|
||||
plugin = manager.QuantumManager.get_plugin()
|
||||
plugin = manager.NeutronManager.get_plugin()
|
||||
controller = MacAddressRangesController(plugin)
|
||||
return [extensions.ResourceExtension(Mac_address_ranges.get_alias(),
|
||||
controller)]
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
|
||||
import webob
|
||||
|
||||
from quantum.api import extensions
|
||||
from quantum.api.v2 import attributes
|
||||
from quantum.api.v2 import base
|
||||
from quantum.api.v2 import resource
|
||||
from quantum.common import exceptions
|
||||
from quantum import manager
|
||||
from quantum import wsgi
|
||||
from neutron.api import extensions
|
||||
from neutron.api.v2 import attributes
|
||||
from neutron.api.v2 import base
|
||||
from neutron.api.v2 import resource
|
||||
from neutron.common import exceptions
|
||||
from neutron import manager
|
||||
from neutron import wsgi
|
||||
|
||||
RESOURCE_NAME = "port"
|
||||
RESOURCE_COLLECTION = RESOURCE_NAME + "s"
|
||||
@@ -117,7 +117,7 @@ class Ports_quark(object):
|
||||
collection_name=RESOURCE_COLLECTION)
|
||||
quark_ports_ip_address_controller = resource.Resource(
|
||||
QuarkPortsIPAddressController(
|
||||
manager.QuantumManager.get_plugin()),
|
||||
manager.NeutronManager.get_plugin()),
|
||||
base.FAULT_MAP)
|
||||
extension = extensions.ResourceExtension(
|
||||
"ip_address",
|
||||
@@ -131,7 +131,7 @@ class Ports_quark(object):
|
||||
exts = []
|
||||
|
||||
quark_ports_update_handler = QuarkPortsUpdateHandler(
|
||||
manager.QuantumManager.get_plugin())
|
||||
manager.NeutronManager.get_plugin())
|
||||
extension = extensions.RequestExtension(
|
||||
"POST", "/ports/:(id)",
|
||||
quark_ports_update_handler.handle)
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
|
||||
import webob
|
||||
|
||||
from quantum.api import extensions
|
||||
from quantum.common import exceptions
|
||||
from quantum import manager
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum import wsgi
|
||||
from neutron.api import extensions
|
||||
from neutron.common import exceptions
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron import wsgi
|
||||
|
||||
RESOURCE_NAME = 'route'
|
||||
RESOURCE_COLLECTION = RESOURCE_NAME + "s"
|
||||
@@ -32,7 +32,7 @@ attr_dict[RESOURCE_NAME] = {'allow_post': True,
|
||||
'allow_put': True,
|
||||
'is_visible': True}
|
||||
|
||||
LOG = logging.getLogger("quantum.quark.api.extensions.routes")
|
||||
LOG = logging.getLogger("neutron.quark.api.extensions.routes")
|
||||
|
||||
|
||||
def route_dict(route):
|
||||
@@ -109,7 +109,7 @@ class Routes(object):
|
||||
@classmethod
|
||||
def get_resources(cls):
|
||||
"""Returns Ext Resources."""
|
||||
controller = RoutesController(manager.QuantumManager.get_plugin())
|
||||
controller = RoutesController(manager.NeutronManager.get_plugin())
|
||||
return [extensions.ResourceExtension(
|
||||
Routes.get_alias(),
|
||||
controller)]
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from quantum.api import extensions
|
||||
from quantum.api.v2 import attributes
|
||||
from neutron.api import extensions
|
||||
from neutron.api.v2 import attributes
|
||||
|
||||
EXTENDED_ATTRIBUTES_2_0 = {
|
||||
'subnets': {
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
import datetime
|
||||
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import timeutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import timeutils
|
||||
from sqlalchemy import func as sql_func
|
||||
from sqlalchemy import orm, or_
|
||||
|
||||
@@ -26,7 +26,7 @@ from quark import network_strategy
|
||||
|
||||
|
||||
STRATEGY = network_strategy.STRATEGY
|
||||
LOG = logging.getLogger("quantum.quark.db.api")
|
||||
LOG = logging.getLogger("neutron.quark.db.api")
|
||||
|
||||
ONE = "one"
|
||||
ALL = "all"
|
||||
|
||||
@@ -22,16 +22,16 @@ from sqlalchemy.ext import associationproxy
|
||||
from sqlalchemy.ext import declarative
|
||||
from sqlalchemy.ext import hybrid
|
||||
|
||||
import quantum.db.model_base
|
||||
from quantum.db import models_v2 as models
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import timeutils
|
||||
import neutron.db.model_base
|
||||
from neutron.db import models_v2 as models
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import timeutils
|
||||
|
||||
from quark.db import custom_types
|
||||
|
||||
HasId = models.HasId
|
||||
|
||||
LOG = logging.getLogger("quantum.quark.db.models")
|
||||
LOG = logging.getLogger("neutron.quark.db.models")
|
||||
|
||||
|
||||
def _default_list_getset(collection_class, proxy):
|
||||
@@ -49,7 +49,7 @@ def _default_list_getset(collection_class, proxy):
|
||||
return getter, setter
|
||||
|
||||
|
||||
class QuarkBase(quantum.db.model_base.QuantumBaseV2):
|
||||
class QuarkBase(neutron.db.model_base.NeutronBaseV2):
|
||||
created_at = sa.Column(sa.DateTime(), default=timeutils.utcnow)
|
||||
__table_args__ = {"mysql_engine": "InnoDB"}
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
#
|
||||
|
||||
from quantum.openstack.common import log as logging
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger("quantum.quark.base")
|
||||
LOG = logging.getLogger("neutron.quark.base")
|
||||
|
||||
|
||||
class BaseDriver(object):
|
||||
|
||||
@@ -20,14 +20,14 @@ NVP client driver for Quark
|
||||
from oslo.config import cfg
|
||||
|
||||
import aiclib
|
||||
from quantum.extensions import securitygroup as sg_ext
|
||||
from quantum.openstack.common import log as logging
|
||||
from neutron.extensions import securitygroup as sg_ext
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
from quark.drivers import base
|
||||
from quark import exceptions
|
||||
|
||||
|
||||
LOG = logging.getLogger("quantum.quark.nvplib")
|
||||
LOG = logging.getLogger("neutron.quark.nvplib")
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
@@ -123,8 +123,8 @@ class NVPDriver(base.BaseDriver):
|
||||
nvp_group_ids = self._get_security_groups_for_port(context,
|
||||
security_groups)
|
||||
port.security_profiles(nvp_group_ids)
|
||||
tags = [dict(tag=network_id, scope="quantum_net_id"),
|
||||
dict(tag=port_id, scope="quantum_port_id"),
|
||||
tags = [dict(tag=network_id, scope="neutron_net_id"),
|
||||
dict(tag=port_id, scope="neutron_port_id"),
|
||||
dict(tag=tenant_id, scope="os_tid")]
|
||||
LOG.debug("Creating port on switch %s" % lswitch)
|
||||
port.tags(tags)
|
||||
@@ -186,7 +186,7 @@ class NVPDriver(base.BaseDriver):
|
||||
profile.port_egress_rules(egress_rules)
|
||||
if ingress_rules:
|
||||
profile.port_ingress_rules(ingress_rules)
|
||||
tags = [dict(tag=group_id, scope="quantum_group_id"),
|
||||
tags = [dict(tag=group_id, scope="neutron_group_id"),
|
||||
dict(tag=tenant_id, scope="os_tid")]
|
||||
LOG.debug("Creating security profile %s" % group_name)
|
||||
profile.tags(tags)
|
||||
@@ -337,7 +337,7 @@ class NVPDriver(base.BaseDriver):
|
||||
tags = tags or []
|
||||
tags.append({"tag": tenant_id, "scope": "os_tid"})
|
||||
if network_id:
|
||||
tags.append({"tag": network_id, "scope": "quantum_net_id"})
|
||||
tags.append({"tag": network_id, "scope": "neutron_net_id"})
|
||||
switch.tags(tags)
|
||||
LOG.debug("Creating lswitch for network %s" % network_id)
|
||||
|
||||
@@ -353,7 +353,7 @@ class NVPDriver(base.BaseDriver):
|
||||
def _lswitches_for_network(self, context, network_id):
|
||||
connection = self.get_connection()
|
||||
query = connection.lswitch().query()
|
||||
query.tagscopes(['os_tid', 'quantum_net_id'])
|
||||
query.tagscopes(['os_tid', 'neutron_net_id'])
|
||||
query.tags([context.tenant_id, network_id])
|
||||
return query
|
||||
|
||||
@@ -372,7 +372,7 @@ class NVPDriver(base.BaseDriver):
|
||||
def _get_security_group(self, context, group_id):
|
||||
connection = self.get_connection()
|
||||
query = connection.securityprofile().query()
|
||||
query.tagscopes(['os_tid', 'quantum_group_id'])
|
||||
query.tagscopes(['os_tid', 'neutron_group_id'])
|
||||
query.tags([context.tenant_id, group_id])
|
||||
query = query.results()
|
||||
if query['result_count'] != 1:
|
||||
|
||||
@@ -18,12 +18,12 @@ Optimized NVP client for Quark
|
||||
"""
|
||||
import sqlalchemy as sa
|
||||
|
||||
from neutron.openstack.common import log as logging
|
||||
from nvp_driver import NVPDriver
|
||||
from quantum.openstack.common import log as logging
|
||||
from quark.db import models
|
||||
from sqlalchemy import orm
|
||||
|
||||
LOG = logging.getLogger("quantum.quark.nvplib")
|
||||
LOG = logging.getLogger("neutron.quark.nvplib")
|
||||
|
||||
|
||||
class OptimizedNVPDriver(NVPDriver):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from quantum.common import exceptions
|
||||
from neutron.common import exceptions
|
||||
|
||||
|
||||
class InvalidMacAddressRange(exceptions.QuantumException):
|
||||
class InvalidMacAddressRange(exceptions.NeutronException):
|
||||
message = _("Invalid MAC address range %(cidr)s.")
|
||||
|
||||
|
||||
@@ -17,41 +17,41 @@ class RouteNotFound(exceptions.NotFound):
|
||||
message = _("Route %(route_id)s not found.")
|
||||
|
||||
|
||||
class AmbiguousNetworkId(exceptions.QuantumException):
|
||||
class AmbiguousNetworkId(exceptions.NeutronException):
|
||||
message = _("Segment ID required for network %(net_id)s.")
|
||||
|
||||
|
||||
class AmbigiousLswitchCount(exceptions.QuantumException):
|
||||
class AmbigiousLswitchCount(exceptions.NeutronException):
|
||||
message = _("Too many lswitches for network %(net_id)s.")
|
||||
|
||||
|
||||
class IpAddressNotFound(exceptions.QuantumException):
|
||||
class IpAddressNotFound(exceptions.NeutronException):
|
||||
message = _("IP Address %(addr_id)s not found.")
|
||||
|
||||
|
||||
class RouteConflict(exceptions.QuantumException):
|
||||
class RouteConflict(exceptions.NeutronException):
|
||||
message = _("Route overlaps existing route %(route_id)s with %(cidr)s")
|
||||
|
||||
|
||||
class InvalidPhysicalNetworkType(exceptions.QuantumException):
|
||||
class InvalidPhysicalNetworkType(exceptions.NeutronException):
|
||||
message = _("Providernet type %(net_type)s is invalid")
|
||||
|
||||
|
||||
class SegmentIdUnsupported(exceptions.QuantumException):
|
||||
class SegmentIdUnsupported(exceptions.NeutronException):
|
||||
message = _("Segmentation ID is unsupported for network type %(net_type)s")
|
||||
|
||||
|
||||
class SegmentIdRequired(exceptions.QuantumException):
|
||||
class SegmentIdRequired(exceptions.NeutronException):
|
||||
message = _("Segmentation ID is required for network type %(net_type)s")
|
||||
|
||||
|
||||
class PhysicalNetworkNotFound(exceptions.QuantumException):
|
||||
class PhysicalNetworkNotFound(exceptions.NeutronException):
|
||||
message = _("Physical network %(phys_net)s not found!")
|
||||
|
||||
|
||||
class ProvidernetParamError(exceptions.QuantumException):
|
||||
class ProvidernetParamError(exceptions.NeutronException):
|
||||
message = _("%(msg)s")
|
||||
|
||||
|
||||
class BadNVPState(exceptions.QuantumException):
|
||||
class BadNVPState(exceptions.NeutronException):
|
||||
message = _("No networking information found for network %(net_id)s")
|
||||
|
||||
@@ -19,14 +19,14 @@ Quark Pluggable IPAM
|
||||
|
||||
import netaddr
|
||||
|
||||
from quantum.common import exceptions
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import timeutils
|
||||
from neutron.common import exceptions
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import timeutils
|
||||
|
||||
from quark.db import api as db_api
|
||||
|
||||
|
||||
LOG = logging.getLogger("quantum")
|
||||
LOG = logging.getLogger("neutron")
|
||||
|
||||
|
||||
class QuarkIpam(object):
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import json
|
||||
|
||||
from neutron.common import exceptions
|
||||
from neutron.openstack.common import log as logging
|
||||
from oslo.config import cfg
|
||||
from quantum.common import exceptions
|
||||
from quantum.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger("quantum.quark")
|
||||
LOG = logging.getLogger("neutron.quark")
|
||||
CONF = cfg.CONF
|
||||
|
||||
quark_opts = [
|
||||
|
||||
122
quark/plugin.py
122
quark/plugin.py
@@ -14,7 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
"""
|
||||
v2 Quantum Plug-in API Quark Implementation
|
||||
v2 Neutron Plug-in API Quark Implementation
|
||||
"""
|
||||
import inspect
|
||||
|
||||
@@ -25,18 +25,18 @@ from sqlalchemy.orm import sessionmaker, scoped_session
|
||||
from sqlalchemy import event
|
||||
from zope import sqlalchemy as zsa
|
||||
|
||||
from quantum.api.v2 import attributes
|
||||
from quantum.common import config as quantum_cfg
|
||||
from quantum.common import exceptions
|
||||
from quantum.db import api as quantum_db_api
|
||||
from quantum.extensions import providernet as pnet
|
||||
from quantum.extensions import securitygroup as sg_ext
|
||||
from quantum.openstack.common.db.sqlalchemy import session as quantum_session
|
||||
from quantum.openstack.common import importutils
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import uuidutils
|
||||
from neutron.api.v2 import attributes
|
||||
from neutron.common import config as neutron_cfg
|
||||
from neutron.common import exceptions
|
||||
from neutron.db import api as neutron_db_api
|
||||
from neutron.extensions import providernet as pnet
|
||||
from neutron.extensions import securitygroup as sg_ext
|
||||
from neutron.openstack.common.db.sqlalchemy import session as neutron_session
|
||||
from neutron.openstack.common import importutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import uuidutils
|
||||
|
||||
from quantum import quantum_plugin_base_v2
|
||||
from neutron import neutron_plugin_base_v2
|
||||
|
||||
from quark.api import extensions
|
||||
from quark.db import api as db_api
|
||||
@@ -45,7 +45,7 @@ from quark import exceptions as quark_exceptions
|
||||
from quark import network_strategy
|
||||
from quark import plugin_views as v
|
||||
|
||||
LOG = logging.getLogger("quantum.quark")
|
||||
LOG = logging.getLogger("neutron.quark")
|
||||
CONF = cfg.CONF
|
||||
DEFAULT_ROUTE = netaddr.IPNetwork("0.0.0.0/0")
|
||||
|
||||
@@ -62,7 +62,7 @@ quark_opts = [
|
||||
cfg.StrOpt("strategy_driver",
|
||||
default='quark.network_strategy.JSONStrategy',
|
||||
help=_("Tree of network assignment strategy")),
|
||||
cfg.StrOpt('net_driver_cfg', default='/etc/quantum/quark.ini',
|
||||
cfg.StrOpt('net_driver_cfg', default='/etc/neutron/quark.ini',
|
||||
help=_("Path to the config for the net driver"))
|
||||
]
|
||||
|
||||
@@ -88,7 +88,7 @@ def append_quark_extensions(conf):
|
||||
append_quark_extensions(CONF)
|
||||
|
||||
|
||||
class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
class Plugin(neutron_plugin_base_v2.NeutronPluginBaseV2,
|
||||
sg_ext.SecurityGroupPluginBase):
|
||||
supported_extension_aliases = ["mac_address_ranges", "routes",
|
||||
"ip_addresses", "ports_quark",
|
||||
@@ -97,9 +97,9 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
|
||||
def _initDBMaker(self):
|
||||
# This needs to be called after _ENGINE is configured
|
||||
session_maker = sessionmaker(bind=quantum_session._ENGINE,
|
||||
session_maker = sessionmaker(bind=neutron_session._ENGINE,
|
||||
extension=zsa.ZopeTransactionExtension())
|
||||
quantum_session._MAKER = scoped_session(session_maker)
|
||||
neutron_session._MAKER = scoped_session(session_maker)
|
||||
|
||||
def __init__(self):
|
||||
|
||||
@@ -117,13 +117,13 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
if models.HasId in klass.mro():
|
||||
event.listen(klass, "init", _perhaps_generate_id)
|
||||
|
||||
quantum_db_api.configure_db()
|
||||
neutron_db_api.configure_db()
|
||||
self._initDBMaker()
|
||||
self.net_driver = (importutils.import_class(CONF.QUARK.net_driver))()
|
||||
self.net_driver.load_config(CONF.QUARK.net_driver_cfg)
|
||||
self.ipam_driver = (importutils.import_class(CONF.QUARK.ipam_driver))()
|
||||
self.ipam_reuse_after = CONF.QUARK.ipam_reuse_after
|
||||
quantum_db_api.register_models(base=models.BASEV2)
|
||||
neutron_db_api.register_models(base=models.BASEV2)
|
||||
|
||||
def _make_security_group_list(self, context, group_ids):
|
||||
if not group_ids or group_ids is attributes.ATTR_NOT_SPECIFIED:
|
||||
@@ -177,7 +177,7 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
CIDR if overlapping IPs are disabled.
|
||||
|
||||
"""
|
||||
if quantum_cfg.cfg.CONF.allow_overlapping_ips:
|
||||
if neutron_cfg.cfg.CONF.allow_overlapping_ips:
|
||||
return
|
||||
|
||||
new_subnet_ipset = netaddr.IPSet([new_subnet_cidr])
|
||||
@@ -207,10 +207,10 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
Create a subnet which represents a range of IP addresses
|
||||
that can be allocated to devices
|
||||
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param subnet: dictionary describing the subnet, with keys
|
||||
as listed in the RESOURCE_ATTRIBUTE_MAP object in
|
||||
quantum/api/v2/attributes.py. All keys will be populated.
|
||||
neutron/api/v2/attributes.py. All keys will be populated.
|
||||
"""
|
||||
LOG.info("create_subnet for tenant %s" % context.tenant_id)
|
||||
net_id = subnet["subnet"]["network_id"]
|
||||
@@ -254,12 +254,12 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
def update_subnet(self, context, id, subnet):
|
||||
"""Update values of a subnet.
|
||||
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param id: UUID representing the subnet to update.
|
||||
: param subnet: dictionary with keys indicating fields to update.
|
||||
valid keys are those that have a value of True for 'allow_put'
|
||||
as listed in the RESOURCE_ATTRIBUTE_MAP object in
|
||||
quantum/api/v2/attributes.py.
|
||||
neutron/api/v2/attributes.py.
|
||||
"""
|
||||
LOG.info("update_subnet %s for tenant %s" %
|
||||
(id, context.tenant_id))
|
||||
@@ -318,11 +318,11 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
def get_subnet(self, context, id, fields=None):
|
||||
"""Retrieve a subnet.
|
||||
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param id: UUID representing the subnet to fetch.
|
||||
: param fields: a list of strings that are valid keys in a
|
||||
subnet dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
|
||||
object in quantum/api/v2/attributes.py. Only these fields
|
||||
object in neutron/api/v2/attributes.py. Only these fields
|
||||
will be returned.
|
||||
"""
|
||||
LOG.info("get_subnet %s for tenant %s with fields %s" %
|
||||
@@ -344,17 +344,17 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
The contents of the list depends on the identity of the user
|
||||
making the request (as indicated by the context) as well as any
|
||||
filters.
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param filters: a dictionary with keys that are valid keys for
|
||||
a subnet as listed in the RESOURCE_ATTRIBUTE_MAP object
|
||||
in quantum/api/v2/attributes.py. Values in this dictiontary
|
||||
in neutron/api/v2/attributes.py. Values in this dictiontary
|
||||
are an iterable containing values that will be used for an exact
|
||||
match comparison for that value. Each result returned by this
|
||||
function will have matched one of the values for each key in
|
||||
filters.
|
||||
: param fields: a list of strings that are valid keys in a
|
||||
subnet dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
|
||||
object in quantum/api/v2/attributes.py. Only these fields
|
||||
object in neutron/api/v2/attributes.py. Only these fields
|
||||
will be returned.
|
||||
"""
|
||||
LOG.info("get_subnets for tenant %s with filters %s fields %s" %
|
||||
@@ -368,10 +368,10 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
|
||||
The result depends on the identity of the user making the request
|
||||
(as indicated by the context) as well as any filters.
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param filters: a dictionary with keys that are valid keys for
|
||||
a network as listed in the RESOURCE_ATTRIBUTE_MAP object
|
||||
in quantum/api/v2/attributes.py. Values in this dictiontary
|
||||
in neutron/api/v2/attributes.py. Values in this dictiontary
|
||||
are an iterable containing values that will be used for an exact
|
||||
match comparison for that value. Each result returned by this
|
||||
function will have matched one of the values for each key in
|
||||
@@ -392,7 +392,7 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
def delete_subnet(self, context, id):
|
||||
"""Delete a subnet.
|
||||
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param id: UUID representing the subnet to delete.
|
||||
"""
|
||||
LOG.info("delete_subnet %s for tenant %s" % (id, context.tenant_id))
|
||||
@@ -415,10 +415,10 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
|
||||
Create a network which represents an L2 network segment which
|
||||
can have a set of subnets and ports associated with it.
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param network: dictionary describing the network, with keys
|
||||
as listed in the RESOURCE_ATTRIBUTE_MAP object in
|
||||
quantum/api/v2/attributes.py. All keys will be populated.
|
||||
neutron/api/v2/attributes.py. All keys will be populated.
|
||||
"""
|
||||
LOG.info("create_network for tenant %s" % context.tenant_id)
|
||||
|
||||
@@ -464,12 +464,12 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
def update_network(self, context, id, network):
|
||||
"""Update values of a network.
|
||||
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param id: UUID representing the network to update.
|
||||
: param network: dictionary with keys indicating fields to update.
|
||||
valid keys are those that have a value of True for 'allow_put'
|
||||
as listed in the RESOURCE_ATTRIBUTE_MAP object in
|
||||
quantum/api/v2/attributes.py.
|
||||
neutron/api/v2/attributes.py.
|
||||
"""
|
||||
LOG.info("update_network %s for tenant %s" %
|
||||
(id, context.tenant_id))
|
||||
@@ -483,11 +483,11 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
def get_network(self, context, id, fields=None):
|
||||
"""Retrieve a network.
|
||||
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param id: UUID representing the network to fetch.
|
||||
: param fields: a list of strings that are valid keys in a
|
||||
network dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
|
||||
object in quantum/api/v2/attributes.py. Only these fields
|
||||
object in neutron/api/v2/attributes.py. Only these fields
|
||||
will be returned.
|
||||
"""
|
||||
LOG.info("get_network %s for tenant %s fields %s" %
|
||||
@@ -505,17 +505,17 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
The contents of the list depends on the identity of the user
|
||||
making the request (as indicated by the context) as well as any
|
||||
filters.
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param filters: a dictionary with keys that are valid keys for
|
||||
a network as listed in the RESOURCE_ATTRIBUTE_MAP object
|
||||
in quantum/api/v2/attributes.py. Values in this dictiontary
|
||||
in neutron/api/v2/attributes.py. Values in this dictiontary
|
||||
are an iterable containing values that will be used for an exact
|
||||
match comparison for that value. Each result returned by this
|
||||
function will have matched one of the values for each key in
|
||||
filters.
|
||||
: param fields: a list of strings that are valid keys in a
|
||||
network dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
|
||||
object in quantum/api/v2/attributes.py. Only these fields
|
||||
object in neutron/api/v2/attributes.py. Only these fields
|
||||
will be returned.
|
||||
"""
|
||||
LOG.info("get_networks for tenant %s with filters %s, fields %s" %
|
||||
@@ -528,10 +528,10 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
|
||||
The result depends on the identity of the user making the request
|
||||
(as indicated by the context) as well as any filters.
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param filters: a dictionary with keys that are valid keys for
|
||||
a network as listed in the RESOURCE_ATTRIBUTE_MAP object
|
||||
in quantum/api/v2/attributes.py. Values in this dictiontary
|
||||
in neutron/api/v2/attributes.py. Values in this dictiontary
|
||||
are an iterable containing values that will be used for an exact
|
||||
match comparison for that value. Each result returned by this
|
||||
function will have matched one of the values for each key in
|
||||
@@ -547,7 +547,7 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
def delete_network(self, context, id):
|
||||
"""Delete a network.
|
||||
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param id: UUID representing the network to delete.
|
||||
"""
|
||||
LOG.info("delete_network %s for tenant %s" % (id, context.tenant_id))
|
||||
@@ -565,11 +565,11 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
"""Create a port
|
||||
|
||||
Create a port which is a connection point of a device (e.g., a VM
|
||||
NIC) to attach to a L2 Quantum network.
|
||||
: param context: quantum api request context
|
||||
NIC) to attach to a L2 Neutron network.
|
||||
: param context: neutron api request context
|
||||
: param port: dictionary describing the port, with keys
|
||||
as listed in the RESOURCE_ATTRIBUTE_MAP object in
|
||||
quantum/api/v2/attributes.py. All keys will be populated.
|
||||
neutron/api/v2/attributes.py. All keys will be populated.
|
||||
"""
|
||||
LOG.info("create_port for tenant %s" % context.tenant_id)
|
||||
|
||||
@@ -633,12 +633,12 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
def update_port(self, context, id, port):
|
||||
"""Update values of a port.
|
||||
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param id: UUID representing the port to update.
|
||||
: param port: dictionary with keys indicating fields to update.
|
||||
valid keys are those that have a value of True for 'allow_put'
|
||||
as listed in the RESOURCE_ATTRIBUTE_MAP object in
|
||||
quantum/api/v2/attributes.py.
|
||||
neutron/api/v2/attributes.py.
|
||||
"""
|
||||
LOG.info("update_port %s for tenant %s" % (id, context.tenant_id))
|
||||
port_db = db_api.port_find(context, id=id, scope=db_api.ONE)
|
||||
@@ -743,11 +743,11 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
def get_port(self, context, id, fields=None):
|
||||
"""Retrieve a port.
|
||||
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param id: UUID representing the port to fetch.
|
||||
: param fields: a list of strings that are valid keys in a
|
||||
port dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
|
||||
object in quantum/api/v2/attributes.py. Only these fields
|
||||
object in neutron/api/v2/attributes.py. Only these fields
|
||||
will be returned.
|
||||
"""
|
||||
LOG.info("get_port %s for tenant %s fields %s" %
|
||||
@@ -766,17 +766,17 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
The contents of the list depends on the identity of the user
|
||||
making the request (as indicated by the context) as well as any
|
||||
filters.
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param filters: a dictionary with keys that are valid keys for
|
||||
a port as listed in the RESOURCE_ATTRIBUTE_MAP object
|
||||
in quantum/api/v2/attributes.py. Values in this dictiontary
|
||||
in neutron/api/v2/attributes.py. Values in this dictiontary
|
||||
are an iterable containing values that will be used for an exact
|
||||
match comparison for that value. Each result returned by this
|
||||
function will have matched one of the values for each key in
|
||||
filters.
|
||||
: param fields: a list of strings that are valid keys in a
|
||||
port dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
|
||||
object in quantum/api/v2/attributes.py. Only these fields
|
||||
object in neutron/api/v2/attributes.py. Only these fields
|
||||
will be returned.
|
||||
"""
|
||||
LOG.info("get_ports for tenant %s filters %s fields %s" %
|
||||
@@ -791,10 +791,10 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
|
||||
The result depends on the identity of the user making the request
|
||||
(as indicated by the context) as well as any filters.
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param filters: a dictionary with keys that are valid keys for
|
||||
a network as listed in the RESOURCE_ATTRIBUTE_MAP object
|
||||
in quantum/api/v2/attributes.py. Values in this dictiontary
|
||||
in neutron/api/v2/attributes.py. Values in this dictiontary
|
||||
are an iterable containing values that will be used for an exact
|
||||
match comparison for that value. Each result returned by this
|
||||
function will have matched one of the values for each key in
|
||||
@@ -810,7 +810,7 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
def delete_port(self, context, id):
|
||||
"""Delete a port.
|
||||
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param id: UUID representing the port to delete.
|
||||
"""
|
||||
LOG.info("delete_port %s for tenant %s" %
|
||||
@@ -832,7 +832,7 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
def disassociate_port(self, context, id, ip_address_id):
|
||||
"""Disassociates a port from an IP address.
|
||||
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param id: UUID representing the port to disassociate.
|
||||
: param ip_address_id: UUID representing the IP address to
|
||||
disassociate.
|
||||
@@ -857,11 +857,11 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
def get_mac_address_range(self, context, id, fields=None):
|
||||
"""Retrieve a mac_address_range.
|
||||
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param id: UUID representing the network to fetch.
|
||||
: param fields: a list of strings that are valid keys in a
|
||||
network dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
|
||||
object in quantum/api/v2/attributes.py. Only these fields
|
||||
object in neutron/api/v2/attributes.py. Only these fields
|
||||
will be returned.
|
||||
"""
|
||||
LOG.info("get_mac_address_range %s for tenant %s fields %s" %
|
||||
@@ -924,7 +924,7 @@ class Plugin(quantum_plugin_base_v2.QuantumPluginBaseV2,
|
||||
def delete_mac_address_range(self, context, id):
|
||||
"""Delete a mac_address_range.
|
||||
|
||||
: param context: quantum api request context
|
||||
: param context: neutron api request context
|
||||
: param id: UUID representing the mac_address_range to delete.
|
||||
"""
|
||||
LOG.info("delete_mac_address_range %s for tenant %s" %
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
import unittest2
|
||||
|
||||
from quantum import context
|
||||
from neutron import context
|
||||
|
||||
|
||||
class TestBase(unittest2.TestCase):
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from neutron.db import api as neutron_db_api
|
||||
from oslo.config import cfg
|
||||
from quantum.db import api as quantum_db_api
|
||||
|
||||
from quark.db import api as db_api
|
||||
|
||||
@@ -29,7 +29,7 @@ class TestDBAPI(test_base.TestBase):
|
||||
super(TestDBAPI, self).setUp()
|
||||
|
||||
cfg.CONF.set_override('connection', 'sqlite://', 'database')
|
||||
quantum_db_api.configure_db()
|
||||
neutron_db_api.configure_db()
|
||||
configure_mappers()
|
||||
|
||||
def test_port_find_ip_address_id(self):
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
|
||||
import contextlib
|
||||
import mock
|
||||
from neutron.common import exceptions
|
||||
from neutron.db import api as neutron_db_api
|
||||
from neutron.openstack.common.db.sqlalchemy import session as neutron_session
|
||||
from oslo.config import cfg
|
||||
from quantum.common import exceptions
|
||||
from quantum.db import api as quantum_db_api
|
||||
from quantum.openstack.common.db.sqlalchemy import session as quantum_session
|
||||
|
||||
from quark.db import models
|
||||
import quark.ipam
|
||||
@@ -31,12 +31,12 @@ class QuarkIpamBaseTest(test_base.TestBase):
|
||||
super(QuarkIpamBaseTest, self).setUp()
|
||||
|
||||
cfg.CONF.set_override('connection', 'sqlite://', 'database')
|
||||
quantum_db_api.configure_db()
|
||||
models.BASEV2.metadata.create_all(quantum_session._ENGINE)
|
||||
neutron_db_api.configure_db()
|
||||
models.BASEV2.metadata.create_all(neutron_session._ENGINE)
|
||||
self.ipam = quark.ipam.QuarkIpam()
|
||||
|
||||
def tearDown(self):
|
||||
quantum_db_api.clear_db()
|
||||
neutron_db_api.clear_db()
|
||||
|
||||
|
||||
class QuarkMacAddressAllocateDeallocated(QuarkIpamBaseTest):
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
import contextlib
|
||||
import mock
|
||||
|
||||
from neutron.db import api as db_api
|
||||
import neutron.extensions.securitygroup as sg_ext
|
||||
from neutron.openstack.common.db.sqlalchemy import session as neutron_session
|
||||
from oslo.config import cfg
|
||||
from quantum.db import api as db_api
|
||||
import quantum.extensions.securitygroup as sg_ext
|
||||
from quantum.openstack.common.db.sqlalchemy import session as quantum_session
|
||||
|
||||
from quark.db import models
|
||||
import quark.drivers.nvp_driver
|
||||
@@ -39,7 +39,7 @@ class TestNVPDriver(test_base.TestBase):
|
||||
cfg.CONF.set_override('max_rules_per_port', 1, 'NVP')
|
||||
self.driver.max_ports_per_switch = 0
|
||||
db_api.configure_db()
|
||||
models.BASEV2.metadata.create_all(quantum_session._ENGINE)
|
||||
models.BASEV2.metadata.create_all(neutron_session._ENGINE)
|
||||
|
||||
self.lswitch_uuid = "12345678-1234-1234-1234-123456781234"
|
||||
self.context.tenant_id = "tid"
|
||||
@@ -591,7 +591,7 @@ class TestNVPDriverCreateSecurityGroup(TestNVPDriver):
|
||||
mock.call.display_name('foo'),
|
||||
mock.call.port_egress_rules(egress_rules),
|
||||
mock.call.port_ingress_rules(ingress_rules),
|
||||
mock.call.tags([{'scope': 'quantum_group_id', 'tag': 1},
|
||||
mock.call.tags([{'scope': 'neutron_group_id', 'tag': 1},
|
||||
{'scope': 'os_tid',
|
||||
'tag': self.context.tenant_id}]),
|
||||
], any_order=True)
|
||||
@@ -626,7 +626,7 @@ class TestNVPDriverDeleteSecurityGroup(TestNVPDriver):
|
||||
with self._stubs() as connection:
|
||||
self.driver.delete_security_group(self.context, 1)
|
||||
connection.securityprofile().query().assert_has_calls([
|
||||
mock.call.tagscopes(['os_tid', 'quantum_group_id']),
|
||||
mock.call.tagscopes(['os_tid', 'neutron_group_id']),
|
||||
mock.call.tags([self.context.tenant_id, 1]),
|
||||
], any_order=True)
|
||||
connection.securityprofile.assert_any_call(self.profile_id)
|
||||
|
||||
@@ -19,11 +19,11 @@ import contextlib
|
||||
import copy
|
||||
import mock
|
||||
import netaddr
|
||||
from neutron.api.v2 import attributes as neutron_attrs
|
||||
from neutron.common import exceptions
|
||||
from neutron.db import api as db_api
|
||||
from neutron.extensions import securitygroup as sg_ext
|
||||
from oslo.config import cfg
|
||||
from quantum.api.v2 import attributes as quantum_attrs
|
||||
from quantum.common import exceptions
|
||||
from quantum.db import api as db_api
|
||||
from quantum.extensions import securitygroup as sg_ext
|
||||
|
||||
from quark.db import api as quark_db_api
|
||||
from quark.db import models
|
||||
@@ -179,8 +179,8 @@ class TestQuarkCreateSubnetOverlapping(TestQuarkPlugin):
|
||||
cfg.CONF.set_override('allow_overlapping_ips', True)
|
||||
with self._stubs() as subnet_create:
|
||||
s = dict(subnet=dict(
|
||||
gateway_ip=quantum_attrs.ATTR_NOT_SPECIFIED,
|
||||
dns_nameservers=quantum_attrs.ATTR_NOT_SPECIFIED,
|
||||
gateway_ip=neutron_attrs.ATTR_NOT_SPECIFIED,
|
||||
dns_nameservers=neutron_attrs.ATTR_NOT_SPECIFIED,
|
||||
cidr="192.168.1.1/8",
|
||||
network_id=1))
|
||||
self.plugin.create_subnet(self.context, s)
|
||||
@@ -190,8 +190,8 @@ class TestQuarkCreateSubnetOverlapping(TestQuarkPlugin):
|
||||
cfg.CONF.set_override('allow_overlapping_ips', False)
|
||||
with self._stubs() as subnet_create:
|
||||
s = dict(subnet=dict(
|
||||
gateway_ip=quantum_attrs.ATTR_NOT_SPECIFIED,
|
||||
dns_nameservers=quantum_attrs.ATTR_NOT_SPECIFIED,
|
||||
gateway_ip=neutron_attrs.ATTR_NOT_SPECIFIED,
|
||||
dns_nameservers=neutron_attrs.ATTR_NOT_SPECIFIED,
|
||||
cidr="192.168.1.1/8",
|
||||
network_id=1))
|
||||
self.plugin.create_subnet(self.context, s)
|
||||
@@ -242,8 +242,8 @@ class TestQuarkCreateSubnet(TestQuarkPlugin):
|
||||
tenant_id=self.context.tenant_id, ip_version=4,
|
||||
cidr="172.16.0.0/24", gateway_ip="0.0.0.0",
|
||||
allocation_pools=[],
|
||||
dns_nameservers=quantum_attrs.ATTR_NOT_SPECIFIED,
|
||||
host_routes=quantum_attrs.ATTR_NOT_SPECIFIED,
|
||||
dns_nameservers=neutron_attrs.ATTR_NOT_SPECIFIED,
|
||||
host_routes=neutron_attrs.ATTR_NOT_SPECIFIED,
|
||||
enable_dhcp=None))
|
||||
network = dict(network_id=1)
|
||||
with self._stubs(
|
||||
@@ -280,9 +280,9 @@ class TestQuarkCreateSubnet(TestQuarkPlugin):
|
||||
subnet=dict(network_id=1,
|
||||
tenant_id=self.context.tenant_id, ip_version=4,
|
||||
cidr="172.16.0.0/24",
|
||||
gateway_ip=quantum_attrs.ATTR_NOT_SPECIFIED,
|
||||
allocation_pools=[],
|
||||
dns_nameservers=quantum_attrs.ATTR_NOT_SPECIFIED,
|
||||
gateway_ip=neutron_attrs.ATTR_NOT_SPECIFIED,
|
||||
dns_nameservers=neutron_attrs.ATTR_NOT_SPECIFIED,
|
||||
enable_dhcp=None))
|
||||
network = dict(network_id=1)
|
||||
with self._stubs(
|
||||
@@ -345,7 +345,7 @@ class TestQuarkCreateSubnet(TestQuarkPlugin):
|
||||
tenant_id=self.context.tenant_id, ip_version=4,
|
||||
cidr="172.16.0.0/24", gateway_ip="0.0.0.0",
|
||||
allocation_pools=[],
|
||||
dns_nameservers=quantum_attrs.ATTR_NOT_SPECIFIED,
|
||||
dns_nameservers=neutron_attrs.ATTR_NOT_SPECIFIED,
|
||||
host_routes=[{"destination": "1.1.1.1/8",
|
||||
"nexthop": "172.16.0.4"}],
|
||||
enable_dhcp=None))
|
||||
@@ -378,9 +378,9 @@ class TestQuarkCreateSubnet(TestQuarkPlugin):
|
||||
subnet=dict(network_id=1,
|
||||
tenant_id=self.context.tenant_id, ip_version=4,
|
||||
cidr="172.16.0.0/24",
|
||||
gateway_ip=quantum_attrs.ATTR_NOT_SPECIFIED,
|
||||
allocation_pools=[],
|
||||
dns_nameservers=quantum_attrs.ATTR_NOT_SPECIFIED,
|
||||
gateway_ip=neutron_attrs.ATTR_NOT_SPECIFIED,
|
||||
dns_nameservers=neutron_attrs.ATTR_NOT_SPECIFIED,
|
||||
host_routes=[{"destination": "0.0.0.0/0",
|
||||
"nexthop": "172.16.0.4"}],
|
||||
enable_dhcp=None))
|
||||
@@ -420,7 +420,7 @@ class TestQuarkCreateSubnet(TestQuarkPlugin):
|
||||
cidr="172.16.0.0/24",
|
||||
gateway_ip="172.16.0.3",
|
||||
allocation_pools=[],
|
||||
dns_nameservers=quantum_attrs.ATTR_NOT_SPECIFIED,
|
||||
dns_nameservers=neutron_attrs.ATTR_NOT_SPECIFIED,
|
||||
host_routes=[{"destination": "0.0.0.0/0",
|
||||
"nexthop": "172.16.0.4"}],
|
||||
enable_dhcp=None))
|
||||
@@ -1166,7 +1166,7 @@ class TestQuarkCreatePort(TestQuarkPlugin):
|
||||
'device_id': 2}
|
||||
with self._stubs(port=port["port"], network=network, addr=ip,
|
||||
mac=mac) as port_create:
|
||||
port["port"]["mac_address"] = quantum_attrs.ATTR_NOT_SPECIFIED
|
||||
port["port"]["mac_address"] = neutron_attrs.ATTR_NOT_SPECIFIED
|
||||
result = self.plugin.create_port(self.context, port)
|
||||
self.assertTrue(port_create.called)
|
||||
for key in expected.keys():
|
||||
|
||||
@@ -3,10 +3,10 @@ alembic
|
||||
http://tarballs.openstack.org/oslo.config/oslo.config-1.2.0a2.tar.gz#egg=oslo.config-1.2.0a2
|
||||
zope.sqlalchemy
|
||||
mysql-python
|
||||
http://tarballs.openstack.org/quantum/quantum-master.tar.gz#egg=quantum
|
||||
http://tarballs.openstack.org/neutron/neutron-master.tar.gz#egg=neutron
|
||||
aiclib
|
||||
|
||||
# NOTE(jkoelker) not technically required, but something has to commit
|
||||
# the transactions. in the future this should be the
|
||||
# quantum wsgi service
|
||||
# neutron wsgi service
|
||||
repoze.tm2
|
||||
|
||||
Reference in New Issue
Block a user