diff --git a/manila/db/sqlalchemy/models.py b/manila/db/sqlalchemy/models.py index 47d26e98a7..16c71230c2 100644 --- a/manila/db/sqlalchemy/models.py +++ b/manila/db/sqlalchemy/models.py @@ -21,7 +21,6 @@ SQLAlchemy models for Manila data. from oslo_config import cfg from oslo_db.sqlalchemy import models -from oslo_log import log from sqlalchemy import Column, Integer, String, schema from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import orm @@ -32,8 +31,6 @@ from manila.common import constants CONF = cfg.CONF BASE = declarative_base() -LOG = log.getLogger(__name__) - class ManilaBase(models.ModelBase, models.TimestampMixin, @@ -236,15 +233,9 @@ class Share(BASE, ManilaBase): return all_export_locations def __getattr__(self, item): - deprecated_properties = ('host', 'share_server_id', 'share_network_id', - 'availability_zone', 'share_type_id', - 'share_type') - proxified_properties = ('status',) + deprecated_properties - - if item in deprecated_properties: - msg = ("Property '%s' is deprecated. Please use appropriate " - "property from share instance." % item) - LOG.warning(msg) + proxified_properties = ('status', 'host', 'share_server_id', + 'share_network_id', 'availability_zone', + 'share_type_id', 'share_type') if item in proxified_properties: return getattr(self.instance, item, None) diff --git a/releasenotes/notes/remove-confusing-deprecation-warnings-a17c20d8973ef2bb.yaml b/releasenotes/notes/remove-confusing-deprecation-warnings-a17c20d8973ef2bb.yaml new file mode 100644 index 0000000000..6633d21a20 --- /dev/null +++ b/releasenotes/notes/remove-confusing-deprecation-warnings-a17c20d8973ef2bb.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Removed confusing manila.db.sqlalchemy model messages indicating deprecated + properties for ``share_type``, ``host``, ``share_server_id``, ``share_network_id``, + ``available_zone``. These are exposed in the API as properties of shares and + are not in fact actually deprecated as such.