#!/bin/bash LOG_ROOT="/var/log/fuel-plugin-xenserver/" mkdir -p $LOG_ROOT LOG_FILE=$LOG_ROOT"controller_post_deployment.log" function clear_images { for ID in $(glance image-list | awk 'NR>2{print $2}' | grep -v '^$'); do glance image-delete $ID &>> $LOG_FILE done } function create_image { local image_name image_name="$1" local vm_mode vm_mode="$2" local image_file image_file="$3" if ! glance image-list | grep -q "$image_name"; then glance image-create \ --name "$image_name" \ --container-format ovf \ --disk-format vhd \ --property vm_mode="$vm_mode" \ --visibility public \ --file "$image_file" \ &>> $LOG_FILE fi } function mod_novnc { local public_ip public_ip=$(python - < /etc/nova/nova-compute.conf <> $LOG_FILE mod_novnc