blob: 9e56780be4571b287ac35af364e8b269a6497f0d [file] [log] [blame]
Dennis Dmitriev2cbf2352016-11-11 15:34:21 +02001# Copyright 2016 Mirantis, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
Dennis Dmitriev2cbf2352016-11-11 15:34:21 +020014
15import pytest
16
Dennis Dmitriev2cbf2352016-11-11 15:34:21 +020017from tcp_tests import logger
sgudzcced67d2017-10-11 15:56:09 +030018from tcp_tests import settings
Dennis Dmitriev2cbf2352016-11-11 15:34:21 +020019
20LOG = logger.logger
21
22
23@pytest.mark.deploy
24class TestOpenContrail(object):
25 """Test class for testing OpenContrail on a TCP lab"""
26
Dennis Dmitriev99b26fe2017-04-26 12:34:44 +030027 @pytest.mark.fail_snapshot
Dennis Dmitriev2cbf2352016-11-11 15:34:21 +020028 def test_opencontrail(self, config, openstack_deployed,
sgudzcced67d2017-10-11 15:56:09 +030029 show_step, sl_deployed):
Dennis Dmitriev2cbf2352016-11-11 15:34:21 +020030 """Runner for Juniper contrail-tests
31
32 Scenario:
33 1. Prepare salt on hosts
34 2. Setup controller nodes
35 3. Setup compute nodes
36 4. Prepare contrail-tests on ctl01 node
37 5. Run contrail-tests
38 """
sgudzcced67d2017-10-11 15:56:09 +030039 openstack_deployed._salt.local(
40 tgt='*', fun='cmd.run',
41 args='service ntp stop; ntpd -gq; service ntp start')
Dennis Dmitriev2cbf2352016-11-11 15:34:21 +020042
sgudzcced67d2017-10-11 15:56:09 +030043 if settings.RUN_TEMPEST:
44 # openstack_deployed.run_tempest(target='ctl01',
45 # pattern=settings.PATTERN)
46 openstack_deployed.download_tempest_report(stored_node='cfg01')
47 LOG.info("*************** DONE **************")
48
49 # opencontrail.prepare_tests(
50 # config.opencontrail.opencontrail_prepare_tests_steps_path)
51
52 # opencontrail.run_tests(
53 # tags=config.opencontrail.opencontrail_tags,
54 # features=config.opencontrail.opencontrail_features)