Fake plugin can work with heat image. Even more, sahara uses heat
to provision instances. So, registering image in sahara image
registry.
Change-Id: Ie498fc05d0afe7f276b6f29f20a61abb58a5c676
Closes-Bug: #1402856
| ... | ... |
@@ -11,6 +11,7 @@ |
| 11 | 11 |
# install_sahara |
| 12 | 12 |
# install_python_saharaclient |
| 13 | 13 |
# configure_sahara |
| 14 |
+# sahara_register_images |
|
| 14 | 15 |
# start_sahara |
| 15 | 16 |
# stop_sahara |
| 16 | 17 |
# cleanup_sahara |
| ... | ... |
@@ -161,6 +162,17 @@ function install_python_saharaclient {
|
| 161 | 161 |
fi |
| 162 | 162 |
} |
| 163 | 163 |
|
| 164 |
+# sahara_register_images() - Registers images in sahara image registry |
|
| 165 |
+function sahara_register_images {
|
|
| 166 |
+ if is_service_enabled heat && [[ ! -z "$HEAT_CFN_IMAGE_URL" ]]; then |
|
| 167 |
+ # Register heat image for Fake plugin |
|
| 168 |
+ local fake_plugin_properties="--property _sahara_tag_0.1=True" |
|
| 169 |
+ fake_plugin_properties+=" --property _sahara_tag_fake=True" |
|
| 170 |
+ fake_plugin_properties+=" --property _sahara_username=fedora" |
|
| 171 |
+ openstack --os-url $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT image set $(basename "$HEAT_CFN_IMAGE_URL" ".qcow2") $fake_plugin_properties |
|
| 172 |
+ fi |
|
| 173 |
+} |
|
| 174 |
+ |
|
| 164 | 175 |
# start_sahara() - Start running processes, including screen |
| 165 | 176 |
function start_sahara {
|
| 166 | 177 |
run_process sahara "$SAHARA_BIN_DIR/sahara-all --config-file $SAHARA_CONF_FILE" |