From ed9a697cd663249040ceb11a7d6cca7e36a12633 Mon Sep 17 00:00:00 2001 From: ZhiQiang Fan Date: Fri, 22 Apr 2016 12:18:34 +0800 Subject: [PATCH] add log decorator for neutron_client public method some methods don't have log decorator, which cause unnecessary exception message in log when resource not found. Change-Id: Id1490262c99af43d4a7116f360c5eafaa9b50780 --- ceilometer/neutron_client.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ceilometer/neutron_client.py b/ceilometer/neutron_client.py index 7eecb976..5299ef45 100644 --- a/ceilometer/neutron_client.py +++ b/ceilometer/neutron_client.py @@ -139,6 +139,7 @@ class Client(object): fips = self.client.list_floatingips()['floatingips'] return fips + @logged def list_pools_v2(self): """This method is used to get the pools list. @@ -175,6 +176,7 @@ class Client(object): return resources + @logged def list_members_v2(self): """Method is used to list the members info. @@ -199,6 +201,7 @@ class Client(object): resources.append(member) return resources + @logged def list_health_monitors_v2(self): """Method is used to list the health monitors @@ -386,6 +389,7 @@ class Client(object): return status_dict + @logged def list_listener(self): """This method is used to get the list of the listeners.""" resp = self.client.list_listeners() @@ -396,12 +400,14 @@ class Client(object): listener['operating_status'] = status[listener.get('id')] return resources + @logged def list_loadbalancer(self): """This method is used to get the list of the loadbalancers.""" resp = self.client.list_loadbalancers() resources = resp.get('loadbalancers') return resources + @logged def get_loadbalancer_stats(self, loadbalancer_id): """This method is used to get the statistics of the loadbalancer.