# Path: neutron/db/models/segment.py
# class NetworkSegment(standard_attr.HasStandardAttributes,
#                      model_base.BASEV2, model_base.HasId):
# class SegmentHostMapping(model_base.BASEV2):
# 
# Path: neutron/objects/rbac.py
# class RBACBaseObject(base.NeutronDbObject, metaclass=abc.ABCMeta):
#     VERSION = '1.1'
#     def get_projects(cls, context, object_id=None, action=None,
#                      target_project=None):
#     def get_type_class_map(cls):
#     def obj_make_compatible(self, primitive, target_version):


from neutron_lib.api.definitions import availability_zone as az_def
from neutron_lib.api.validators import availability_zone as az_validator
from neutron_lib import constants
from neutron_lib.objects import common_types
from oslo_utils import versionutils
from oslo_versionedobjects import exception
from oslo_versionedobjects import fields as obj_fields
from neutron.db.models import dns as dns_models
from neutron.db.models import external_net as ext_net_model
from neutron.db.models import segment as segment_model
from neutron.db import models_v2
from neutron.db.network_dhcp_agent_binding import models as ndab_models
from neutron.db.port_security import models as ps_models
from neutron.db import rbac_db_models
from neutron.objects import agent as agent_obj
from neutron.objects import base
from neutron.objects.extensions import port_security as base_ps
from neutron.objects.qos import binding
from neutron.objects import rbac
from neutron.objects import rbac_db
            self.obj_reset_changes(['dns_domain'])

            # extract qos policy binding
            if db_obj.get('qos_policy_binding'):
                self.qos_policy_id = (
                    db_obj.qos_policy_binding.policy_id
                )
            else:
                self.qos_policy_id = None
            self.obj_reset_changes(['qos_policy_id'])

    @classmethod
    def get_bound_project_ids(cls, context, policy_id):
        # TODO(ihrachys): provide actual implementation
        return set()

    def obj_make_compatible(self, primitive, target_version):
        _target_version = versionutils.convert_version_to_tuple(target_version)
        if _target_version >= (1, 1):
            if primitive['mtu'] is None:
                # mtu will not be nullable after
                raise exception.IncompatibleObjectVersion(
                    objver=target_version, objname=self.__class__.__name__)


@base.NeutronObjectRegistry.register
class SegmentHostMapping(base.NeutronDbObject):
    # Version 1.0: Initial version
    VERSION = '1.0'


# Path: neutron/db/models/segment.py
# class NetworkSegment(standard_attr.HasStandardAttributes,
#                      model_base.BASEV2, model_base.HasId):
# class SegmentHostMapping(model_base.BASEV2):
# 
# Path: neutron/objects/rbac.py
# class RBACBaseObject(base.NeutronDbObject, metaclass=abc.ABCMeta):
#     VERSION = '1.1'
#     def get_projects(cls, context, object_id=None, action=None,
#                      target_project=None):
#     def get_type_class_map(cls):
#     def obj_make_compatible(self, primitive, target_version):


# Path: neutron/objects/network.py
from neutron_lib.api.definitions import availability_zone as az_def
from neutron_lib.api.validators import availability_zone as az_validator
from neutron_lib import constants
from neutron_lib.objects import common_types
from oslo_utils import versionutils
from oslo_versionedobjects import exception
from oslo_versionedobjects import fields as obj_fields
from neutron.db.models import dns as dns_models
from neutron.db.models import external_net as ext_net_model
from neutron.db.models import segment as segment_model
from neutron.db import models_v2
from neutron.db.network_dhcp_agent_binding import models as ndab_models
from neutron.db.port_security import models as ps_models
from neutron.db import rbac_db_models
from neutron.objects import agent as agent_obj
from neutron.objects import base
from neutron.objects.extensions import port_security as base_ps
from neutron.objects.qos import binding
from neutron.objects import rbac
from neutron.objects import rbac_db

            self.obj_reset_changes(['dns_domain'])

            # extract qos policy binding
            if db_obj.get('qos_policy_binding'):
                self.qos_policy_id = (
                    db_obj.qos_policy_binding.policy_id
                )
            else:
                self.qos_policy_id = None
            self.obj_reset_changes(['qos_policy_id'])

    @classmethod
    def get_bound_project_ids(cls, context, policy_id):
        # TODO(ihrachys): provide actual implementation
        return set()

    def obj_make_compatible(self, primitive, target_version):
        _target_version = versionutils.convert_version_to_tuple(target_version)
        if _target_version >= (1, 1):
            if primitive['mtu'] is None:
                # mtu will not be nullable after
                raise exception.IncompatibleObjectVersion(
                    objver=target_version, objname=self.__class__.__name__)


@base.NeutronObjectRegistry.register
class SegmentHostMapping(base.NeutronDbObject):
    # Version 1.0: Initial version
    VERSION = '1.0'


    db_model = segment_model.SegmentHostMapping