Created
June 28, 2011 13:59
-
-
Save nacx/1051183 to your computer and use it in GitHub Desktop.
Massive volume creation in Abiquo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NUM=20 # The number of volumes to create | |
DC=2 # The datacenter where the volumes will be created | |
TIER=1 # The tier where the volumes will be created | |
VDC=4 # The virtual datacenter where the volumes will be created | |
SIZE=100 # The size of the volumes to create in MB | |
LOGIN=admin:xabiquo # The credentials | |
for V in `seq 1 ${NUM}`; do | |
curl "http://localhost/api/cloud/virtualdatacenters/${VDC}/volumes" \ | |
-X POST -u ${LOGIN} -H "Content-type: application/xml" \ | |
-d "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?> | |
<volume> | |
<link href=\"http://localhost/api/admin/datacenters/${DC}/storage/tiers/${TIER}\" rel=\"tier\" title=\"Tier\"/> | |
<name>Volume ${V}</name> | |
<sizeInMB>${SIZE}</sizeInMB> | |
</volume>" | xmlindent -nbe -f | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment