Replace deprecated LOG.warn with LOG.warning
LOG.warn is deprecated. It is still used in few modules. Replaced with non-deprecated LOG.warning. Change-Id: I0496a3618bbe2f53c06d96e1df725763cd39b032 Partial-Bug: #1508442
This commit is contained in:
parent
9fbacd2300
commit
f11fe2e82f
|
@ -52,8 +52,8 @@ class NotificationEndpoint(object):
|
|||
def warn(self, ctxt, publisher_id, event_type, payload, metadata):
|
||||
metadata = payload['metadata']
|
||||
if 'cluster' in metadata and metadata['cluster'] == self.cluster_id:
|
||||
LOG.warn("publisher=%s" % publisher_id)
|
||||
LOG.warn("event_type=%s" % event_type)
|
||||
LOG.warning("publisher=%s" % publisher_id)
|
||||
LOG.warning("event_type=%s" % event_type)
|
||||
|
||||
def debug(self, ctxt, publisher_id, event_type, payload, metadata):
|
||||
metadata = payload['metadata']
|
||||
|
@ -117,7 +117,7 @@ class HealthManager(service.Service):
|
|||
"""
|
||||
cluster = objects.Cluster.get(self.ctx, cluster_id)
|
||||
if not cluster:
|
||||
LOG.warn(_LW("Cluster (%s) is not found."), cluster_id)
|
||||
LOG.warning(_LW("Cluster (%s) is not found."), cluster_id)
|
||||
return
|
||||
|
||||
project = cluster.project
|
||||
|
@ -143,8 +143,10 @@ class HealthManager(service.Service):
|
|||
else:
|
||||
return None
|
||||
else:
|
||||
LOG.warn(_LW("Cluster (%(id)s) check type (%(type)s) is invalid."),
|
||||
{'id': entry['cluster_id'], 'type': entry['check_type']})
|
||||
LOG.warning(_LW("Cluster (%(id)s) check type (%(type)s) is "
|
||||
"invalid."),
|
||||
{'id': entry['cluster_id'],
|
||||
'type': entry['check_type']})
|
||||
return None
|
||||
|
||||
return entry
|
||||
|
|
|
@ -286,32 +286,32 @@ class Profile(object):
|
|||
|
||||
def do_update(self, obj, new_profile, **params):
|
||||
"""For subclass to override."""
|
||||
LOG.warn(_LW("Update operation not supported."))
|
||||
LOG.warning(_LW("Update operation not supported."))
|
||||
return True
|
||||
|
||||
def do_check(self, obj):
|
||||
"""For subclass to override."""
|
||||
LOG.warn(_LW("Check operation not supported."))
|
||||
LOG.warning(_LW("Check operation not supported."))
|
||||
return True
|
||||
|
||||
def do_get_details(self, obj):
|
||||
"""For subclass to override."""
|
||||
LOG.warn(_LW("Get_details operation not supported."))
|
||||
LOG.warning(_LW("Get_details operation not supported."))
|
||||
return {}
|
||||
|
||||
def do_join(self, obj, cluster_id):
|
||||
"""For subclass to override to perform extra operations."""
|
||||
LOG.warn(_LW("Join operation not specialized."))
|
||||
LOG.warning(_LW("Join operation not specialized."))
|
||||
return True
|
||||
|
||||
def do_leave(self, obj):
|
||||
"""For subclass to override to perform extra operations."""
|
||||
LOG.warn(_LW("Join operation not specialized."))
|
||||
LOG.warning(_LW("Join operation not specialized."))
|
||||
return True
|
||||
|
||||
def do_rebuild(self, obj):
|
||||
"""For subclass to override."""
|
||||
LOG.warn(_LW("Rebuild operation not specialized."))
|
||||
LOG.warning(_LW("Rebuild operation not specialized."))
|
||||
return True
|
||||
|
||||
def do_recover(self, obj, **options):
|
||||
|
|
Loading…
Reference in New Issue