#NEWLINE# def parse_args( argvish ) : #NEWLINE# #INDENT# '\n    Build OptionParser and evaluate command line arguments.\n    ' #NEWLINE# parser = optparse . OptionParser ( ) #NEWLINE# parser . add_option ( '-u' , '--id' , type = 'int' , help = 'Device ID' ) #NEWLINE# parser . add_option ( '-r' , '--region' , type = 'int' , help = 'Region' ) #NEWLINE# parser . add_option ( '-z' , '--zone' , type = 'int' , help = 'Zone' ) #NEWLINE# parser . add_option ( '-i' , '--ip' , type = 'string' , help = 'IP address' ) #NEWLINE# parser . add_option ( '-p' , '--port' , type = 'int' , help = 'Port number' ) #NEWLINE# parser . add_option ( '-j' , '--replication-ip' , type = 'string' , help = 'Replication IP address' ) #NEWLINE# parser . add_option ( '-q' , '--replication-port' , type = 'int' , help = 'Replication port number' ) #NEWLINE# parser . add_option ( '-d' , '--device' , type = 'string' , help = 'Device name (e.g. md0, sdb1)' ) #NEWLINE# parser . add_option ( '-w' , '--weight' , type = 'float' , help = 'Device weight' ) #NEWLINE# parser . add_option ( '-m' , '--meta' , type = 'string' , default = '' , help = 'Extra device info (just a string)' ) #NEWLINE# parser . add_option ( '-I' , '--change-ip' , type = 'string' , help = 'IP address for change' ) #NEWLINE# parser . add_option ( '-P' , '--change-port' , type = 'int' , help = 'Port number for change' ) #NEWLINE# parser . add_option ( '-J' , '--change-replication-ip' , type = 'string' , help = 'Replication IP address for change' ) #NEWLINE# parser . add_option ( '-Q' , '--change-replication-port' , type = 'int' , help = 'Replication port number for change' ) #NEWLINE# parser . add_option ( '-D' , '--change-device' , type = 'string' , help = 'Device name (e.g. md0, sdb1) for change' ) #NEWLINE# parser . add_option ( '-M' , '--change-meta' , type = 'string' , default = '' , help = 'Extra device info (just a string) for change' ) #NEWLINE# return parser . parse_args ( argvish )