'For backwards-compatibility with dict-based objects.
NOTE(danms): May be removed in the future.'

def get(self, key, value=base._NotSpecifiedSentinel):

    if (key not in self.obj_fields):
        LOG.debug('Cinder    object    %(object_name)s    has    no    attribute    named:    %(attribute_name)s', {'object_name': self.__class__.__name__, 'attribute_name': key})
        return None
    if ((value != base._NotSpecifiedSentinel) and (key not in self.obj_extra_fields) and (not self.obj_attr_is_set(key))):
        return value
    else:
        try:
            return getattr(self, key)
        except (exception.ObjectActionError, NotImplementedError):
            return None
