Merge "Fix linters error and enable linters zuul gate"
This commit is contained in:
commit
cd467e2ebd
@ -3,8 +3,8 @@
|
||||
check:
|
||||
jobs:
|
||||
- openstack-tox-pep8
|
||||
|
||||
- openstack-tox-linters
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-pep8
|
||||
|
||||
- openstack-tox-linters
|
||||
|
@ -4,17 +4,16 @@
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
backup_dir="/opt/backups"
|
||||
tmp_dir="${backup_dir}/image_temp"
|
||||
|
||||
function usage {
|
||||
cat <<"EOF"
|
||||
cat <<"EOF"
|
||||
Helper tool for backing up Glance images
|
||||
Usage:
|
||||
image-backup export <uuid> - export the image with <uuid> into backup file /opt/backups/image_<uuid>.tgz
|
||||
image-backup import image_<uuid>.tgz - import the image from the backup source file at /opt/backups/image_<uuid>.tgz
|
||||
into the corresponding image.
|
||||
image-backup export <uuid> - export the image with <uuid> into backup file /opt/backups/image_<uuid>.tgz
|
||||
image-backup import image_<uuid>.tgz - import the image from the backup source file at /opt/backups/image_<uuid>.tgz
|
||||
into the corresponding image.
|
||||
|
||||
Temporary files are stored in /opt/backups/image_temp
|
||||
|
||||
@ -133,8 +132,7 @@ if [ $EUID -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# -ne 2 ] ;
|
||||
then
|
||||
if [ $# -ne 2 ]; then
|
||||
usage
|
||||
exit 0
|
||||
fi
|
||||
@ -209,4 +207,3 @@ elif [ "$1" = "import" ]; then
|
||||
else
|
||||
usage
|
||||
fi
|
||||
|
||||
|
@ -38,7 +38,7 @@ find /mnt/huge-1048576kB/|xargs ls -ld >> ${logfile} 2>> ${logfile}
|
||||
|
||||
echo "Locked smaps" >> ${logfile}
|
||||
echo "------------" >> ${logfile}
|
||||
grep Locked: /proc/*/smaps 2>/dev/null| awk '($2 > 0) {a[$1]+=$2} END {for (i in a) print i,a[i]/1024.0, "MiB";}' >> ${logfile} 2>> ${logfile}
|
||||
grep Locked: /proc/*/smaps 2>/dev/null | awk '($2 > 0) {a[$1]+=$2} END {for (i in a) print i,a[i]/1024.0, "MiB";}' >> ${logfile} 2>> ${logfile}
|
||||
|
||||
date '+%F %T' >> ${logfile} 2>> ${logfile}
|
||||
|
||||
|
10
tox.ini
10
tox.ini
@ -14,6 +14,8 @@ deps = -r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:linters]
|
||||
whitelist_externals = bash
|
||||
#bashate ignore
|
||||
#E006 Line too long
|
||||
commands =
|
||||
bash -c "find {toxinidir} \
|
||||
-not \( -type d -name .?\* -prune \) \
|
||||
@ -21,11 +23,11 @@ commands =
|
||||
-not -name \*~ \
|
||||
-not -name \*.md \
|
||||
-name \*.sh \
|
||||
-print0 | xargs -0 bashate -v"
|
||||
-print0 | xargs -0 bashate -v -i E006"
|
||||
bash -c "find {toxinidir} \
|
||||
\( -name middleware/io-monitor/recipes-common/io-monitor/io-monitor/io_monitor/test-tools/yaml/* -prune \) \
|
||||
-o \( -name .tox -prune \) \
|
||||
-o -type f -name '*.yaml' \
|
||||
\( -path '{toxinidir}/openstack/python-heat/python-heat/templates*' \
|
||||
-o -path '{toxinidir}/.tox' \) -a -prune \
|
||||
-o -name '*.yaml' \
|
||||
-print0 | xargs -0 yamllint"
|
||||
|
||||
[testenv:pep8]
|
||||
|
Loading…
Reference in New Issue
Block a user