aboutsummaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2018-09-02 07:25:00 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-09-02 07:25:00 +0000
commitcdeeacd093740b87865dfbffb92c6c6d5b917d3b (patch)
treef3e1c2ab942338d2c50f8237a96f028b31795462 /build.sh
parent1b299d38acb223caa21d0c3eeb32c9d2ae348a1c (diff)
parent01a46e85a0e1eca03f2adf7b0f479d79e71fd786 (diff)
Merge changes Ib7384772,I94e94c21
* changes: Update to Alpine 3.8 Publish unit test report
Diffstat (limited to 'build.sh')
-rw-r--r--build.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/build.sh b/build.sh
index 8610330f6..74f67dada 100644
--- a/build.sh
+++ b/build.sh
@@ -29,11 +29,11 @@ for dir in ${amd64_dirs}; do
(docker rmi "${repo}/functest-${dir##**/}:amd64-latest" || true)
done
[ ! -z "${amd64_dirs}" ] &&
- (docker rmi "${repo}/functest-core:amd64-latest" alpine:3.7 || true)
+ (docker rmi "${repo}/functest-core:amd64-latest" alpine:3.8 || true)
find . -name Dockerfile -exec git checkout {} +
find . -name Dockerfile -exec sed -i \
- -e "s|alpine:3.7|multiarch/alpine:arm64-v3.7|g" {} +
+ -e "s|alpine:3.8|multiarch/alpine:arm64-v3.8|g" {} +
find . -name Dockerfile -exec sed -i \
-e "s|opnfv/functest-core|${repo}/functest-core:arm64-latest|g" {} +
find . -name Dockerfile -exec sed -i \
@@ -47,7 +47,7 @@ for dir in ${arm64_dirs}; do
done
[ ! -z "${arm64_dirs}" ] &&
(docker rmi "${repo}/functest-core:arm64-latest" \
- multiarch/alpine:arm64-v3.7 || true)
+ multiarch/alpine:arm64-v3.8 || true)
find . -name Dockerfile -exec git checkout {} +
exit $?
0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #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 */
from opnfv_testapi.resources import models
from opnfv_testapi.tornado_swagger import swagger


def list_default(value):
    return value if value else list()


def dict_default(value):
    return value if value else dict()


@swagger.model()
class ScenarioTI(models.ModelBase):
    def __init__(self, date=None, status='silver'):
        self.date = date
        self.status = status


@swagger.model()
class ScenarioScore(models.ModelBase):
    def __init__(self, date=None, score='0'):
        self.date = date
        self.score = score


@swagger.model()
class ScenarioProject(models.ModelBase):
    """
        @property customs:
        @ptype customs: C{list} of L{string}
        @property scores:
        @ptype scores: C{list} of L{ScenarioScore}
        @property trust_indicators:
        @ptype trust_indicators: C{list} of L{ScenarioTI}
    """
    def __init__(self,
                 project='',
                 customs=None,
                 scores=None,
                 trust_indicators=None):
        self.project = project
        self.customs = list_default(customs)
        self.scores = list_default(scores)
        self.trust_indicators = list_default(trust_indicators)

    @staticmethod
    def attr_parser():
        return {'scores': ScenarioScore,
                'trust_indicators': ScenarioTI}

    def __eq__(self, other):
        return [self.project == other.project and
                self._customs_eq(other) and
                self._scores_eq(other) and
                self._ti_eq(other)]

    def __ne__(self, other):
        return not self.__eq__(other)

    def _customs_eq(self, other):
        return set(self.customs) == set(other.customs)

    def _scores_eq(self, other):
        return set(self.scores) == set(other.scores)

    def _ti_eq(self, other):
        return set(self.trust_indicators) == set(other.trust_indicators)


@swagger.model()
class ScenarioVersion(models.ModelBase):
    """
        @property projects:
        @ptype projects: C{list} of L{ScenarioProject}
    """
    def __init__(self, version=None, projects=None):
        self.version = version
        self.projects = list_default(projects)

    @staticmethod
    def attr_parser():
        return {'projects': ScenarioProject}

    def __eq__(self, other):
        return [self.version == other.version and self._projects_eq(other)]

    def __ne__(self, other):
        return not self.__eq__(other)

    def _projects_eq(self, other):
        for s_project in self.projects:
            for o_project in other.projects:
                if s_project.project == o_project.project:
                    if s_project != o_project:
                        return False

        return True


@swagger.model()
class ScenarioInstaller(models.ModelBase):
    """
        @property versions:
        @ptype versions: C{list} of L{ScenarioVersion}
    """
    def __init__(self, installer=None, versions=None):
        self.installer = installer
        self.versions = list_default(versions)

    @staticmethod
    def attr_parser():
        return {'versions': ScenarioVersion}

    def __eq__(self, other):
        return [self.installer == other.installer and self._versions_eq(other)]

    def __ne__(self, other):
        return not self.__eq__(other)

    def _versions_eq(self, other):
        for s_version in self.versions:
            for o_version in other.versions:
                if s_version.version == o_version.version:
                    if s_version != o_version:
                        return False

        return True


@swagger.model()
class ScenarioCreateRequest(models.ModelBase):
    """
        @property installers:
        @ptype installers: C{list} of L{ScenarioInstaller}
    """
    def __init__(self, name='', installers=None):
        self.name = name
        self.installers = list_default(installers)

    @staticmethod
    def attr_parser():
        return {'installers': ScenarioInstaller}


@swagger.model()
class ScenarioUpdateRequest(models.ModelBase):
    """
        @property field: update field
        @property op: add/delete/update
        @property locate: information used to locate the field
        @property term: new value
    """
    def __init__(self, field=None, op=None, locate=None, term=None):
        self.field = field
        self.op = op
        self.locate = dict_default(locate)
        self.term = dict_default(term)


@swagger.model()
class Scenario(models.ModelBase):
    """
        @property installers:
        @ptype installers: C{list} of L{ScenarioInstaller}
    """
    def __init__(self, name='', create_date='', _id='', installers=None):
        self.name = name
        self._id = _id
        self.creation_date = create_date
        self.installers = list_default(installers)

    @staticmethod
    def attr_parser():
        return {'installers': ScenarioInstaller}

    def __ne__(self, other):
        return not self.__eq__(other)

    def __eq__(self, other):
        return [self.name == other.name and self._installers_eq(other)]

    def _installers_eq(self, other):
        for s_install in self.installers:
            for o_install in other.installers:
                if s_install.installer == o_install.installer:
                    if s_install != o_install:
                        return False

        return True


@swagger.model()
class Scenarios(models.ModelBase):
    """
        @property scenarios:
        @ptype scenarios: C{list} of L{Scenario}
    """
    def __init__(self):
        self.scenarios = list()

    @staticmethod
    def attr_parser():
        return {'scenarios': Scenario}