summaryrefslogtreecommitdiffstats
path: root/baro_tests
diff options
context:
space:
mode:
Diffstat (limited to 'baro_tests')
-rw-r--r--baro_tests/barometer.py4
-rw-r--r--baro_tests/collectd.py6
-rw-r--r--baro_tests/config_server.py21
3 files changed, 13 insertions, 18 deletions
diff --git a/baro_tests/barometer.py b/baro_tests/barometer.py
index e210f333..a798f245 100644
--- a/baro_tests/barometer.py
+++ b/baro_tests/barometer.py
@@ -10,10 +10,10 @@ import logging
from baro_tests import collectd
-import functest.core.feature as base
+from xtesting.core import feature
-class BarometerCollectd(base.Feature):
+class BarometerCollectd(feature.Feature):
'''
Class for executing barometercollectd testcase.
'''
diff --git a/baro_tests/collectd.py b/baro_tests/collectd.py
index 304b87b8..bf310f01 100644
--- a/baro_tests/collectd.py
+++ b/baro_tests/collectd.py
@@ -636,9 +636,9 @@ def mcelog_install():
centos_release = node.run_cmd('uname -r')
if '3.10.0-514.26.2.el7.x86_64' not in centos_release:
logger.info(
- 'Mcelog will not be enabled '
- + 'on node-{0}, '.format(node.get_dict()['name'])
- + 'unsupported CentOS release found ({1}).'.format(
+ 'Mcelog will not be enabled on node-{}, ' +
+ ' unsupported CentOS relase found ({}).'.format(
+ node.get_dict()['name'],
centos_release))
else:
logger.info(
diff --git a/baro_tests/config_server.py b/baro_tests/config_server.py
index f35f7882..6c67ee6a 100644
--- a/baro_tests/config_server.py
+++ b/baro_tests/config_server.py
@@ -14,12 +14,15 @@
"""Classes used by collectd.py"""
-import paramiko
import time
import os.path
import os
import re
+
from opnfv.deployment import factory
+import paramiko
+from functest.utils import constants
+
ID_RSA_PATH = '/root/.ssh/id_rsa'
SSH_KEYS_SCRIPT = '/home/opnfv/barometer/baro_utils/get_ssh_keys.sh'
DEF_PLUGIN_INTERVAL = 10
@@ -263,9 +266,7 @@ class ConfigServer(object):
nodes = get_apex_nodes()
for node in nodes:
if controller_name == node.get_dict()['name']:
- node.put_file(
- '/home/opnfv/functest/conf/openstack.creds',
- 'overcloudrc.v3')
+ node.put_file(constants.ENV_FILE, 'overcloudrc.v3')
stdout = node.run_cmd(
"source overcloudrc.v3;"
+ "openstack catalog list | grep gnocchi")
@@ -286,9 +287,7 @@ class ConfigServer(object):
nodes = get_apex_nodes()
for node in nodes:
if controller_name == node.get_dict()['name']:
- node.put_file(
- '/home/opnfv/functest/conf/openstack.creds',
- 'overcloudrc.v3')
+ node.put_file(constants.ENV_FILE, 'overcloudrc.v3')
stdout = node.run_cmd(
"source overcloudrc.v3;"
+ "openstack catalog list | grep aodh")
@@ -481,9 +480,7 @@ class ConfigServer(object):
if node.is_controller():
self.__logger.info('Getting AODH Alarm list on {}' .format(
(node.get_dict()['name'])))
- node.put_file(
- '/home/opnfv/functest/conf/openstack.creds',
- 'overcloudrc.v3')
+ node.put_file(constants.ENV_FILE, 'overcloudrc.v3')
stdout = node.run_cmd(
"source overcloudrc.v3;"
+ "aodh alarm list | grep {0} | grep {1}"
@@ -540,9 +537,7 @@ class ConfigServer(object):
if node.is_controller():
self.__logger.info('Getting gnocchi metric list on {}' .format(
(node.get_dict()['name'])))
- node.put_file(
- '/home/opnfv/functest/conf/openstack.creds',
- 'overcloudrc.v3')
+ node.put_file(constants.ENV_FILE, 'overcloudrc.v3')
stdout = node.run_cmd(
"source overcloudrc.v3;"
+ "gnocchi metric list | grep {0} | grep {1}"