[OVO] Switch to use own registry
Neutron will now use own registry for versionedobjects. It avoids problems with loading wrong OVO objects from different projects (like os_vif) when names are the same. Change-Id: I9d4fab591fbe52271c613251321a6d03078976f7 Closes-Bug: #1731948
This commit is contained in:
parent
dd06df8f04
commit
5e08a9b0e7
@ -12,7 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db.models import address_scope as models
|
||||
@ -20,7 +19,7 @@ from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class AddressScope(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -13,7 +13,6 @@
|
||||
# under the License.
|
||||
|
||||
from neutron_lib import constants as const
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
from sqlalchemy import func
|
||||
|
||||
@ -27,7 +26,7 @@ from neutron.objects import common_types
|
||||
from neutron.objects import utils as obj_utils
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class Agent(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -13,7 +13,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.objects import base
|
||||
@ -21,7 +20,7 @@ from neutron.objects import common_types
|
||||
from neutron.services.auto_allocate import models
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class AutoAllocatedTopology(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -20,8 +20,11 @@ from neutron_lib import exceptions as n_exc
|
||||
from neutron_lib.objects import exceptions as o_exc
|
||||
from oslo_db import exception as obj_exc
|
||||
from oslo_db.sqlalchemy import utils as db_utils
|
||||
from oslo_log import log as logging
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import versionutils
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import exception as obj_exception
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
import six
|
||||
|
||||
@ -31,6 +34,9 @@ from neutron.db import standard_attr
|
||||
from neutron.objects.db import api as obj_db_api
|
||||
from neutron.objects.extensions import standardattributes
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
_NO_DB_MODEL = object()
|
||||
|
||||
|
||||
@ -43,7 +49,7 @@ def get_updatable_fields(cls, fields):
|
||||
|
||||
|
||||
def get_object_class_by_model(model):
|
||||
for obj_class in obj_base.VersionedObjectRegistry.obj_classes().values():
|
||||
for obj_class in NeutronObjectRegistry.obj_classes().values():
|
||||
obj_class = obj_class[0]
|
||||
if getattr(obj_class, 'db_model', _NO_DB_MODEL) is model:
|
||||
return obj_class
|
||||
@ -93,6 +99,34 @@ class Pager(object):
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
|
||||
class NeutronObjectRegistry(obj_base.VersionedObjectRegistry):
|
||||
|
||||
_registry = None
|
||||
|
||||
def __new__(cls, *args, **kwargs):
|
||||
# TODO(slaweq): this should be moved back to oslo.versionedobjects
|
||||
# lib as soon as bug https://bugs.launchpad.net/neutron/+bug/1731948
|
||||
# will be fixed and OVO's registry class will support defining custom
|
||||
# registries for objects.
|
||||
|
||||
# NOTE(slaweq): it is overridden method
|
||||
# oslo_versionedobjects.base.VersionedObjectRegistry.__new__
|
||||
# We need to overwrite it to use separate registry for Neutron's
|
||||
# objects.
|
||||
# This is necessary to avoid clash in naming objects between Neutron
|
||||
# and e.g. os-vif (for example Route or Subnet objects are used in
|
||||
# both)
|
||||
if not NeutronObjectRegistry._registry:
|
||||
NeutronObjectRegistry._registry = object.__new__(
|
||||
NeutronObjectRegistry, *args, **kwargs)
|
||||
NeutronObjectRegistry._registry._obj_classes = \
|
||||
collections.defaultdict(list)
|
||||
self = object.__new__(cls, *args, **kwargs)
|
||||
self._obj_classes = (
|
||||
NeutronObjectRegistry._registry._obj_classes)
|
||||
return self
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class NeutronObject(obj_base.VersionedObject,
|
||||
obj_base.VersionedObjectDictCompat,
|
||||
@ -143,6 +177,45 @@ class NeutronObject(obj_base.VersionedObject,
|
||||
return (isinstance(cls.fields[field], obj_fields.ListOfObjectsField) or
|
||||
isinstance(cls.fields[field], obj_fields.ObjectField))
|
||||
|
||||
@classmethod
|
||||
def obj_class_from_name(cls, objname, objver):
|
||||
"""Returns a class from the registry based on a name and version."""
|
||||
# NOTE(slaweq): it is override method
|
||||
# oslo_versionedobjects.base.VersionedObject.obj_class_from_name
|
||||
# We need to override it to use Neutron's objects registry class
|
||||
# (NeutronObjectRegistry) instead of original VersionedObjectRegistry
|
||||
# class from oslo_versionedobjects
|
||||
# This is necessary to avoid clash in naming objects between Neutron
|
||||
# and e.g. os-vif (for example Route or Subnet objects are used in
|
||||
# both)
|
||||
if objname not in NeutronObjectRegistry.obj_classes():
|
||||
LOG.error('Unable to instantiate unregistered object type '
|
||||
'%(objtype)s', dict(objtype=objname))
|
||||
raise obj_exception.UnsupportedObjectError(objtype=objname)
|
||||
|
||||
# NOTE(comstud): If there's not an exact match, return the highest
|
||||
# compatible version. The objects stored in the class are sorted
|
||||
# such that highest version is first, so only set compatible_match
|
||||
# once below.
|
||||
compatible_match = None
|
||||
|
||||
for objclass in NeutronObjectRegistry.obj_classes()[objname]:
|
||||
if objclass.VERSION == objver:
|
||||
return objclass
|
||||
if (not compatible_match and
|
||||
versionutils.is_compatible(objver, objclass.VERSION)):
|
||||
compatible_match = objclass
|
||||
|
||||
if compatible_match:
|
||||
return compatible_match
|
||||
|
||||
# As mentioned above, latest version is always first in the list.
|
||||
latest_ver = (
|
||||
NeutronObjectRegistry.obj_classes()[objname][0].VERSION)
|
||||
raise obj_exception.IncompatibleObjectVersion(objname=objname,
|
||||
objver=objver,
|
||||
supported=latest_ver)
|
||||
|
||||
@classmethod
|
||||
def clean_obj_from_primitive(cls, primitive, context=None):
|
||||
obj = cls.obj_from_primitive(primitive, context)
|
||||
@ -581,7 +654,7 @@ class NeutronDbObject(NeutronObject):
|
||||
# subclasses=True
|
||||
for field in self.synthetic_fields:
|
||||
try:
|
||||
objclasses = obj_base.VersionedObjectRegistry.obj_classes(
|
||||
objclasses = NeutronObjectRegistry.obj_classes(
|
||||
).get(self.fields[field].objname)
|
||||
except AttributeError:
|
||||
# NOTE(rossella_s) this is probably because this field is not
|
||||
|
@ -13,7 +13,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db.models import flavor as models
|
||||
@ -21,7 +20,7 @@ from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class FlavorServiceProfileBinding(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -36,7 +35,7 @@ class FlavorServiceProfileBinding(base.NeutronDbObject):
|
||||
}
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class ServiceProfile(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -66,7 +65,7 @@ class ServiceProfile(base.NeutronDbObject):
|
||||
self.obj_reset_changes(['flavor_ids'])
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class Flavor(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -12,14 +12,13 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
|
||||
from neutron.db.models import dns as models
|
||||
from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class FloatingIPDNS(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -14,7 +14,6 @@
|
||||
# under the License.
|
||||
|
||||
import netaddr
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.ipam.drivers.neutrondb_ipam import db_models
|
||||
@ -22,7 +21,7 @@ from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class IpamAllocationPool(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -59,7 +58,7 @@ class IpamAllocationPool(base.NeutronDbObject):
|
||||
return result
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class IpamAllocation(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -89,7 +88,7 @@ class IpamAllocation(base.NeutronDbObject):
|
||||
return result
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class IpamSubnet(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -12,7 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.common import constants
|
||||
@ -22,7 +21,7 @@ from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class L3HARouterAgentPortBinding(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -53,7 +52,7 @@ class L3HARouterAgentPortBinding(base.NeutronDbObject):
|
||||
return query.all()
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class L3HARouterNetwork(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -68,7 +67,7 @@ class L3HARouterNetwork(base.NeutronDbObject):
|
||||
primary_keys = ['network_id', 'project_id']
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class L3HARouterVRIdAllocation(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -10,7 +10,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.orm import joinedload
|
||||
@ -24,7 +23,7 @@ from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class RouterL3AgentBinding(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -13,7 +13,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db.models import loggingapi as log_db
|
||||
@ -23,7 +22,7 @@ from neutron.objects.logapi import event_types
|
||||
from neutron.services.logapi.common import constants as log_const
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class Log(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -12,7 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.common import utils
|
||||
@ -21,7 +20,7 @@ from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class MeteringLabelRule(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -57,7 +56,7 @@ class MeteringLabelRule(base.NeutronDbObject):
|
||||
return result
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class MeteringLabel(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
from neutron_lib.api.definitions import availability_zone as az_def
|
||||
from neutron_lib.api.validators import availability_zone as az_validator
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db import api as db_api
|
||||
@ -33,7 +32,7 @@ from neutron.objects.qos import binding
|
||||
from neutron.objects import rbac_db
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class NetworkDhcpAgentBinding(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -57,7 +56,7 @@ class NetworkDhcpAgentBinding(base.NeutronDbObject):
|
||||
return cls.get_objects(context, dhcp_agent_id=dhcp_agent_ids)
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class NetworkSegment(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -145,7 +144,7 @@ class NetworkSegment(base.NeutronDbObject):
|
||||
**kwargs)
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class NetworkPortSecurity(base_ps._PortSecurity):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = "1.0"
|
||||
@ -155,7 +154,7 @@ class NetworkPortSecurity(base_ps._PortSecurity):
|
||||
fields_need_translation = {'id': 'network_id'}
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class ExternalNetwork(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -172,7 +171,7 @@ class ExternalNetwork(base.NeutronDbObject):
|
||||
}
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class Network(rbac_db.NeutronRbacObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -306,7 +305,7 @@ class Network(rbac_db.NeutronRbacObject):
|
||||
return set()
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class SegmentHostMapping(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -321,7 +320,7 @@ class SegmentHostMapping(base.NeutronDbObject):
|
||||
primary_keys = ['segment_id', 'host']
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class NetworkDNSDomain(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -11,14 +11,13 @@
|
||||
# under the License.
|
||||
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db.models.plugins.ml2 import flatallocation
|
||||
from neutron.objects import base
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class FlatAllocation(base.NeutronDbObject):
|
||||
# Version 1.0: Initial Version
|
||||
VERSION = '1.0'
|
||||
|
@ -12,7 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db.models.plugins.ml2 import geneveallocation
|
||||
@ -20,7 +19,7 @@ from neutron.objects import base
|
||||
from neutron.objects.plugins.ml2 import base as ml2_base
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class GeneveAllocation(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -35,7 +34,7 @@ class GeneveAllocation(base.NeutronDbObject):
|
||||
}
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class GeneveEndpoint(ml2_base.EndpointBase):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -12,7 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db.models.plugins.ml2 import gre_allocation_endpoints as gre_model
|
||||
@ -20,7 +19,7 @@ from neutron.objects import base
|
||||
from neutron.objects.plugins.ml2 import base as ml2_base
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class GreAllocation(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -35,7 +34,7 @@ class GreAllocation(base.NeutronDbObject):
|
||||
}
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class GreEndpoint(ml2_base.EndpointBase):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -12,7 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db.models.plugins.ml2 import vlanallocation as vlan_alloc_model
|
||||
@ -20,7 +19,7 @@ from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class VlanAllocation(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -12,7 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db.models.plugins.ml2 import vxlanallocation as vxlan_model
|
||||
@ -21,7 +20,7 @@ from neutron.objects import common_types
|
||||
from neutron.objects.plugins.ml2 import base as ml2_base
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class VxlanAllocation(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -36,7 +35,7 @@ class VxlanAllocation(base.NeutronDbObject):
|
||||
}
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class VxlanEndpoint(ml2_base.EndpointBase):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -10,7 +10,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
|
||||
from neutron.common import utils
|
||||
from neutron.db.models import allowed_address_pair as models
|
||||
@ -18,7 +17,7 @@ from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class AllowedAddressPair(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -12,7 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db.models import data_plane_status as db_models
|
||||
@ -20,7 +19,7 @@ from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class PortDataPlaneStatus(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = "1.0"
|
||||
|
@ -10,7 +10,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db.extra_dhcp_opt import models
|
||||
@ -18,7 +17,7 @@ from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class ExtraDhcpOpt(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -10,13 +10,13 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
|
||||
from neutron.db.port_security import models
|
||||
from neutron.objects import base
|
||||
from neutron.objects.extensions import port_security as base_ps
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class PortSecurity(base_ps._PortSecurity):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = "1.0"
|
||||
|
@ -15,7 +15,6 @@
|
||||
import netaddr
|
||||
from neutron_lib import constants
|
||||
from oslo_utils import versionutils
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.common import utils
|
||||
@ -61,7 +60,7 @@ class PortBindingBase(base.NeutronDbObject):
|
||||
return fields
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class PortBinding(PortBindingBase):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -82,7 +81,7 @@ class PortBinding(PortBindingBase):
|
||||
primary_keys = ['port_id', 'host']
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class DistributedPortBinding(PortBindingBase):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -106,7 +105,7 @@ class DistributedPortBinding(PortBindingBase):
|
||||
primary_keys = ['host', 'port_id']
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class PortBindingLevel(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -143,7 +142,7 @@ class PortBindingLevel(base.NeutronDbObject):
|
||||
context, _pager, validate_filters, **kwargs)
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class IPAllocation(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -205,7 +204,7 @@ class IPAllocation(base.NeutronDbObject):
|
||||
return True
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class PortDNS(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
# Version 1.1: Add dns_domain attribute
|
||||
@ -235,7 +234,7 @@ class PortDNS(base.NeutronDbObject):
|
||||
primitive.pop('dns_domain', None)
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class Port(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
# Version 1.1: Add data_plane_status field
|
||||
|
@ -10,14 +10,13 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db.models import provisioning_block as pb_model
|
||||
from neutron.objects import base
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class ProvisioningBlock(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -13,14 +13,13 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
|
||||
from neutron.db.qos import models as qos_db_model
|
||||
from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class QosPolicyPortBinding(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -36,7 +35,7 @@ class QosPolicyPortBinding(base.NeutronDbObject):
|
||||
fields_no_update = ['policy_id', 'port_id']
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class QosPolicyNetworkBinding(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -18,7 +18,6 @@ import itertools
|
||||
from neutron_lib import constants as n_const
|
||||
from oslo_db import exception as db_exc
|
||||
from oslo_utils import versionutils
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import exception
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
@ -35,7 +34,7 @@ from neutron.objects.qos import rule as rule_obj_impl
|
||||
from neutron.objects import rbac_db
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base_db.NeutronObjectRegistry.register
|
||||
class QosPolicy(rbac_db.NeutronRbacObject):
|
||||
# Version 1.0: Initial version
|
||||
# Version 1.1: QosDscpMarkingRule introduced
|
||||
@ -346,7 +345,7 @@ class QosPolicy(rbac_db.NeutronRbacObject):
|
||||
primitive.pop('is_default', None)
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base_db.NeutronObjectRegistry.register
|
||||
class QosPolicyDefault(base_db.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -20,7 +20,6 @@ from neutron_lib import constants
|
||||
from neutron_lib.services.qos import constants as qos_consts
|
||||
from neutron_lib.utils import helpers
|
||||
from oslo_utils import versionutils
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import exception
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
import six
|
||||
@ -100,7 +99,7 @@ class QosRule(base.NeutronDbObject):
|
||||
and is_network_policy_only))
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class QosBandwidthLimitRule(QosRule):
|
||||
|
||||
db_model = qos_db_model.QosBandwidthLimitRule
|
||||
@ -124,7 +123,7 @@ class QosBandwidthLimitRule(QosRule):
|
||||
objtype="QosBandwidthLimitRule")
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class QosDscpMarkingRule(QosRule):
|
||||
|
||||
db_model = qos_db_model.QosDscpMarkingRule
|
||||
@ -143,7 +142,7 @@ class QosDscpMarkingRule(QosRule):
|
||||
objname="QosDscpMarkingRule")
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class QosMinimumBandwidthRule(QosRule):
|
||||
|
||||
db_model = qos_db_model.QosMinimumBandwidthRule
|
||||
|
@ -15,7 +15,6 @@ from neutron_lib.plugins import directory
|
||||
from neutron_lib.services.qos import constants as qos_consts
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import versionutils
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.objects import base
|
||||
@ -32,7 +31,7 @@ class RuleTypeField(obj_fields.BaseEnumField):
|
||||
super(RuleTypeField, self).__init__(**kwargs)
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class QosRuleType(base.NeutronObject):
|
||||
# Version 1.0: Initial version
|
||||
# Version 1.1: Added QosDscpMarkingRule
|
||||
@ -79,7 +78,7 @@ class QosRuleType(base.NeutronObject):
|
||||
primitive.pop('drivers', None)
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class QosRuleTypeDriver(base.NeutronObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -12,7 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy import sql
|
||||
@ -23,7 +22,7 @@ from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class ResourceDelta(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -41,7 +40,7 @@ class ResourceDelta(base.NeutronDbObject):
|
||||
}
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class Reservation(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -108,7 +107,7 @@ class Reservation(base.NeutronDbObject):
|
||||
for (resource, exp, total_reserved) in resv_query)
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class Quota(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -123,7 +122,7 @@ class Quota(base.NeutronDbObject):
|
||||
}
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class QuotaUsage(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -14,7 +14,6 @@ import netaddr
|
||||
|
||||
from neutron_lib.api.definitions import availability_zone as az_def
|
||||
from neutron_lib.api.validators import availability_zone as az_validator
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
from sqlalchemy import func
|
||||
|
||||
@ -29,7 +28,7 @@ from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class RouterRoute(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -65,7 +64,7 @@ class RouterRoute(base.NeutronDbObject):
|
||||
return result
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class RouterExtraAttributes(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -124,7 +123,7 @@ class RouterExtraAttributes(base.NeutronDbObject):
|
||||
return [(router, agent_count) for router, agent_count in query]
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class RouterPort(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -155,7 +154,7 @@ class RouterPort(base.NeutronDbObject):
|
||||
return [r[0] for r in query]
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class DVRMacAddress(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -186,7 +185,7 @@ class DVRMacAddress(base.NeutronDbObject):
|
||||
return result
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class FloatingIP(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -10,7 +10,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.common import utils
|
||||
@ -20,7 +19,7 @@ from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class SecurityGroup(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -65,7 +64,7 @@ class SecurityGroup(base.NeutronDbObject):
|
||||
self.obj_reset_changes(['is_default'])
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class DefaultSecurityGroup(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -82,7 +81,7 @@ class DefaultSecurityGroup(base.NeutronDbObject):
|
||||
primary_keys = ['project_id']
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class SecurityGroupRule(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -13,7 +13,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db.models import servicetype as models
|
||||
@ -21,7 +20,7 @@ from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class ProviderResourceAssociation(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
import netaddr
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.common import utils
|
||||
@ -24,7 +23,7 @@ from neutron.objects import common_types
|
||||
from neutron.objects import rbac_db
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class DNSNameServer(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -56,7 +55,7 @@ class DNSNameServer(base.NeutronDbObject):
|
||||
**kwargs)
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class Route(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -95,7 +94,7 @@ class Route(base.NeutronDbObject):
|
||||
return result
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class IPAllocationPool(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -139,7 +138,7 @@ class IPAllocationPool(base.NeutronDbObject):
|
||||
return result
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class SubnetServiceType(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -163,7 +162,7 @@ class SubnetServiceType(base.NeutronDbObject):
|
||||
# - added 'shared' to synthetic_fields
|
||||
# - registered extra_filter_name for 'shared' attribute
|
||||
# - added loading shared attribute based on network 'rbac_entries'
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class Subnet(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -14,7 +14,6 @@
|
||||
# under the License.
|
||||
|
||||
import netaddr
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db import api as db_api
|
||||
@ -23,7 +22,7 @@ from neutron.objects import base
|
||||
from neutron.objects import common_types
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class SubnetPool(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -86,7 +85,7 @@ class SubnetPool(base.NeutronDbObject):
|
||||
self._attach_prefixes(fields['prefixes'])
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class SubnetPoolPrefix(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -10,14 +10,13 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db.models import tag as tag_model
|
||||
from neutron.objects import base
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class Tag(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
@ -17,7 +17,6 @@ from neutron_lib import exceptions as n_exc
|
||||
from neutron_lib.objects import exceptions as o_exc
|
||||
from oslo_db import exception as o_db_exc
|
||||
from oslo_utils import versionutils
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
from neutron.db import api as db_api
|
||||
@ -27,7 +26,7 @@ from neutron.services.trunk import exceptions as t_exc
|
||||
from neutron.services.trunk import models
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class SubPort(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
@ -82,7 +81,7 @@ class SubPort(base.NeutronDbObject):
|
||||
trunk_id=self.trunk_id)
|
||||
|
||||
|
||||
@obj_base.VersionedObjectRegistry.register
|
||||
@base.NeutronObjectRegistry.register
|
||||
class Trunk(base.NeutronDbObject):
|
||||
# Version 1.0: Initial version
|
||||
# Version 1.1: Changed tenant_id to project_id
|
||||
|
@ -17,7 +17,6 @@ import mock
|
||||
from neutron_lib import context
|
||||
from oslo_utils import uuidutils
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
from oslo_versionedobjects import fixture
|
||||
import testtools
|
||||
|
||||
from neutron.api.rpc.callbacks import resources
|
||||
@ -27,6 +26,7 @@ from neutron.common import topics
|
||||
from neutron.objects import base as objects_base
|
||||
from neutron.objects import common_types
|
||||
from neutron.tests import base
|
||||
from neutron.tests.unit.objects import test_base as objects_test_base
|
||||
|
||||
|
||||
TEST_EVENT = 'test_event'
|
||||
@ -76,7 +76,7 @@ class ResourcesRpcBaseTestCase(base.BaseTestCase):
|
||||
super(ResourcesRpcBaseTestCase, self).setUp()
|
||||
|
||||
self.obj_registry = self.useFixture(
|
||||
fixture.VersionedObjectRegistryFixture())
|
||||
objects_test_base.NeutronObjectRegistryFixture())
|
||||
|
||||
self.context = context.get_admin_context()
|
||||
mock.patch.object(resources_rpc.resources,
|
||||
|
@ -13,7 +13,6 @@
|
||||
# under the License.
|
||||
|
||||
from neutron_lib.db import model_base
|
||||
from oslo_versionedobjects import base as obj_base
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
import sqlalchemy as sa
|
||||
|
||||
@ -33,7 +32,7 @@ class FakeDbModelWithStandardAttributes(
|
||||
tag_support = False
|
||||