Merge "Remove confusing DB deprecation messages" into stable/ocata
This commit is contained in:
commit
9ae15b3b37
|
@ -21,7 +21,6 @@ SQLAlchemy models for Manila data.
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_db.sqlalchemy import models
|
from oslo_db.sqlalchemy import models
|
||||||
from oslo_log import log
|
|
||||||
from sqlalchemy import Column, Integer, String, schema
|
from sqlalchemy import Column, Integer, String, schema
|
||||||
from sqlalchemy.ext.declarative import declarative_base
|
from sqlalchemy.ext.declarative import declarative_base
|
||||||
from sqlalchemy import orm
|
from sqlalchemy import orm
|
||||||
|
@ -32,8 +31,6 @@ from manila.common import constants
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
BASE = declarative_base()
|
BASE = declarative_base()
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class ManilaBase(models.ModelBase,
|
class ManilaBase(models.ModelBase,
|
||||||
models.TimestampMixin,
|
models.TimestampMixin,
|
||||||
|
@ -226,15 +223,9 @@ class Share(BASE, ManilaBase):
|
||||||
return all_export_locations
|
return all_export_locations
|
||||||
|
|
||||||
def __getattr__(self, item):
|
def __getattr__(self, item):
|
||||||
deprecated_properties = ('host', 'share_server_id', 'share_network_id',
|
proxified_properties = ('status', 'host', 'share_server_id',
|
||||||
'availability_zone', 'share_type_id',
|
'share_network_id', 'availability_zone',
|
||||||
'share_type')
|
'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)
|
|
||||||
|
|
||||||
if item in proxified_properties:
|
if item in proxified_properties:
|
||||||
return getattr(self.instance, item, None)
|
return getattr(self.instance, item, None)
|
||||||
|
|
|
@ -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.
|
Loading…
Reference in New Issue