Merge "call super for setUpClass"
This commit is contained in:
commit
d59307701e
@ -53,6 +53,7 @@ class TestActionExecutor(TestFunctionalBase):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestActionExecutor, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.PROCESSOR_OPTS, group='entity_graph')
|
||||
cls.conf.register_opts(cls.DATASOURCES_OPTS, group='datasources')
|
||||
|
@ -76,6 +76,7 @@ class TestScenarioEvaluator(TestFunctionalBase):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestScenarioEvaluator, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.PROCESSOR_OPTS, group='entity_graph')
|
||||
cls.conf.register_opts(cls.EVALUATOR_OPTS, group='evaluator')
|
||||
|
@ -35,6 +35,7 @@ class AodhDriverTest(base.BaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(AodhDriverTest, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=AODH_DATASOURCE)
|
||||
|
||||
|
@ -39,6 +39,7 @@ class TestAodhAlarmTransformer(AodhTransformerBaseTest):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestAodhAlarmTransformer, cls).setUpClass()
|
||||
cls.transformers = {}
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=AODH_DATASOURCE)
|
||||
@ -116,8 +117,10 @@ class TestAodhAlarmPushTransformer(AodhTransformerBaseTest):
|
||||
default=UpdateMethod.PUSH),
|
||||
]
|
||||
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestAodhAlarmPushTransformer, cls).setUpClass()
|
||||
cls.transformers = {}
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=AODH_DATASOURCE)
|
||||
|
@ -37,6 +37,7 @@ class CeilometerDriverTest(base.BaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(CeilometerDriverTest, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=CEILOMETER_DATASOURCE)
|
||||
|
||||
|
@ -39,8 +39,10 @@ class TestCeilometerAlarmTransformer(CeilometerTransformerBaseTest):
|
||||
default=UpdateMethod.PULL),
|
||||
]
|
||||
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestCeilometerAlarmTransformer, cls).setUpClass()
|
||||
cls.transformers = {}
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=CEILOMETER_DATASOURCE)
|
||||
@ -119,8 +121,10 @@ class TestCeilometerAlarmPushTransformer(CeilometerTransformerBaseTest):
|
||||
default=UpdateMethod.PUSH),
|
||||
]
|
||||
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestCeilometerAlarmPushTransformer, cls).setUpClass()
|
||||
cls.transformers = {}
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=CEILOMETER_DATASOURCE)
|
||||
|
@ -48,6 +48,7 @@ class TestCinderVolumeTransformer(base.BaseTest):
|
||||
# noinspection PyAttributeOutsideInit,PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestCinderVolumeTransformer, cls).setUpClass()
|
||||
cls.transformers = {}
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=CINDER_VOLUME_DATASOURCE)
|
||||
|
@ -36,6 +36,7 @@ class TestCollectdDriver(base.BaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestCollectdDriver, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=COLLECTD_DATASOURCE)
|
||||
|
||||
|
@ -44,6 +44,7 @@ class TestCollectdTransformer(BaseAlarmTransformerTest):
|
||||
# noinspection PyAttributeOutsideInit,PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestCollectdTransformer, cls).setUpClass()
|
||||
cls.transformers = {}
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=COLLECTD_DATASOURCE)
|
||||
|
@ -38,6 +38,7 @@ class TestConsistencyTransformer(base.BaseTest):
|
||||
# noinspection PyAttributeOutsideInit,PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestConsistencyTransformer, cls).setUpClass()
|
||||
cls.transformers = {}
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=CONSISTENCY_DATASOURCE)
|
||||
|
@ -48,6 +48,7 @@ class TestHeatStackTransformer(base.BaseTest):
|
||||
# noinspection PyAttributeOutsideInit,PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestHeatStackTransformer, cls).setUpClass()
|
||||
cls.transformers = {}
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=HEAT_STACK_DATASOURCE)
|
||||
|
@ -81,6 +81,7 @@ class TestNagiosConfig(base.BaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestNagiosConfig, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=NAGIOS_DATASOURCE)
|
||||
|
||||
|
@ -41,6 +41,7 @@ class NagiosDriverTest(NagiosBaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(NagiosDriverTest, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=NAGIOS_DATASOURCE)
|
||||
|
||||
|
@ -50,6 +50,7 @@ class NagiosTransformerTest(base.BaseTest):
|
||||
# noinspection PyAttributeOutsideInit,PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(NagiosTransformerTest, cls).setUpClass()
|
||||
cls.transformers = {}
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=NAGIOS_DATASOURCE)
|
||||
|
@ -48,6 +48,7 @@ class NovaHostTransformerTest(base.BaseTest):
|
||||
# noinspection PyAttributeOutsideInit,PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(NovaHostTransformerTest, cls).setUpClass()
|
||||
cls.transformers = {}
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=NOVA_HOST_DATASOURCE)
|
||||
|
@ -48,6 +48,7 @@ class NovaInstanceTransformerTest(base.BaseTest):
|
||||
# noinspection PyAttributeOutsideInit,PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(NovaInstanceTransformerTest, cls).setUpClass()
|
||||
cls.transformers = {}
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=NOVA_INSTANCE_DATASOURCE)
|
||||
|
@ -47,6 +47,7 @@ class NovaZoneTransformerTest(base.BaseTest):
|
||||
# noinspection PyAttributeOutsideInit,PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(NovaZoneTransformerTest, cls).setUpClass()
|
||||
cls.transformers = {}
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=NOVA_ZONE_DATASOURCE)
|
||||
|
@ -62,6 +62,7 @@ class TestStaticDriver(base.BaseTest):
|
||||
# noinspection PyAttributeOutsideInit,PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestStaticDriver, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=STATIC_DATASOURCE)
|
||||
cls.static_driver = driver.StaticDriver(cls.conf)
|
||||
|
@ -41,6 +41,7 @@ class TestStaticTransformer(base.BaseTest):
|
||||
# noinspection PyAttributeOutsideInit,PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestStaticTransformer, cls).setUpClass()
|
||||
cls.transformers = {}
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=STATIC_DATASOURCE)
|
||||
|
@ -69,6 +69,7 @@ class TestStaticPhysicalDriver(base.BaseTest):
|
||||
# noinspection PyAttributeOutsideInit,PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestStaticPhysicalDriver, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=STATIC_PHYSICAL_DATASOURCE)
|
||||
cls.static_physical_driver = driver.StaticPhysicalDriver(cls.conf)
|
||||
|
@ -47,6 +47,7 @@ class TestStaticPhysicalTransformer(base.BaseTest):
|
||||
# noinspection PyAttributeOutsideInit,PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestStaticPhysicalTransformer, cls).setUpClass()
|
||||
cls.transformers = {}
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=STATIC_PHYSICAL_DATASOURCE)
|
||||
|
@ -147,6 +147,7 @@ class DatasourceUpdateMethod(base.BaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(DatasourceUpdateMethod, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.DATASOURCES_OPTS, group='datasources')
|
||||
cls.conf.register_opts(cls.NOVA_HOST_OPTS, group=NOVA_HOST_DATASOURCE)
|
||||
|
@ -70,6 +70,7 @@ class TestZabbixConfig(base.BaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestZabbixConfig, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=ZABBIX_DATASOURCE)
|
||||
|
||||
|
@ -40,6 +40,7 @@ class ZabbixDriverTest(ZabbixBaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(ZabbixDriverTest, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=ZABBIX_DATASOURCE)
|
||||
|
||||
|
@ -52,6 +52,7 @@ class ZabbixTransformerTest(base.BaseTest):
|
||||
# noinspection PyAttributeOutsideInit,PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(ZabbixTransformerTest, cls).setUpClass()
|
||||
cls.transformers = {}
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=ZABBIX_DATASOURCE)
|
||||
|
@ -45,6 +45,7 @@ class TransformerManagerTest(base.BaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TransformerManagerTest, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group='datasources')
|
||||
|
||||
|
@ -30,7 +30,7 @@ class AddCausalRelationshipTest(base.BaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
|
||||
super(AddCausalRelationshipTest, cls).setUpClass()
|
||||
cls.target_vertex = Vertex('RESOURCE:nova.host:test_target')
|
||||
cls.source_vertex = Vertex('RESOURCE:nova.host:test_source')
|
||||
|
||||
|
@ -29,7 +29,7 @@ class RaiseAlarmRecipeTest(BaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
|
||||
super(RaiseAlarmRecipeTest, cls).setUpClass()
|
||||
cls.props = {EXECUTION_ENGINE: MISTRAL,
|
||||
WORKFLOW: 'wf_4',
|
||||
'host': 'host5',
|
||||
|
@ -27,7 +27,7 @@ class MarkDownRecipeTest(base.BaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
|
||||
super(MarkDownRecipeTest, cls).setUpClass()
|
||||
cls.target_vertex = Vertex('RESOURCE:nova.host:test1')
|
||||
|
||||
targets = {TFields.TARGET: cls.target_vertex}
|
||||
|
@ -30,7 +30,7 @@ class RaiseAlarmRecipeTest(base.BaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
|
||||
super(RaiseAlarmRecipeTest, cls).setUpClass()
|
||||
cls.target_props = {VProps.VITRAGE_TYPE: NOVA_HOST_DATASOURCE}
|
||||
cls.target_vertex = Vertex('RESOURCE:nova.host:test1',
|
||||
cls.target_props)
|
||||
|
@ -31,6 +31,7 @@ class SetStateRecipeTest(base.BaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(SetStateRecipeTest, cls).setUpClass()
|
||||
|
||||
cls.target_vertex = Vertex('RESOURCE:nova.host:test1')
|
||||
|
||||
|
@ -61,6 +61,7 @@ class ActionValidatorTest(ValidatorTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(ActionValidatorTest, cls).setUpClass()
|
||||
|
||||
cls._hide_useless_logging_messages()
|
||||
|
||||
|
@ -33,6 +33,7 @@ class TemplateContentValidatorTest(ValidatorTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TemplateContentValidatorTest, cls).setUpClass()
|
||||
|
||||
template_dir_path = '%s/templates/general' % utils.get_resources_dir()
|
||||
cls.def_templates_tests_path = '%s/templates/def_template_tests/' % \
|
||||
|
@ -24,6 +24,7 @@ class DefTemplateSyntaxValidatorTest(base.BaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(DefTemplateSyntaxValidatorTest, cls).setUpClass()
|
||||
|
||||
cls.def_template_dir_path = utils.get_resources_dir() + \
|
||||
'/templates/def_template_tests'
|
||||
|
@ -32,6 +32,7 @@ class TemplateSyntaxValidatorTest(base.BaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TemplateSyntaxValidatorTest, cls).setUpClass()
|
||||
|
||||
cls.def_template_dir_path = utils.get_resources_dir() + \
|
||||
'/templates/def_template_tests'
|
||||
|
@ -41,7 +41,7 @@ class ScenarioRepositoryTest(base.BaseTest):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
|
||||
super(ScenarioRepositoryTest, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group='evaluator')
|
||||
|
||||
@ -111,7 +111,7 @@ class RegExTemplateTest(base.BaseTest):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
|
||||
super(RegExTemplateTest, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group='evaluator')
|
||||
cls.scenario_repository = ScenarioRepository(cls.conf)
|
||||
@ -185,7 +185,7 @@ class EquivalentScenarioTest(base.BaseTest):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
|
||||
super(EquivalentScenarioTest, cls).setUpClass()
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group='evaluator')
|
||||
|
||||
|
@ -39,6 +39,7 @@ class GraphAlgorithmTest(GraphTestBase):
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(GraphAlgorithmTest, cls).setUpClass()
|
||||
cls.vm_id = 10000000
|
||||
cls.vm_alarm_id = 30000000
|
||||
cls.vms = []
|
||||
|
@ -158,8 +158,10 @@ class JaccardCorrelationTest(base.BaseTest):
|
||||
help='medium correlation lower limit'),
|
||||
]
|
||||
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(JaccardCorrelationTest, cls).setUpClass()
|
||||
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group='jaccard_correlation')
|
||||
|
@ -24,8 +24,10 @@ from vitrage.tests.unit.notifier.snmp_notifier import common
|
||||
|
||||
class SnmpNotifierTest(base.BaseTest):
|
||||
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(SnmpNotifierTest, cls).setUpClass()
|
||||
cls.resource_props = {VProps.VITRAGE_IS_DELETED: common.false_,
|
||||
VProps.VITRAGE_IS_PLACEHOLDER: common.false_}
|
||||
cls.props = {VProps.VITRAGE_IS_DELETED: common.false_,
|
||||
|
@ -45,8 +45,10 @@ class SnmpNotifierTest(base.BaseTest):
|
||||
'oid_tree_with_severity_mapping.yaml'),
|
||||
]
|
||||
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(SnmpNotifierTest, cls).setUpClass()
|
||||
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.simple_opts, group='snmp')
|
||||
|
@ -44,8 +44,10 @@ class SnmpNotifierTest(base.BaseTest):
|
||||
'oid_tree_without_severity_mapping.yaml'),
|
||||
]
|
||||
|
||||
# noinspection PyPep8Naming
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(SnmpNotifierTest, cls).setUpClass()
|
||||
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.simple_opts, group='snmp')
|
||||
|
Loading…
Reference in New Issue
Block a user