Log In | Get Help   
Home My Page Projects Code Snippets Project Openings BonFIRE VCOC Demonstration Kit
Summary Activity SCM Files Wiki
[bonfiredemokit] Diff of /virt-cluster/build-storages.rb
[bonfiredemokit] / virt-cluster / build-storages.rb Repository:
ViewVC logotype

Diff of /virt-cluster/build-storages.rb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1, Mon Aug 27 11:46:35 2012 UTC revision 2, Mon Aug 27 12:34:34 2012 UTC
# Line 3  Line 3 
3  require 'restfully/addons/bonfire'  require 'restfully/addons/bonfire'
4    
5  ##Editable parameters  ##Editable parameters
6  SIZES = "1,2" #Comma separated list of volume sizes in GB  #SIZES = "1,2" #Comma separated list of volume sizes in GB
7    SIZES = "1" #Comma separated list of volume sizes in GB
8  #LOCATION = "de-hlrs"  #LOCATION = "de-hlrs"
9  LOCATION = "fr-inria"  LOCATION = "fr-inria"
10  #LOCATION = "uk-epcc"  #LOCATION = "uk-epcc"
# Line 41  Line 42 
42    def create_volume(session, location, size)    def create_volume(session, location, size)
43      session.logger.info "Deploying volume on #{location['name']}..."      session.logger.info "Deploying volume on #{location['name']}..."
44      return location.storages.find{|storage|      return location.storages.find{|storage|
45        storage['name'] == "volume-#{size}GB-empty"        storage['name'].include?"volume-#{size}GB-empty"
46    } || location.storages.submit(    } || location.storages.submit(
47        :name => "volume-#{size}GB-empty",        :name => "volume-#{size}GB-empty",
48        :size => size*1024,        :size => size*1024,

Legend:
Removed from v.1  
changed lines
  Added in v.2

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge