Remove the no-longer used functions that were used to download plugins
to dom0.
Change-Id: I8dfd476781b683a8378efdae45d3cb1b46e7063c
| ... | ... |
@@ -19,10 +19,6 @@ function xapi_plugin_location {
|
| 19 | 19 |
return 1 |
| 20 | 20 |
} |
| 21 | 21 |
|
| 22 |
-function zip_snapshot_location {
|
|
| 23 |
- echo $1 | sed "s,^git://,http://,g;s:\.git$::;s:$:/zipball/$2:g" |
|
| 24 |
-} |
|
| 25 |
- |
|
| 26 | 22 |
function create_directory_for_kernels {
|
| 27 | 23 |
if [ -d "/boot/guest" ]; then |
| 28 | 24 |
echo "INFO: /boot/guest directory already exists, using that" >&2 |
| ... | ... |
@@ -43,42 +39,6 @@ function create_directory_for_images {
|
| 43 | 43 |
fi |
| 44 | 44 |
} |
| 45 | 45 |
|
| 46 |
-function extract_remote_zipball {
|
|
| 47 |
- local ZIPBALL_URL=$1 |
|
| 48 |
- |
|
| 49 |
- local LOCAL_ZIPBALL=$(mktemp) |
|
| 50 |
- local EXTRACTED_FILES=$(mktemp -d) |
|
| 51 |
- |
|
| 52 |
- {
|
|
| 53 |
- if ! wget -nv $ZIPBALL_URL -O $LOCAL_ZIPBALL --no-check-certificate; then |
|
| 54 |
- die_with_error "Failed to download [$ZIPBALL_URL]" |
|
| 55 |
- fi |
|
| 56 |
- unzip -q -o $LOCAL_ZIPBALL -d $EXTRACTED_FILES |
|
| 57 |
- rm -f $LOCAL_ZIPBALL |
|
| 58 |
- } >&2 |
|
| 59 |
- |
|
| 60 |
- echo "$EXTRACTED_FILES" |
|
| 61 |
-} |
|
| 62 |
- |
|
| 63 |
-function find_xapi_plugins_dir {
|
|
| 64 |
- find $1 -path '*/xapi.d/plugins' -type d -print |
|
| 65 |
-} |
|
| 66 |
- |
|
| 67 |
-function install_xapi_plugins_from {
|
|
| 68 |
- local XAPI_PLUGIN_DIR |
|
| 69 |
- local EXTRACTED_FILES |
|
| 70 |
- local EXTRACTED_PLUGINS_DIR |
|
| 71 |
- |
|
| 72 |
- EXTRACTED_FILES="$1" |
|
| 73 |
- |
|
| 74 |
- XAPI_PLUGIN_DIR=$(xapi_plugin_location) |
|
| 75 |
- |
|
| 76 |
- EXTRACTED_PLUGINS_DIR=$(find_xapi_plugins_dir $EXTRACTED_FILES) |
|
| 77 |
- |
|
| 78 |
- cp -pr $EXTRACTED_PLUGINS_DIR/* $XAPI_PLUGIN_DIR |
|
| 79 |
- chmod a+x ${XAPI_PLUGIN_DIR}*
|
|
| 80 |
-} |
|
| 81 |
- |
|
| 82 | 46 |
function get_local_sr {
|
| 83 | 47 |
xe pool-list params=default-SR minimal=true |
| 84 | 48 |
} |
| ... | ... |
@@ -116,18 +116,6 @@ function test_no_plugin_directory_found {
|
| 116 | 116 |
grep "[ -d /usr/lib/xcp/plugins/ ]" $LIST_OF_ACTIONS |
| 117 | 117 |
} |
| 118 | 118 |
|
| 119 |
-function test_zip_snapshot_location_http {
|
|
| 120 |
- diff \ |
|
| 121 |
- <(zip_snapshot_location "http://github.com/openstack/nova.git" "master") \ |
|
| 122 |
- <(echo "http://github.com/openstack/nova/zipball/master") |
|
| 123 |
-} |
|
| 124 |
- |
|
| 125 |
-function test_zip_snapsot_location_git {
|
|
| 126 |
- diff \ |
|
| 127 |
- <(zip_snapshot_location "git://github.com/openstack/nova.git" "master") \ |
|
| 128 |
- <(echo "http://github.com/openstack/nova/zipball/master") |
|
| 129 |
-} |
|
| 130 |
- |
|
| 131 | 119 |
function test_create_directory_for_kernels {
|
| 132 | 120 |
( |
| 133 | 121 |
. mocks |
| ... | ... |
@@ -174,37 +162,6 @@ function test_create_directory_for_images_existing_dir {
|
| 174 | 174 |
EOF |
| 175 | 175 |
} |
| 176 | 176 |
|
| 177 |
-function test_extract_remote_zipball {
|
|
| 178 |
- local RESULT=$(. mocks && extract_remote_zipball "someurl") |
|
| 179 |
- |
|
| 180 |
- diff <(cat $LIST_OF_ACTIONS) - << EOF |
|
| 181 |
-wget -nv someurl -O tempfile --no-check-certificate |
|
| 182 |
-unzip -q -o tempfile -d tempdir |
|
| 183 |
-rm -f tempfile |
|
| 184 |
-EOF |
|
| 185 |
- |
|
| 186 |
- [ "$RESULT" = "tempdir" ] |
|
| 187 |
-} |
|
| 188 |
- |
|
| 189 |
-function test_extract_remote_zipball_wget_fail {
|
|
| 190 |
- set +e |
|
| 191 |
- |
|
| 192 |
- local IGNORE |
|
| 193 |
- IGNORE=$(. mocks && extract_remote_zipball "failurl") |
|
| 194 |
- |
|
| 195 |
- assert_died_with "Failed to download [failurl]" |
|
| 196 |
-} |
|
| 197 |
- |
|
| 198 |
-function test_find_nova_plugins {
|
|
| 199 |
- local tmpdir=$(mktemp -d) |
|
| 200 |
- |
|
| 201 |
- mkdir -p "$tmpdir/blah/blah/u/xapi.d/plugins" |
|
| 202 |
- |
|
| 203 |
- [ "$tmpdir/blah/blah/u/xapi.d/plugins" = $(find_xapi_plugins_dir $tmpdir) ] |
|
| 204 |
- |
|
| 205 |
- rm -rf $tmpdir |
|
| 206 |
-} |
|
| 207 |
- |
|
| 208 | 177 |
function test_get_local_sr {
|
| 209 | 178 |
setup_xe_response "uuid123" |
| 210 | 179 |
|