Return an hash of possible options to settle the ambiguity
194752
def app_options
      if ambiguous?
        hash = {}
        @global_options.each_with_index do |option, i|
          hash[i] = option['name'] || option['root']
        end
        hash
      else
        {}
      end
    end
755109
def _get_options(ret=None):
    '''
    
    '''
    defaults = {'host': 'salt',
                'user': 'salt',
                'pass': 'salt',
                'db': 'salt',
                'port': 3306,
                'ssl_ca': None,
                'ssl_cert': None,
                'ssl_key': None}

    attrs = {'host': 'host',
             'user': 'user',
             'pass': 'pass',
             'db': 'db',
             'port': 'port',
             'ssl_ca': 'ssl_ca',
             'ssl_cert': 'ssl_cert',
             'ssl_key': 'ssl_key'}

    _options = salt.returners.get_returner_options(__virtualname__,
                                                   ret,
                                                   attrs,
                                                   __salt__=__salt__,
                                                   __opts__=__opts__,
                                                   defaults=defaults)
    # post processing
    for k, v in six.iteritems(_options):
        if isinstance(v, six.string_types) and v.lower() == 'none':
            # Ensure 'None' is rendered as None
            _options[k] = None
        if k == 'port':
            # Ensure port is an int
            _options[k] = int(v)

    return _options
779284
def convert_options(opts)
      converted = {}

      opts.each_pair do |name, value|
        if /_/ =~ name
          name = name.to_s.gsub(/_\w/) { |i| i.delete("_").upcase }.to_sym
        end
        value = convert_options(value) if value.is_a? Hash
        converted[name] = value
      end

      converted
    end
1298746
def get_option_choices(opt_name, opt_value, default_value, all_choices):
    

    choices = []
    if isinstance(opt_value, six.string_types):
        choices = [opt_value]
    elif isinstance(opt_value, (list, tuple)):
        choices = list(opt_value)
    elif opt_value is None:
        choices = default_value
    else:
        raise InvalidOption('Option %s has invalid'
                            ' value: %s' % (opt_name, opt_value))
    if 'all' in choices:
        choices = all_choices
    for item in choices:
        if item not in all_choices:
            raise InvalidOption('Choices of option %s contains invalid'
                                ' item: %s' % (opt_name, item))
    return choices
631514
def _normalize_options(options):
    """"""
    normalized_options = {}
    for key, value in iteritems(options):
        optname = str(key).lower()
        intname = INTERNAL_URI_OPTION_NAME_MAP.get(optname, key)
        normalized_options[intname] = options[key]
    return normalized_options
1193178
def option(self, key=None):
        
        if key is None:
            return self._args.options()

        return self._args.option(key)
511075
def _fetch_options(self, merge):
        """"""
        cmd = tuple()
        for option in FETCH_DEFAULTS:
            value = merge.get(option, self.defaults.get(option))
            if value:
                cmd += ("--%s" % option, str(value))
        return cmd
1073245
def options
      VALID_OPTION_KEYS.inject({}) do |option, key|
        option.merge!(key => send(key))
      end
    end
590181
def extract_options(names)
      options = {}
      options = names.pop if names.last.kind_of? Hash
      options = { :desc => @next_desc, 
                  :long_desc => @next_long_desc,
                  :default_value => @next_default_value,
                  :arg_name => @next_arg_name}.merge(options)
    end
1256165
def _parse_multi_options(options, split_token=','):
    
    """
    if options:
        return [o.strip() for o in options.split(split_token) if o.strip()]
    else:
        return options
1024503
def _select_options(self, options, keys, invert=False):
        
        options = self._merge_options(options)
        result = {}
        for key in options:
            if (invert and key not in keys) or (not invert and key in keys):
                result[key] = options[key]
        return result
1037111
function() {
      var options = [];
      Object.keys(_definition).forEach((key, i, list) => {
        if(options.indexOf(_definition[key]) == -1) {
          options.push(_definition[key]);
        }
      });
      return options;
    }
1208953
def options(cls):
        """"""
        return {k: v for k, v in cls.__dict__.items() if isinstance(v, Option)}
600290
def getoptlist(self, p):
        """"""
        optlist = []
        for k, v in self.pairs:
            if k == p:
                optlist.append(v)
        return optlist
451087
def options=(options)
      fail ArgumentError, 'options must be a Hash. ' \
                          "#{ options.inspect } given." unless options.is_a?(Hash)

      @options.merge! options

      build_query
    end
1300871
def options(cls):
        """"""
        return sorted((value, name) for (name, value) in cls.__dict__.items() if not name.startswith('__'))
865584
def options_match?(request)
      (options ? options.all?{ |k,v| request.original_options[k] == v || request.options[k] == v } : true)
    end