#NEWLINE# def parse( ) : #NEWLINE# #INDENT# '\n    Parse the cli options\n    ' #NEWLINE# parser = optparse . OptionParser ( ) #NEWLINE# parser . add_option ( '-m' , '--minions' , dest = 'minions' , default = 5 , type = 'int' , help = 'The number of minions to make' ) #NEWLINE# parser . add_option ( '-M' , action = 'store_true' , dest = 'master_too' , default = False , help = 'Run a local master and tell the minions to connect to it' ) #NEWLINE# parser . add_option ( '--master' , dest = 'master' , default = 'salt' , help = 'The location of the salt master that this swarm will serve' ) #NEWLINE# parser . add_option ( '--name' , '-n' , dest = 'name' , default = 'ms' , help = 'Give the minions an alternative id prefix, this is used when minions from many systems are being aggregated onto a single master' ) #NEWLINE# parser . add_option ( '--rand-os' , dest = 'rand_os' , default = False , action = 'store_true' , help = 'Each Minion claims a different os grain' ) #NEWLINE# parser . add_option ( '--rand-ver' , dest = 'rand_ver' , default = False , action = 'store_true' , help = 'Each Minion claims a different version grain' ) #NEWLINE# parser . add_option ( '-k' , '--keep-modules' , dest = 'keep' , default = '' , help = 'A comma delimited list of modules to enable' ) #NEWLINE# parser . add_option ( '-f' , '--foreground' , dest = 'foreground' , default = False , action = 'store_true' , help = 'Run the minions with debug output of the swarm going to the terminal' ) #NEWLINE# parser . add_option ( '--no-clean' , action = 'store_true' , default = False , help = "Don't cleanup temporary files/directories" ) #NEWLINE# parser . add_option ( '--root-dir' , dest = 'root_dir' , default = None , help = 'Override the minion root_dir config' ) #NEWLINE# parser . add_option ( '--transport' , dest = 'transport' , default = 'zeromq' , help = 'Declare which transport to use, default is zeromq' ) #NEWLINE# parser . add_option ( '-c' , '--config-dir' , default = '' , help = 'Pass in a configuration directory containing base configuration.' ) #NEWLINE# parser . add_option ( '-u' , '--user' , default = pwd . getpwuid ( os . getuid ( ) ) . pw_name ) #NEWLINE# ( options , _args ) = parser . parse_args ( ) #NEWLINE# opts = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( key , val ) in six . iteritems ( options . __dict__ ) : #NEWLINE# #INDENT# opts [ key ] = val #NEWLINE# #UNINDENT# return opts