Merge "Fix Zabbix system test suite for enabling use of MOS 7, 8 and 9.x"

This commit is contained in:
Jenkins 2017-04-11 07:58:19 +00:00 committed by Gerrit Code Review
commit 023ef225c6
2 changed files with 7 additions and 10 deletions

View File

@ -11,6 +11,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import bs4 import bs4
import requests import requests
import urllib import urllib
@ -20,12 +21,10 @@ from devops.helpers import helpers as devops_helpers
from fuelweb_test import logger from fuelweb_test import logger
from proboscis import asserts from proboscis import asserts
from pyzabbix import ZabbixAPI from pyzabbix import ZabbixAPI
from stacklight_tests import base_test
from stacklight_tests.helpers import checkers from stacklight_tests.helpers import checkers
from stacklight_tests.helpers import helpers from stacklight_tests.helpers import helpers
from stacklight_tests.helpers import remote_ops from stacklight_tests.helpers import remote_ops
from stacklight_tests import base_test
from stacklight_tests.zabbix import plugin_settings as zabbix_plugin_settings 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): def get_plugin_settings(self):
return zabbix_plugin_settings 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) self.helpers.prepare_plugin(self.settings.plugin_path)
if dependat_plugins: if dependant_plugins:
for plugin in self.settings.dependant_plugins: for plugin in self.settings.dependant_plugins:
self.helpers.prepare_plugin( self.helpers.prepare_plugin(
self.settings.dependant_plugins[plugin]["plugin_path"]) self.settings.dependant_plugins[plugin]["plugin_path"])

View File

@ -89,7 +89,7 @@ class TestZabbixPluginSystem(api.ZabbixApi):
""" """
self.env.revert_snapshot("ready_with_5_slaves") 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__) self.helpers.create_cluster(name=self.__class__.__name__)
@ -106,12 +106,10 @@ class TestZabbixPluginSystem(api.ZabbixApi):
self.activate_dependant_plugin( self.activate_dependant_plugin(
self.settings.dependant_plugins[ self.settings.dependant_plugins[
"ZABBIX_MONITORING_EXTREME_NETWORKS"], "ZABBIX_MONITORING_EXTREME_NETWORKS"],
options={'metadata/enabled': True, options={'hosts/value': 'MyXNHost:{}'.format(extreme_host_ip)})
'hosts/value': 'MyXNHost:{}'.format(extreme_host_ip)})
self.activate_dependant_plugin( self.activate_dependant_plugin(
self.settings.dependant_plugins["ZABBIX_MONITORING_EMC"], self.settings.dependant_plugins["ZABBIX_MONITORING_EMC"],
options={'metadata/enabled': True, options={'hosts/value': 'MyEMCHost:{}'.format(emc_host_ip)})
'hosts/value': 'MyEMCHost:{}'.format(emc_host_ip)})
self.helpers.deploy_cluster( self.helpers.deploy_cluster(
{ {