Delete unused code
This patch removes some unused code and empty setUp/tearDown/etc methods. It's not required at this point but since I'm refactoring the code let's make our codebase a bit smaller. Change-Id: Id12d552e0635479cfa84af7bcb35fbe3529a5c31
This commit is contained in:
parent
76ef399b9f
commit
7132e33590
@ -1,15 +0,0 @@
|
|||||||
# Copyright 2016 - Nokia
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
__author__ = 'stack'
|
|
@ -1,15 +0,0 @@
|
|||||||
# Copyright 2016 - Nokia
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
__author__ = 'stack'
|
|
@ -1,15 +0,0 @@
|
|||||||
# Copyright 2016 - Nokia
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
__author__ = 'stack'
|
|
@ -1,15 +0,0 @@
|
|||||||
# Copyright 2016 - Nokia
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
__author__ = 'stack'
|
|
@ -35,12 +35,6 @@ LOG = logging.getLogger(__name__)
|
|||||||
class TestAlarms(BaseAlarmsTest):
|
class TestAlarms(BaseAlarmsTest):
|
||||||
"""Alarms test class for Vitrage API tests."""
|
"""Alarms test class for Vitrage API tests."""
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestAlarms, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(TestAlarms, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
super(TestAlarms, cls).setUpClass()
|
super(TestAlarms, cls).setUpClass()
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
# Copyright 2017 - Nokia
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
__author__ = 'stack'
|
|
@ -22,11 +22,6 @@ LOG = logging.getLogger(__name__)
|
|||||||
class BaseTestEvents(TestActionsBase):
|
class BaseTestEvents(TestActionsBase):
|
||||||
"""Test class for Vitrage event API"""
|
"""Test class for Vitrage event API"""
|
||||||
|
|
||||||
# noinspection PyPep8Naming
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(BaseTestEvents, cls).setUpClass()
|
|
||||||
|
|
||||||
def _check_alarms(self):
|
def _check_alarms(self):
|
||||||
api_alarms = self.vitrage_client.alarm.list(vitrage_id='all',
|
api_alarms = self.vitrage_client.alarm.list(vitrage_id='all',
|
||||||
all_tenants=True)
|
all_tenants=True)
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
# Copyright 2016 - Nokia
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
__author__ = 'stack'
|
|
@ -45,16 +45,6 @@ VITRAGE_ALARM_NAME = 'instance_deduce'
|
|||||||
|
|
||||||
class BaseRcaTest(BaseAlarmsTest):
|
class BaseRcaTest(BaseAlarmsTest):
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(BaseRcaTest, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(BaseRcaTest, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(BaseRcaTest, cls).setUpClass()
|
|
||||||
|
|
||||||
def _clean_all(self):
|
def _clean_all(self):
|
||||||
nova_utils.delete_all_instances()
|
nova_utils.delete_all_instances()
|
||||||
aodh_utils.delete_all_aodh_alarms()
|
aodh_utils.delete_all_aodh_alarms()
|
||||||
|
@ -32,12 +32,6 @@ LOG = logging.getLogger(__name__)
|
|||||||
class TestRca(BaseRcaTest):
|
class TestRca(BaseRcaTest):
|
||||||
"""RCA test class for Vitrage API tests."""
|
"""RCA test class for Vitrage API tests."""
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestRca, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(TestRca, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
super(TestRca, cls).setUpClass()
|
super(TestRca, cls).setUpClass()
|
||||||
|
@ -43,16 +43,6 @@ class TestResource(BaseVitrageTempest):
|
|||||||
VProps.STATE,
|
VProps.STATE,
|
||||||
VProps.VITRAGE_AGGREGATED_STATE)
|
VProps.VITRAGE_AGGREGATED_STATE)
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestResource, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(TestResource, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(TestResource, cls).setUpClass()
|
|
||||||
|
|
||||||
@utils.tempest_logger
|
@utils.tempest_logger
|
||||||
def test_compare_cli_vs_api_resource_list(self):
|
def test_compare_cli_vs_api_resource_list(self):
|
||||||
"""resource list """
|
"""resource list """
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
# Copyright 2016 - Nokia
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
__author__ = 'stack'
|
|
@ -40,16 +40,6 @@ class BaseTemplateTest(BaseVitrageTempest):
|
|||||||
OK_STATUS = 'validation OK'
|
OK_STATUS = 'validation OK'
|
||||||
OK_MSG = 'Template validation is OK'
|
OK_MSG = 'Template validation is OK'
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(BaseTemplateTest, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(BaseTemplateTest, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(BaseTemplateTest, cls).setUpClass()
|
|
||||||
|
|
||||||
def _compare_template_lists(self, api_templates, cli_templates):
|
def _compare_template_lists(self, api_templates, cli_templates):
|
||||||
self.assertThat(api_templates, IsNotEmpty(),
|
self.assertThat(api_templates, IsNotEmpty(),
|
||||||
'The template list taken from api is empty')
|
'The template list taken from api is empty')
|
||||||
|
@ -42,12 +42,6 @@ FAKE_UUID = 'ade68276-0fe9-42cd-9ec2-e7f20470a771'
|
|||||||
class TestValidate(BaseTemplateTest):
|
class TestValidate(BaseTemplateTest):
|
||||||
"""Template test class for Vitrage API tests."""
|
"""Template test class for Vitrage API tests."""
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestValidate, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(TestValidate, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
super(TestValidate, cls).setUpClass()
|
super(TestValidate, cls).setUpClass()
|
||||||
|
@ -30,10 +30,6 @@ FAKE_UUID = 'ade68276-0fe9-42cd-9ec2-e7f20470a771'
|
|||||||
class TestValidateV2(BaseTemplateTest):
|
class TestValidateV2(BaseTemplateTest):
|
||||||
"""Template test class for Vitrage API tests."""
|
"""Template test class for Vitrage API tests."""
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(TestValidateV2, cls).setUpClass()
|
|
||||||
|
|
||||||
def test_templates_validate_no_type_templates(self):
|
def test_templates_validate_no_type_templates(self):
|
||||||
try:
|
try:
|
||||||
path = self.TEST_PATH + NO_TYPE_TEMPLATE
|
path = self.TEST_PATH + NO_TYPE_TEMPLATE
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
# Copyright 2016 - Nokia
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
__author__ = 'stack'
|
|
@ -28,16 +28,6 @@ from vitrage_tempest_plugin.tests.common import nova_utils
|
|||||||
class BaseTopologyTest(BaseVitrageTempest):
|
class BaseTopologyTest(BaseVitrageTempest):
|
||||||
"""Topology test class for Vitrage API tests."""
|
"""Topology test class for Vitrage API tests."""
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(BaseTopologyTest, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(BaseTopologyTest, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(BaseTopologyTest, cls).setUpClass()
|
|
||||||
|
|
||||||
def _rollback_to_default(self):
|
def _rollback_to_default(self):
|
||||||
self._delete_entities()
|
self._delete_entities()
|
||||||
api_graph = self.vitrage_client.topology.get(
|
api_graph = self.vitrage_client.topology.get(
|
||||||
|
@ -42,16 +42,6 @@ class TestTopology(BaseTopologyTest):
|
|||||||
NUM_INSTANCE = 3
|
NUM_INSTANCE = 3
|
||||||
NUM_VOLUME = 1
|
NUM_VOLUME = 1
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestTopology, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(TestTopology, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(TestTopology, cls).setUpClass()
|
|
||||||
|
|
||||||
def _get_root_vertex_id(self):
|
def _get_root_vertex_id(self):
|
||||||
items = self.vitrage_client.resource.list(
|
items = self.vitrage_client.resource.list(
|
||||||
resource_type=OPENSTACK_CLUSTER, all_tenants=True)
|
resource_type=OPENSTACK_CLUSTER, all_tenants=True)
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
# Copyright 2017 - Nokia
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
__author__ = 'stack'
|
|
@ -14,11 +14,9 @@
|
|||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import json
|
import json
|
||||||
from networkx.readwrite import json_graph
|
|
||||||
import six
|
import six
|
||||||
import sys
|
|
||||||
import traceback
|
|
||||||
|
|
||||||
|
from networkx.readwrite import json_graph
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
from oslotest import base
|
from oslotest import base
|
||||||
@ -76,18 +74,10 @@ class BaseVitrageTempest(base.BaseTestCase):
|
|||||||
ADMIN_PROJECT_NAME = 'admin'
|
ADMIN_PROJECT_NAME = 'admin'
|
||||||
|
|
||||||
def assert_list_equal(self, l1, l2):
|
def assert_list_equal(self, l1, l2):
|
||||||
if tuple(sys.version_info)[0:2] < (2, 7):
|
self.assertListEqual(l1, l2)
|
||||||
# for python 2.6 compatibility
|
|
||||||
self.assertEqual(l1, l2)
|
|
||||||
else:
|
|
||||||
super(BaseVitrageTempest, self).assertListEqual(l1, l2)
|
|
||||||
|
|
||||||
def assert_dict_equal(self, d1, d2, message):
|
def assert_dict_equal(self, d1, d2, message):
|
||||||
if tuple(sys.version_info)[0:2] < (2, 7):
|
self.assertDictEqual(d1, d2, message)
|
||||||
# for python 2.6 compatibility
|
|
||||||
self.assertEqual(d1, d2)
|
|
||||||
else:
|
|
||||||
super(BaseVitrageTempest, self).assertDictEqual(d1, d2, message)
|
|
||||||
|
|
||||||
def assert_timestamp_equal(self, first, second, msg=None):
|
def assert_timestamp_equal(self, first, second, msg=None):
|
||||||
"""Checks that two timestamps are equals.
|
"""Checks that two timestamps are equals.
|
||||||
@ -353,7 +343,6 @@ class BaseVitrageTempest(base.BaseTestCase):
|
|||||||
LOG.info('Entity Graph: \n%s', json.dumps(node_link_data))
|
LOG.info('Entity Graph: \n%s', json.dumps(node_link_data))
|
||||||
|
|
||||||
def _handle_exception(self, exception):
|
def _handle_exception(self, exception):
|
||||||
traceback.print_exc()
|
|
||||||
LOG.exception(exception)
|
LOG.exception(exception)
|
||||||
self._print_entity_graph()
|
self._print_entity_graph()
|
||||||
|
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
# Copyright 2017 - Nokia
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
__author__ = 'stack'
|
|
@ -13,6 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from vitrage_tempest_plugin.tests.common.tempest_clients import TempestClients
|
from vitrage_tempest_plugin.tests.common.tempest_clients import TempestClients
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,13 +51,8 @@ def generate_fake_host_alarm(hostname, event_type, enabled=True):
|
|||||||
|
|
||||||
|
|
||||||
def get_first_host(**kwargs):
|
def get_first_host(**kwargs):
|
||||||
try:
|
hosts = TempestClients.vitrage().resource.list(
|
||||||
hosts = TempestClients.vitrage().resource.list(
|
NOVA_HOST_DATASOURCE, all_tenants=True)
|
||||||
NOVA_HOST_DATASOURCE, all_tenants=True)
|
|
||||||
except Exception as e:
|
|
||||||
LOG.exception("get_first_host failed with %s", e)
|
|
||||||
hosts = TempestClients.vitrage().resource.list(
|
|
||||||
NOVA_HOST_DATASOURCE, all_tenants=True)
|
|
||||||
return g_utils.first_match(hosts, **kwargs)
|
return g_utils.first_match(hosts, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
# Copyright 2016 - Nokia
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
__author__ = 'stack'
|
|
@ -27,16 +27,6 @@ class TestAodhAlarm(BaseAlarmsTest):
|
|||||||
NUM_INSTANCE = 1
|
NUM_INSTANCE = 1
|
||||||
NUM_ALARM = 1
|
NUM_ALARM = 1
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestAodhAlarm, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(TestAodhAlarm, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(TestAodhAlarm, cls).setUpClass()
|
|
||||||
|
|
||||||
@utils.tempest_logger
|
@utils.tempest_logger
|
||||||
def test_alarm_with_resource_id(self):
|
def test_alarm_with_resource_id(self):
|
||||||
try:
|
try:
|
||||||
|
@ -23,16 +23,6 @@ class TestCinderVolume(BaseTopologyTest):
|
|||||||
NUM_INSTANCE = 3
|
NUM_INSTANCE = 3
|
||||||
NUM_VOLUME = 1
|
NUM_VOLUME = 1
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestCinderVolume, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(TestCinderVolume, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(TestCinderVolume, cls).setUpClass()
|
|
||||||
|
|
||||||
@utils.tempest_logger
|
@utils.tempest_logger
|
||||||
def test_volume(self):
|
def test_volume(self):
|
||||||
try:
|
try:
|
||||||
|
@ -28,16 +28,6 @@ LOG = logging.getLogger(__name__)
|
|||||||
class TestHeatStack(BaseTopologyTest):
|
class TestHeatStack(BaseTopologyTest):
|
||||||
NUM_STACKS = 1
|
NUM_STACKS = 1
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestHeatStack, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(TestHeatStack, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(TestHeatStack, cls).setUpClass()
|
|
||||||
|
|
||||||
@utils.tempest_logger
|
@utils.tempest_logger
|
||||||
def test_nested_heat_stack(self):
|
def test_nested_heat_stack(self):
|
||||||
self._test_heat_stack(nested=True,
|
self._test_heat_stack(nested=True,
|
||||||
|
@ -27,16 +27,6 @@ LOG = logging.getLogger(__name__)
|
|||||||
class TestNeutron(BaseTopologyTest):
|
class TestNeutron(BaseTopologyTest):
|
||||||
NUM_INSTANCE = 3
|
NUM_INSTANCE = 3
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestNeutron, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(TestNeutron, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(TestNeutron, cls).setUpClass()
|
|
||||||
|
|
||||||
@utils.tempest_logger
|
@utils.tempest_logger
|
||||||
def test_neutron(self):
|
def test_neutron(self):
|
||||||
"""neutron test
|
"""neutron test
|
||||||
|
@ -22,16 +22,6 @@ LOG = logging.getLogger(__name__)
|
|||||||
class TestNova(BaseTopologyTest):
|
class TestNova(BaseTopologyTest):
|
||||||
NUM_INSTANCE = 3
|
NUM_INSTANCE = 3
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestNova, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(TestNova, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(TestNova, cls).setUpClass()
|
|
||||||
|
|
||||||
@utils.tempest_logger
|
@utils.tempest_logger
|
||||||
def test_nova_entities(self):
|
def test_nova_entities(self):
|
||||||
try:
|
try:
|
||||||
|
@ -29,16 +29,6 @@ class TestStatic(BaseVitrageTempest):
|
|||||||
NUM_SWITCH = 1
|
NUM_SWITCH = 1
|
||||||
NUM_NIC = 1
|
NUM_NIC = 1
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestStatic, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(TestStatic, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super(TestStatic, cls).setUpClass()
|
|
||||||
|
|
||||||
@utils.tempest_logger
|
@utils.tempest_logger
|
||||||
def test_switches(self):
|
def test_switches(self):
|
||||||
try:
|
try:
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
# Copyright 2017 - Nokia
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
__author__ = 'stack'
|
|
@ -27,12 +27,6 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class TestActionsBase(BaseVitrageTempest):
|
class TestActionsBase(BaseVitrageTempest):
|
||||||
def setUp(self):
|
|
||||||
super(TestActionsBase, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(TestActionsBase, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
super(TestActionsBase, cls).setUpClass()
|
super(TestActionsBase, cls).setUpClass()
|
||||||
|
@ -55,12 +55,6 @@ class TestBasicActions(TestActionsBase):
|
|||||||
super(TestBasicActions, cls).setUpClass()
|
super(TestBasicActions, cls).setUpClass()
|
||||||
cls._template = v_utils.add_template("e2e_test_basic_actions.yaml")
|
cls._template = v_utils.add_template("e2e_test_basic_actions.yaml")
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestBasicActions, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(TestBasicActions, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
if cls._template is not None:
|
if cls._template is not None:
|
||||||
|
@ -58,9 +58,6 @@ class TestTemplateActions(TestActionsBase):
|
|||||||
super(TestTemplateActions, self).__init__(*args, **kwds)
|
super(TestTemplateActions, self).__init__(*args, **kwds)
|
||||||
self.added_template = None
|
self.added_template = None
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestTemplateActions, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
super(TestTemplateActions, self).tearDown()
|
super(TestTemplateActions, self).tearDown()
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
|
@ -88,9 +88,6 @@ class TestWebhook(TestActionsBase):
|
|||||||
if cls._template is not None:
|
if cls._template is not None:
|
||||||
v_utils.delete_template(cls._template['uuid'])
|
v_utils.delete_template(cls._template['uuid'])
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestWebhook, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
super(TestWebhook, self).tearDown()
|
super(TestWebhook, self).tearDown()
|
||||||
del messages[:]
|
del messages[:]
|
||||||
|
@ -62,12 +62,6 @@ class TestOverlappingActions(TestActionsBase):
|
|||||||
cls._template = v_utils.add_template(
|
cls._template = v_utils.add_template(
|
||||||
'e2e_test_overlapping_actions.yaml')
|
'e2e_test_overlapping_actions.yaml')
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestOverlappingActions, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(TestOverlappingActions, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
if cls._template is not None:
|
if cls._template is not None:
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
# Copyright 2017 - Nokia
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
__author__ = 'stack'
|
|
@ -49,12 +49,6 @@ class TestMistralNotifier(BaseTestEvents):
|
|||||||
TRIGGER_ALARM_2 = "notifiers.mistral.trigger.alarm.2"
|
TRIGGER_ALARM_2 = "notifiers.mistral.trigger.alarm.2"
|
||||||
TRIGGER_ALARM_FOR_FUNCTION = "notifiers.mistral.trigger.alarm.for.function"
|
TRIGGER_ALARM_FOR_FUNCTION = "notifiers.mistral.trigger.alarm.for.function"
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(TestMistralNotifier, self).setUp()
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(TestMistralNotifier, self).tearDown()
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
super(TestMistralNotifier, cls).setUpClass()
|
super(TestMistralNotifier, cls).setUpClass()
|
||||||
|
@ -21,7 +21,6 @@ from oslo_config.cfg import NoSuchOptError
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
@ -29,13 +28,6 @@ LOG = logging.getLogger(__name__)
|
|||||||
TIMESTAMP_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
|
TIMESTAMP_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
|
||||||
|
|
||||||
|
|
||||||
def get_from_terminal(command):
|
|
||||||
proc = os.popen(command)
|
|
||||||
text_out = proc.read()
|
|
||||||
proc.close()
|
|
||||||
return text_out
|
|
||||||
|
|
||||||
|
|
||||||
def run_vitrage_command(command, conf):
|
def run_vitrage_command(command, conf):
|
||||||
# AUTH_URL
|
# AUTH_URL
|
||||||
local_ip = '127.0.0.1'
|
local_ip = '127.0.0.1'
|
||||||
@ -118,25 +110,6 @@ def get_property_value(environment_name, conf_name, default_value, conf):
|
|||||||
return default_value
|
return default_value
|
||||||
|
|
||||||
|
|
||||||
def run_from_terminal(command):
|
|
||||||
proc = os.popen(command)
|
|
||||||
proc.close()
|
|
||||||
|
|
||||||
|
|
||||||
def change_terminal_dir(path):
|
|
||||||
os.chdir(path)
|
|
||||||
LOG.debug("The path is : " + path)
|
|
||||||
|
|
||||||
|
|
||||||
def get_regex_result(pattern, text):
|
|
||||||
p = re.compile(pattern)
|
|
||||||
m = p.search(text)
|
|
||||||
if m:
|
|
||||||
LOG.debug("The regex value is " + m.group(1))
|
|
||||||
return m.group(1)
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def uni2str(text):
|
def uni2str(text):
|
||||||
return text.encode('ascii', 'ignore')
|
return text.encode('ascii', 'ignore')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user