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