summaryrefslogtreecommitdiffstats
path: root/puppet-barometer/manifests
diff options
context:
space:
mode:
authorAaron Smith <aasmith@redhat.com>2018-01-18 16:16:14 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-01-18 16:16:14 +0000
commit7a803394c9b74aa0af41ceb16c6d2d735cca7382 (patch)
treef416cd9523bc4591fa7afb0c0c1a58aa612508a8 /puppet-barometer/manifests
parent7ce1dc075eeacb8ff20ea421f77fca12636682fe (diff)
parentd30a11ff800ce35ad707b1031c12fb4c41c3cb56 (diff)
Merge "ves: move yaml and configuration files in to folders within the ves_app folder"
Diffstat (limited to 'puppet-barometer/manifests')
0 files changed, 0 insertions, 0 deletions
00000; 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 */ }
partitions=\$(pvs --noheadings --separator :| cut -d: -f1,2)
vg_remove=0
remove_partitions=''
echo "partitions \$partitions" >> /tmp/post_partition.log

for partition in \$partitions; do
    partition_vg=(\${partition//:/ })
    partition=\${partition_vg[0]}
    vg=\${partition_vg[1]}
    if [[ "\$vg" == "reserved" ]]; then
        echo "prepare remove partition \$partition" >> /tmp/post_partition.log
        remove_partitions="\${remove_partitions} \$partition"
        vg_remove=1
    else
        echo "ignore \$vg since it is not reserved" >> /tmp/post_partition.log
    fi
done

if [[ "\${vg_remove}" != "0" ]]; then
    vgremove -f reserved
fi

for remove_partition in \${remove_partitions}; do
    echo "remove partition \${remove_partition}" >> /tmp/post_partition.log
    pvremove -ff -y \${remove_partition}
    set \$(echo \${remove_partition}  | sed -e 's/^\(.*\)\([0-9]\+\)\$/\1 \2/g')
    partition_disk=\$1
    partition_number=\$2
    if [ -z "\${partition_disk}" -o -z "\${partition_number}" ]; then
        continue
    fi
    parted \${partition_disk} --script -- rm \${partition_number}
done