Code Review
/
yardstick.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Make Sample VNF hugepages size configurable"
[yardstick.git]
/
yardstick
/
network_services
/
nfvi
/
resource.py
diff --git
a/yardstick/network_services/nfvi/resource.py
b/yardstick/network_services/nfvi/resource.py
index
adf4d8a
..
dc5c46a
100644
(file)
--- 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 """
# 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 errno
-import jinja2
+from itertools import chain
+import logging
+import multiprocessing
import os
import os.path
import re
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
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)
return cls(node, plugins=plugins, interval=interval, timeout=timeout)
- def check_if_s
a
_running(self, process):
+ def check_if_s
ystem_agent
_running(self, process):
""" verify if system agent is running """
try:
err, pid, _ = self.connection.execute("pgrep -f %s" % 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
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
return 1, None
raise
@@
-327,7
+323,7
@@
class ResourceProfile(object):
self.amqp_client.terminate()
LOG.debug("Check if %s is running", agent)
self.amqp_client.terminate()
LOG.debug("Check if %s is running", agent)
- status, pid = self.check_if_s
a
_running(agent)
+ status, pid = self.check_if_s
ystem_agent
_running(agent)
LOG.debug("status %s pid %s", status, pid)
if status != 0:
return
LOG.debug("status %s pid %s", status, pid)
if status != 0:
return