Browse Source

Merge "Remove confusing DB deprecation messages" into stable/ocata

Zuul 9 months ago
parent
commit
9ae15b3b37

+ 3
- 12
manila/db/sqlalchemy/models.py View File

@@ -21,7 +21,6 @@ SQLAlchemy models for Manila data.
21 21
 
22 22
 from oslo_config import cfg
23 23
 from oslo_db.sqlalchemy import models
24
-from oslo_log import log
25 24
 from sqlalchemy import Column, Integer, String, schema
26 25
 from sqlalchemy.ext.declarative import declarative_base
27 26
 from sqlalchemy import orm
@@ -32,8 +31,6 @@ from manila.common import constants
32 31
 CONF = cfg.CONF
33 32
 BASE = declarative_base()
34 33
 
35
-LOG = log.getLogger(__name__)
36
-
37 34
 
38 35
 class ManilaBase(models.ModelBase,
39 36
                  models.TimestampMixin,
@@ -226,15 +223,9 @@ class Share(BASE, ManilaBase):
226 223
         return all_export_locations
227 224
 
228 225
     def __getattr__(self, item):
229
-        deprecated_properties = ('host', 'share_server_id', 'share_network_id',
230
-                                 'availability_zone', 'share_type_id',
231
-                                 'share_type')
232
-        proxified_properties = ('status',) + deprecated_properties
233
-
234
-        if item in deprecated_properties:
235
-            msg = ("Property '%s' is deprecated. Please use appropriate "
236
-                   "property from share instance." % item)
237
-            LOG.warning(msg)
226
+        proxified_properties = ('status', 'host', 'share_server_id',
227
+                                'share_network_id', 'availability_zone',
228
+                                'share_type_id', 'share_type')
238 229
 
239 230
         if item in proxified_properties:
240 231
             return getattr(self.instance, item, None)

+ 7
- 0
releasenotes/notes/remove-confusing-deprecation-warnings-a17c20d8973ef2bb.yaml View File

@@ -0,0 +1,7 @@
1
+---
2
+fixes:
3
+  - |
4
+    Removed confusing manila.db.sqlalchemy model messages indicating deprecated
5
+    properties for ``share_type``, ``host``, ``share_server_id``, ``share_network_id``,
6
+    ``available_zone``.  These are exposed in the API as properties of shares and
7
+    are not in fact actually deprecated as such.

Loading…
Cancel
Save