header="Volume Manager CLI, the available COMMANDS are:"
defcmd_help():
printheader
print
print"createpool add a new pool to the system"
print"modifypool change the allocation algorithm for a pool"
print"destroypool destroy a pool"
print"listpools list all the pools"
print"createvol add volume to a storage server"
print"deletevol delete volume on a storage server"
print"listvol list volume on a storage server"
print"createlun create LUN on a storage server"
print"listlun list LUN on a storage server"
print"destroylun destroy LUN on a storage server"
print"assoclun assoc LUN on a storage server"
print"disassoclun disassoc LUN on a storage server"
print
print"\"cloudvoladm COMMAND --help\" for more information on a specific command"
print
print"Global Options:"
print"--cloudStackMgtSvrIP the IP address of CloudStack Management Server"
print
print"Config file is ~/.cloudvoladmrc, Config options including: "
print"cloudStackMgtSvrIP=Cloudstack Management Server Address, which can be overriden by --cloudStackMgtSvrIP. If neither is provided, localhost is used."
usage="Volume Manager CLI: add a new volume to a storage pool"
addvolParser=OptionParser(usage)
addvolParser.add_option("-i", metavar="server ip", dest="server_ip", help="The IP address of the storage server")
addvolParser.add_option("-u", metavar="username", dest="username", help="username to access the storage server with")
addvolParser.add_option("-w", metavar="password", dest="password", help="the password to access the storage server with")
addvolParser.add_option("-p", dest="pool_name", help="the name of the pool to allocate from")
addvolParser.add_option("-a", dest="aggregate_name", help="the name of aggregate")
addvolParser.add_option("-v", dest="vol_name", help="the name of volume")
addvolParser.add_option("-s", dest="size", help="size in GB eg.1")