def parse():
    parser = optparse.OptionParser()
    parser.add_option(
        '-m',
        '--minions',
        dest='minions',
        default=5,
        type='int',
        help='The number of minions to make')
    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')
    parser.add_option(
        '--master',
        dest='master',
        default='salt',
        help='The location of the salt master that this swarm will serve')
    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'))
    parser.add_option(
        '--rand-os',
        dest='rand_os',
        default=False,
        action='store_true',
        help='Each Minion claims a different os grain')
    parser.add_option(
        '--rand-ver',
        dest='rand_ver',
        default=False,
        action='store_true',
        help='Each Minion claims a different version grain')
    parser.add_option(
        '-k',
        '--keep-modules',
        dest='keep',
        default='',
        help='A comma delimited list of modules to enable')
    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'))
    parser.add_option(
        '--no-clean',
        action='store_true',
        default=False,
        help='Don\'t cleanup temporary files/directories')
    parser.add_option(
        '--root-dir',
        dest='root_dir',
        default=None,
        help='Override the minion root_dir config')
    parser.add_option(
        '--transport',
        dest='transport',
        default='zeromq',
        help='Declare which transport to use, default is zeromq')
    parser.add_option(
        '-c', '--config-dir', default='',
        help=('Pass in a configuration directory containing base configuration.')
        )
    parser.add_option('-u', '--user', default=pwd.getpwuid(os.getuid()).pw_name)

    options, _args = parser.parse_args()

    opts = {}

    for key, val in six.iteritems(options.__dict__):
        opts[key] = val

    return opts
Returns the type, id and option of a configuration object.
dataset/ETHPy150Open saltstack/salt/tests/minionswarm.py/parse--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/syslog_ng.py/_get_type_id_options