Merge "Remove locals that were not inside functions"
diff --git a/extras.d/70-sahara.sh b/extras.d/70-sahara.sh
index 2a34999..f177766 100644
--- a/extras.d/70-sahara.sh
+++ b/extras.d/70-sahara.sh
@@ -15,6 +15,7 @@
create_sahara_accounts
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
echo_summary "Initializing sahara"
+ sahara_register_images
start_sahara
fi
diff --git a/functions-common b/functions-common
index 1b91adc..44d5671 100644
--- a/functions-common
+++ b/functions-common
@@ -601,7 +601,7 @@
local git_clone_flags=""
RECLONE=$(trueorfalse False RECLONE)
- if [[ -n "${GIT_DEPTH}" ]]; then
+ if [[ "${GIT_DEPTH}" -gt 0 ]]; then
git_clone_flags="$git_clone_flags --depth $GIT_DEPTH"
fi
diff --git a/lib/sahara b/lib/sahara
index 871833f..995935a 100644
--- a/lib/sahara
+++ b/lib/sahara
@@ -11,6 +11,7 @@
# install_sahara
# install_python_saharaclient
# configure_sahara
+# sahara_register_images
# start_sahara
# stop_sahara
# cleanup_sahara
@@ -164,6 +165,17 @@
fi
}
+# sahara_register_images() - Registers images in sahara image registry
+function sahara_register_images {
+ if is_service_enabled heat && [[ ! -z "$HEAT_CFN_IMAGE_URL" ]]; then
+ # Register heat image for Fake plugin
+ local fake_plugin_properties="--property _sahara_tag_0.1=True"
+ fake_plugin_properties+=" --property _sahara_tag_fake=True"
+ fake_plugin_properties+=" --property _sahara_username=fedora"
+ openstack --os-url $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT image set $(basename "$HEAT_CFN_IMAGE_URL" ".qcow2") $fake_plugin_properties
+ fi
+}
+
# start_sahara() - Start running processes, including screen
function start_sahara {
run_process sahara "$SAHARA_BIN_DIR/sahara-all --config-file $SAHARA_CONF_FILE"
diff --git a/stackrc b/stackrc
index 2568202..2dd56e8 100644
--- a/stackrc
+++ b/stackrc
@@ -697,7 +697,8 @@
LOG_COLOR=$(trueorfalse True LOG_COLOR)
# Set global ``GIT_DEPTH=<number>`` to limit the history depth of the git clone
-GIT_DEPTH=${GIT_DEPTH:-1}
+# Set to 0 to disable shallow cloning
+GIT_DEPTH=${GIT_DEPTH:-0}
# Use native SSL for servers in SSL_ENABLED_SERVICES
USE_SSL=$(trueorfalse False USE_SSL)