Browse code

Merge "Remove driver certs directory"

Jenkins authored on 2016/04/14 02:17:01
Showing 1 changed files
1 1
deleted file mode 100755
... ...
@@ -1,106 +0,0 @@
1
-#!/usr/bin/env bash
2
-
3
-# **cinder_cert.sh**
4
-
5
-# This script is a simple wrapper around the tempest volume api tests
6
-# It requires that you have a working and functional devstack install
7
-# and that you've enabled your device driver by making the necessary
8
-# modifications to /etc/cinder/cinder.conf
9
-
10
-# This script will refresh your openstack repo's and restart the cinder
11
-# services to pick up your driver changes.
12
-# please NOTE; this script assumes your devstack install is functional
13
-# and includes tempest. A good first step is to make sure you can
14
-# create volumes on your device before you even try and run this script.
15
-
16
-# It also assumes default install location (/opt/stack/xxx)
17
-# to aid in debug, you should also verify that you've added
18
-# an output directory for screen logs:
19
-#
20
-#     SCREEN_LOGDIR=/opt/stack/screen-logs
21
-
22
-set -o pipefail
23
-
24
-CERT_DIR=$(cd $(dirname "$0") && pwd)
25
-TOP_DIR=$(cd $CERT_DIR/..; pwd)
26
-
27
-source $TOP_DIR/functions
28
-source $TOP_DIR/stackrc
29
-source $TOP_DIR/openrc
30
-source $TOP_DIR/lib/infra
31
-source $TOP_DIR/lib/tempest
32
-source $TOP_DIR/lib/cinder
33
-
34
-TEMPFILE=`mktemp`
35
-RECLONE=True
36
-
37
-function log_message {
38
-    MESSAGE=$1
39
-    STEP_HEADER=$2
40
-    if [[ "$STEP_HEADER" = "True" ]]; then
41
-        echo -e "\n========================================================" | tee -a $TEMPFILE
42
-    fi
43
-    echo -e `date +%m/%d/%y/%T:`"${MESSAGE}" | tee -a $TEMPFILE
44
-    if [[ "$STEP_HEADER" = "True" ]]; then
45
-        echo -e "========================================================" | tee -a $TEMPFILE
46
-    fi
47
-}
48
-
49
-if [[ "$OFFLINE" = "True" ]]; then
50
-    echo "ERROR: Driver cert requires fresh clone/pull from ${CINDER_BRANCH}"
51
-    echo "       Please set OFFLINE=False and retry."
52
-    exit 1
53
-fi
54
-
55
-log_message "RUNNING CINDER DRIVER CERTIFICATION CHECK", True
56
-log_message "Output is being logged to: $TEMPFILE"
57
-
58
-cd $CINDER_DIR
59
-log_message "Cloning to ${CINDER_REPO}...", True
60
-install_cinder
61
-
62
-log_message "Pull a fresh Clone of cinder repo...", True
63
-git status | tee -a $TEMPFILE
64
-git log --pretty=oneline -n 1 | tee -a $TEMPFILE
65
-
66
-log_message "Gathering copy of cinder.conf file (passwords will be scrubbed)...", True
67
-cat /etc/cinder/cinder.conf | egrep -v "(^#.*|^$)" | tee -a $TEMPFILE
68
-sed -i "s/\(.*password.*=\).*$/\1 xxx/i" $TEMPFILE
69
-log_message "End of cinder.conf.", True
70
-
71
-cd $TOP_DIR
72
-# Verify tempest is installed/enabled
73
-if ! is_service_enabled tempest; then
74
-    log_message "ERROR!!! Cert requires tempest in enabled_services!", True
75
-    log_message"       Please add tempest to enabled_services and retry."
76
-    exit 1
77
-fi
78
-
79
-cd $TEMPEST_DIR
80
-install_tempest
81
-
82
-log_message "Verify tempest is current....", True
83
-git status | tee -a $TEMPFILE
84
-log_message "Check status and get latest commit..."
85
-git log --pretty=oneline -n 1 | tee -a $TEMPFILE
86
-
87
-
88
-#stop and restart cinder services
89
-log_message "Restart Cinder services...", True
90
-stop_cinder
91
-sleep 1
92
-start_cinder
93
-sleep 5
94
-
95
-# run tempest api/volume/test_*
96
-log_message "Run the actual tempest volume tests (./tools/pretty_tox.sh volume)...", True
97
-./tools/pretty_tox.sh volume 2>&1 | tee -a $TEMPFILE
98
-if [[ $? = 0 ]]; then
99
-    log_message "CONGRATULATIONS!!!  Device driver PASSED!", True
100
-    log_message "Submit output: ($TEMPFILE)"
101
-    exit 0
102
-else
103
-    log_message "SORRY!!!  Device driver FAILED!", True
104
-    log_message "Check output in $TEMPFILE"
105
-    exit 1
106
-fi