Merge support for creating volumes from glance images.

This commit is contained in:
Adam Gandelman 2013-03-21 14:47:42 -07:00
commit 1a0fe19ed3
4 changed files with 16 additions and 1 deletions

View File

@ -274,6 +274,17 @@ function config_changed() {
save_script_rc ${env_vars[@]}
}
function image-service_changed {
GLANCE_API_SERVER=`relation-get glance-api-server`
if [[ -z $GLANCE_API_SERVER ]] ; then
echo "image-service_changed: GLANCE_API_SERVER not yet set. Exit 0 and retry"
exit 0
fi
set_or_update glance_api_servers $GLANCE_API_SERVER
apt-get -y install qemu-utils
cinder_ctl all restart
}
arg0=$(basename $0)
juju-log "cinder: Attempting to fire hook for: $arg0"
case $arg0 in
@ -292,6 +303,7 @@ case $arg0 in
"cinder-volume-service-relation-changed") exit 0 ;;
"cluster-relation-changed") cluster_changed ;;
"cluster-relation-departed") cluster_changed ;;
"image-service-relation-changed") image-service_changed ;;
"ha-relation-joined") ha_relation_joined ;;
"ha-relation-changed") ha_relation_changed ;;
"upgrade-charm") upgrade_charm ;;

View File

@ -0,0 +1 @@
cinder-hooks

View File

@ -15,6 +15,8 @@ requires:
interface: keystone
ceph:
interface: ceph-client
image-service:
interface: glance
ha:
interface: hacluster
scope: container

View File

@ -1 +1 @@
21
22