--- virt-cluster/build-storages.rb 2012/08/27 11:46:35 1 +++ virt-cluster/build-storages.rb 2012/08/30 12:48:07 9 @@ -1,9 +1,23 @@ +# +# BonFIRE Virtual Clusters on Federated Clouds Demonstration Kit +# +# Copyright (c) Fundacion Centro Tecnologico de Supercomputacion de Galicia 2012 +# +# License GPL Version 3 +# +# The research leading to these results has received funding from +# the European Community's Seventh Frameqork Programme (FP7/2007-2013) +# under agreement number 257386 +# +# This software is provided with ABSOLUTELY NO WARRANTY +# require 'rubygems' require 'restfully' require 'restfully/addons/bonfire' ##Editable parameters -SIZES = "1,2" #Comma separated list of volume sizes in GB +#SIZES = "1,2" #Comma separated list of volume sizes in GB +SIZES = "1" #Comma separated list of volume sizes in GB #LOCATION = "de-hlrs" LOCATION = "fr-inria" #LOCATION = "uk-epcc" @@ -41,7 +55,7 @@ def create_volume(session, location, size) session.logger.info "Deploying volume on #{location['name']}..." return location.storages.find{|storage| - storage['name'] == "volume-#{size}GB-empty" + storage['name'].include?"volume-#{size}GB-empty" } || location.storages.submit( :name => "volume-#{size}GB-empty", :size => size*1024,