Skip to content

Commit 222ff80

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Register heat image in sahara image registry for fake plugin"
2 parents 4f15407 + b313048 commit 222ff80

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

extras.d/70-sahara.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ if is_service_enabled sahara; then
1515
create_sahara_accounts
1616
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
1717
echo_summary "Initializing sahara"
18+
sahara_register_images
1819
start_sahara
1920
fi
2021

lib/sahara

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# install_sahara
1212
# install_python_saharaclient
1313
# configure_sahara
14+
# sahara_register_images
1415
# start_sahara
1516
# stop_sahara
1617
# cleanup_sahara
@@ -164,6 +165,17 @@ function install_python_saharaclient {
164165
fi
165166
}
166167

168+
# sahara_register_images() - Registers images in sahara image registry
169+
function sahara_register_images {
170+
if is_service_enabled heat && [[ ! -z "$HEAT_CFN_IMAGE_URL" ]]; then
171+
# Register heat image for Fake plugin
172+
local fake_plugin_properties="--property _sahara_tag_0.1=True"
173+
fake_plugin_properties+=" --property _sahara_tag_fake=True"
174+
fake_plugin_properties+=" --property _sahara_username=fedora"
175+
openstack --os-url $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT image set $(basename "$HEAT_CFN_IMAGE_URL" ".qcow2") $fake_plugin_properties
176+
fi
177+
}
178+
167179
# start_sahara() - Start running processes, including screen
168180
function start_sahara {
169181
run_process sahara "$SAHARA_BIN_DIR/sahara-all --config-file $SAHARA_CONF_FILE"

0 commit comments

Comments
 (0)