aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/nfvi
diff options
context:
space:
mode:
authorEmma Foley <emma.l.foley@intel.com>2017-11-21 16:56:42 +0000
committerEmma Foley <emma.l.foley@intel.com>2018-01-23 11:02:08 +0000
commit12aaf2fd5a8511570fa20d9a5ca3643113475f24 (patch)
treea0350b5518b1b4cc7a9b3f97823bf5e5be259400 /yardstick/network_services/nfvi
parent36f0563490a4ee8f5b30eb7fe51a62d3b55c5b32 (diff)
Rename ResourceProfile.check_if_sa_running()
* Update log message and rename method to make debugging easier * Fix pep8 violations in touched files JIRA: YARDSTICK-859 Change-Id: Id138d72cd8557ffacd5dcc81d06feeb484e13625 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
Diffstat (limited to 'yardstick/network_services/nfvi')
-rw-r--r--yardstick/network_services/nfvi/resource.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/yardstick/network_services/nfvi/resource.py b/yardstick/network_services/nfvi/resource.py
index adf4d8ae6..dc5c46a86 100644
--- a/yardstick/network_services/nfvi/resource.py
+++ b/yardstick/network_services/nfvi/resource.py
@@ -13,20 +13,16 @@
# limitations under the License.
""" Resource collection definitions """
-from __future__ import absolute_import
-from __future__ import print_function
-
-import logging
-from itertools import chain
-
import errno
-import jinja2
+from itertools import chain
+import logging
+import multiprocessing
import os
import os.path
import re
-import multiprocessing
-import pkg_resources
+import jinja2
+import pkg_resources
from oslo_config import cfg
from oslo_utils.encodeutils import safe_decode
@@ -92,7 +88,7 @@ class ResourceProfile(object):
return cls(node, plugins=plugins, interval=interval, timeout=timeout)
- def check_if_sa_running(self, process):
+ def check_if_system_agent_running(self, process):
""" verify if system agent is running """
try:
err, pid, _ = self.connection.execute("pgrep -f %s" % process)
@@ -101,7 +97,7 @@ class ResourceProfile(object):
except OSError as e:
if e.errno in {errno.ECONNRESET}:
# if we can't connect to check, then we won't be able to connect to stop it
- LOG.exception("can't connect to host to check collectd status")
+ LOG.exception("Can't connect to host to check %s status", process)
return 1, None
raise
@@ -327,7 +323,7 @@ class ResourceProfile(object):
self.amqp_client.terminate()
LOG.debug("Check if %s is running", agent)
- status, pid = self.check_if_sa_running(agent)
+ status, pid = self.check_if_system_agent_running(agent)
LOG.debug("status %s pid %s", status, pid)
if status != 0:
return