summaryrefslogtreecommitdiffstats
path: root/tests/monitor.py
AgeCommit message (Collapse)AuthorFilesLines
2016-02-12tests: enable doctor test scenario with fixesRyota MIBU1-2/+5
Change-Id: I2c0c939b41f28684a1697b0099f2df62ce27c6a3 Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
2016-01-29fix license description in code headersRyota MIBU1-13/+7
Change-Id: Idb7b6e55e5760a9e6ba6cb0b512f1961488312ca Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
2016-01-04add test scenario and sample componentsRyota MIBU1-0/+79
DOCTOR-22 Change-Id: I82cb572fadd057151c55396dd3ab4114539c8fa7 Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
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 */
#!/bin/bash

function run_puppet {
    set -eux
    local manifest="$1"
    local role="$2"
    local step="$3"
    local rc=0

    export FACTER_deploy_config_name="${role}Deployment_Step${step}"
    if [ -e "/etc/puppet/hieradata/heat_config_${FACTER_deploy_config_name}.json" ]; then
        set +e
        puppet apply --detailed-exitcodes \
               --modulepath \
               /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules \
               "${manifest}"
        rc=$?
        echo "puppet apply exited with exit code $rc"
    else
        echo "Step${step} doesn't exist for ${role}"
    fi
    set -e

    if [ $rc -eq 2 -o $rc -eq 0 ]; then
        set +xu
        return 0
    fi
    set +xu
    return $rc
}