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 9, Thu Aug 30 12:48:07 2012 UTC
# Line 1  Line 1 
1    #
2    # BonFIRE Virtual Clusters on Federated Clouds Demonstration Kit
3    #
4    # Copyright (c) Fundacion Centro Tecnologico de Supercomputacion de Galicia 2012
5    #
6    # License GPL Version 3
7    #
8    # The research leading to these results has received funding from
9    # the European Community's Seventh Frameqork Programme (FP7/2007-2013)
10    # under agreement number 257386
11    #
12    # This software is provided with ABSOLUTELY NO WARRANTY
13    #
14  require 'rubygems'  require 'rubygems'
15  require 'restfully'  require 'restfully'
16  require 'restfully/addons/bonfire'  require 'restfully/addons/bonfire'
17    
18  ##Editable parameters  ##Editable parameters
19  SIZES = "1,2" #Comma separated list of volume sizes in GB  #SIZES = "1,2" #Comma separated list of volume sizes in GB
20    SIZES = "1" #Comma separated list of volume sizes in GB
21  #LOCATION = "de-hlrs"  #LOCATION = "de-hlrs"
22  LOCATION = "fr-inria"  LOCATION = "fr-inria"
23  #LOCATION = "uk-epcc"  #LOCATION = "uk-epcc"
# Line 41  Line 55 
55    def create_volume(session, location, size)    def create_volume(session, location, size)
56      session.logger.info "Deploying volume on #{location['name']}..."      session.logger.info "Deploying volume on #{location['name']}..."
57      return location.storages.find{|storage|      return location.storages.find{|storage|
58        storage['name'] == "volume-#{size}GB-empty"        storage['name'].include?"volume-#{size}GB-empty"
59    } || location.storages.submit(    } || location.storages.submit(
60        :name => "volume-#{size}GB-empty",        :name => "volume-#{size}GB-empty",
61        :size => size*1024,        :size => size*1024,

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

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

Powered By FusionForge