From b37eab5ec52beb1df74ff2bd19c54a40d2e6bde6 Mon Sep 17 00:00:00 2001 From: Olivier Bourdon Date: Fri, 21 Oct 2016 15:50:21 +0200 Subject: [PATCH] Fix Zabbix system test suite for enabling use of MOS 7, 8 and 9.x Fix typo in parameter name Remove useless metadata/enabled: True option as it is set implicitely by the helpers.py activate_plugin method Change-Id: Ib2ab783fe91dfa943199127adc22dbf027b7adb3 --- stacklight_tests/zabbix/api.py | 9 ++++----- stacklight_tests/zabbix/test_system.py | 8 +++----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/stacklight_tests/zabbix/api.py b/stacklight_tests/zabbix/api.py index 3df9e35..54ec626 100644 --- a/stacklight_tests/zabbix/api.py +++ b/stacklight_tests/zabbix/api.py @@ -11,6 +11,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. + import bs4 import requests import urllib @@ -20,12 +21,10 @@ from devops.helpers import helpers as devops_helpers from fuelweb_test import logger from proboscis import asserts from pyzabbix import ZabbixAPI - +from stacklight_tests import base_test from stacklight_tests.helpers import checkers from stacklight_tests.helpers import helpers from stacklight_tests.helpers import remote_ops - -from stacklight_tests import base_test from stacklight_tests.zabbix import plugin_settings as zabbix_plugin_settings @@ -84,9 +83,9 @@ class ZabbixApi(base_test.PluginApi): def get_plugin_settings(self): return zabbix_plugin_settings - def prepare_plugin(self, dependat_plugins=False): + def prepare_plugin(self, dependant_plugins=False): self.helpers.prepare_plugin(self.settings.plugin_path) - if dependat_plugins: + if dependant_plugins: for plugin in self.settings.dependant_plugins: self.helpers.prepare_plugin( self.settings.dependant_plugins[plugin]["plugin_path"]) diff --git a/stacklight_tests/zabbix/test_system.py b/stacklight_tests/zabbix/test_system.py index b83c84f..eda4c50 100644 --- a/stacklight_tests/zabbix/test_system.py +++ b/stacklight_tests/zabbix/test_system.py @@ -89,7 +89,7 @@ class TestZabbixPluginSystem(api.ZabbixApi): """ self.env.revert_snapshot("ready_with_5_slaves") - self.prepare_plugin(dependat_plugins=True) + self.prepare_plugin(dependant_plugins=True) self.helpers.create_cluster(name=self.__class__.__name__) @@ -106,12 +106,10 @@ class TestZabbixPluginSystem(api.ZabbixApi): self.activate_dependant_plugin( self.settings.dependant_plugins[ "ZABBIX_MONITORING_EXTREME_NETWORKS"], - options={'metadata/enabled': True, - 'hosts/value': 'MyXNHost:{}'.format(extreme_host_ip)}) + options={'hosts/value': 'MyXNHost:{}'.format(extreme_host_ip)}) self.activate_dependant_plugin( self.settings.dependant_plugins["ZABBIX_MONITORING_EMC"], - options={'metadata/enabled': True, - 'hosts/value': 'MyEMCHost:{}'.format(emc_host_ip)}) + options={'hosts/value': 'MyEMCHost:{}'.format(emc_host_ip)}) self.helpers.deploy_cluster( {