summaryrefslogtreecommitdiffstats
path: root/tests/opnfv/test_cases/opnfv_yardstick_tc048.yaml
AgeCommit message (Expand)AuthorFilesLines
2017-12-15bugfix: kill process do not accurately kill "nova-api"rexlee87761-2/+3
2017-11-20bugfix: tc023 miss description and tc050-58 wrong descriptionrexlee87761-1/+2
2017-10-13bugfix: remove pod_name in host and unify host parameterrexlee87761-3/+4
2017-09-08change outage_time from 20 to 30srexlee87761-2/+2
2017-06-30unify pod keywork so api can easily usedrexlee87761-1/+1
2017-05-18increase monitor number in cases.HuanLi1-0/+2
2017-03-25Bugfix:HA test cases rely on dynamic ip addresses in fuel podsJingLu51-1/+3
2017-02-17Update missing license headersDeepak S1-0/+8
2017-02-13Update CLI Command in yardstick TC019, TC045~TC048tjuyinkanglin1-1/+1
2017-01-20Create API to get a list of all test caseschenjiankun1-1/+2
2016-08-12Increase recovery SLA of HA test cases and fix tc019tjuyinkanglin1-2/+2
2016-07-28modify ha testing pod relative_pathrexlee87761-1/+1
2016-07-07Add test case description and task file for TC048tjuyinkanglin1-0/+43
#fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#!/usr/bin/env python
#
# jose.lausuch@ericsson.com
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
#

""" global variables """

import os

import click

import functest.ci.tier_builder as tb
from functest.utils.constants import CONST
import functest.utils.functest_utils as ft_utils


class CliTier(object):

    def __init__(self):
        self.tiers = tb.TierBuilder(CONST.INSTALLER_TYPE,
                                    CONST.DEPLOY_SCENARIO,
                                    CONST.functest_testcases_yaml)

    def list(self):
        summary = ""
        for tier in self.tiers.get_tiers():
            summary += ("    - %s. %s:\n\t   %s\n"
                        % (tier.get_order(),
                           tier.get_name(),
                           tier.get_test_names()))
        click.echo(summary)

    def show(self, tiername):
        tier = self.tiers.get_tier(tiername)
        if tier is None:
            tier_names = self.tiers.get_tier_names()
            click.echo("The tier with name '%s' does not exist. "
                       "Available tiers are:\n  %s\n" % (tiername, tier_names))
        else:
            click.echo(self.tiers.get_tier(tiername))

    def gettests(self, tiername):
        tier = self.tiers.get_tier(tiername)
        if tier is None:
            tier_names = self.tiers.get_tier_names()
            click.echo("The tier with name '%s' does not exist. "
                       "Available tiers are:\n  %s\n" % (tiername, tier_names))
        else:
            tests = tier.get_test_names()
            click.echo("Test cases in tier '%s':\n %s\n" % (tiername, tests))

    @staticmethod
    def run(tiername, noclean=False, report=False):

        flags = ""
        if noclean:
            flags += "-n "
        if report:
            flags += "-r "

        if not os.path.isfile(CONST.env_active):
            click.echo("Functest environment is not ready. "
                       "Run first 'functest env prepare'")
        else:
            cmd = ("python %s/functest/ci/run_tests.py "
                   "%s -t %s" % (CONST.dir_repo_functest, flags, tiername))
            ft_utils.execute_command(cmd)