[bonfiredemokit] Diff of /virt-cluster/build-storages.rb
Diff of /virt-cluster/build-storages.rb
Parent Directory
| Revision Log
| Patch
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" |
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 |
|
|
|