Remove alarm_rule from aodh tests

threshold_rule is no longer supported and removed from congress code
in I9cbe3f1307b78d0e703069bc6c011b62c0d3c51f . This commit updates the
tempest tests regadring the same.

This commit also disables HA tests until the bug is fixed
https://bugs.launchpad.net/congress/+bug/1745112

Closes-Bug: #1743729
Change-Id: I5c26c8e77f15f9ea0f075dc23e7249bba5a56e8c
This commit is contained in:
Anusha Ramineni 2018-01-19 14:45:22 +05:30
parent 5373af362d
commit 3a9deeb097
3 changed files with 9 additions and 34 deletions

View File

@ -42,15 +42,12 @@ class TestAodhDriver(manager_congress.ScenarioPolicyBase):
@decorators.attr(type='smoke')
def test_aodh_alarms_table(self):
# Add test alarm
rule = {'meter_name': 'cpu_util',
'comparison_operator': 'gt',
'threshold': 80.0,
'period': 70}
self.alarms_client.create_alarm(name='test-alarm',
type='threshold',
enabled=False,
threshold_rule=rule)
self.alarms_client.create_alarm(
name='test-alarm',
enabled=False,
type='event',
event_rule={})
alarms_schema = (
self.os_admin.congress_client.show_datasource_table_schema(
self.datasource_id, 'alarms')['columns'])
@ -68,9 +65,6 @@ class TestAodhDriver(manager_congress.ScenarioPolicyBase):
results = (
self.os_admin.congress_client.list_datasource_rows(
self.datasource_id, 'alarms'))
rule_data = (
self.os_admin.congress_client.list_datasource_rows(
self.datasource_id, 'alarms.threshold_rule'))['results']
for row in results['results']:
try:
@ -78,15 +72,6 @@ class TestAodhDriver(manager_congress.ScenarioPolicyBase):
except KeyError:
return False
for index in range(len(alarms_schema)):
if alarms_schema[index]['name'] == 'threshold_rule_id':
threshold_rule = alarm_row['threshold_rule']
data = [r['data'] for r in rule_data
if r['data'][0] == row['data'][index]]
for l in data:
if str(threshold_rule[l[1]]) != str(l[2]):
return False
continue
if (str(row['data'][index]) !=
str(alarm_row[alarms_schema[index]['name']])):
return False

View File

@ -193,6 +193,7 @@ class TestHA(manager_congress.ScenarioPolicyBase):
LOG.debug('created fake driver: %s', str(ret['id']))
return ret['id']
@decorators.skip_because(bug="1745112")
@decorators.attr(type='smoke')
def test_datasource_db_sync_add_remove(self):
# Verify that a replica adds a datasource when a datasource

View File

@ -19,7 +19,6 @@ import re
import string
from oslo_log import log as logging
from telemetry_tempest_plugin.aodh.service import client as alarms_client
from tempest.common import credentials_factory as credentials
from tempest import config
from tempest.lib.common.utils import data_utils
@ -68,21 +67,11 @@ class ScenarioPolicyBase(manager.NetworkScenarioTest):
cls.os_admin.qos_rule_client = qos_rule_client.QosRuleClient(
auth_prov, "network", CONF.identity.region)
# FIXME(ekcs): disabled right now because the required client has been
# removed from ceilometer repo along with the v2 API
# # Get telemtery_client
# if getattr(CONF.service_available, 'ceilometer', False):
# import ceilometer.tests.tempest.service.client as telemetry_client
# cls.os_admin.telemetry_client = (
# telemetry_client.TelemetryClient(
# auth_prov,
# CONF.telemetry.catalog_type, CONF.identity.region,
# endpoint_type=CONF.telemetry.endpoint_type))
# Get alarms client
if getattr(CONF.service_available, 'aodh_plugin', False):
import telemetry_tempest_plugin.aodh.service.client as alarm_client
cls.os_admin.alarms_client = (
alarms_client.AlarmingClient(
alarm_client.AlarmingClient(
auth_prov,
CONF.alarming_plugin.catalog_type, CONF.identity.region,
CONF.alarming_plugin.endpoint_type))