From 19f84d1ef77497294a00d6e0ca2f4224c9653268 Mon Sep 17 00:00:00 2001 From: dongwenjuan Date: Mon, 13 Nov 2017 14:21:04 +0800 Subject: [PATCH] fix the exception of nova_notifier log The LOG alaways raises the exception 'Failed to services.force_down - id: AttributeError: id' when we print the 'response' of force_down API. Change-Id: I45083de7e3125396767fbc00528fa4bbcb10dcd0 Signed-off-by: dongwenjuan --- vitrage/notifier/plugins/nova/nova_notifier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vitrage/notifier/plugins/nova/nova_notifier.py b/vitrage/notifier/plugins/nova/nova_notifier.py index 411fc4a13..230efe18d 100644 --- a/vitrage/notifier/plugins/nova/nova_notifier.py +++ b/vitrage/notifier/plugins/nova/nova_notifier.py @@ -45,6 +45,6 @@ class NovaNotifier(NotifierBase): str(host_id), str(is_down)) response = self.client.services.force_down( host_id, 'nova-compute', is_down) - LOG.info('RESPONSE %s', str(response)) + LOG.info('RESPONSE %s', str(response.to_dict())) except Exception as e: LOG.exception('Failed to services.force_down - %s', e)