qualifier : qualifierName
                 | qualifierName ':' flavorList
                 | qualifierName qualifierParameter
                 | qualifierName qualifierParameter ':' flavorList
773953
def p_qualifier(p):
    

    # pylint: disable=too-many-branches
    qname = p[1]
    ns = p.parser.handle.default_namespace
    qval = None
    flavorlist = []
    if len(p) == 3:
        qval = p[2]
    elif len(p) == 4:
        flavorlist = p[3]
    elif len(p) == 5:
        qval = p[2]
        flavorlist = p[4]
    try:
        qualdecl = p.parser.qualcache[ns][qname]
    except KeyError:
        try:
            quals = p.parser.handle.EnumerateQualifiers()
        except CIMError as ce:
            if ce.status_code != CIM_ERR_INVALID_NAMESPACE:
                ce.file_line = (p.parser.file, p.lexer.lineno)
                raise
            if p.parser.verbose:
                p.parser.log(
                    _format("Creating namespace {0!A}", ns))
            p.parser.server.create_namespace(ns)
            quals = None

        if quals:
            for qual in quals:
                p.parser.qualcache[ns][qual.name] = qual
        else:
            for fname in ['qualifiers', 'qualifiers_optional']:
                qualfile = p.parser.mofcomp.find_mof(fname)
                if qualfile:
                    p.parser.mofcomp.compile_file(qualfile, ns)
    try:
        qualdecl = p.parser.qualcache[ns][qname]
    except KeyError:
        ce = CIMError(
            CIM_ERR_FAILED,
            _format("Unknown Qualifier: {0!A}", qname))
        ce.file_line = (p.parser.file, p.lexer.lineno)
        raise ce

    flavors = _build_flavors(p[0], flavorlist, qualdecl)
    if qval is None:
        if qualdecl.type == 'boolean':
            qval = True
        else:
            qval = qualdecl.value  # default value
    else:
        qval = cimvalue(qval, qualdecl.type)
    p[0] = CIMQualifier(qname, qval, type=qualdecl.type, **flavors)
2738
def p_qualifierType_2(p):
    
    dv = None
    if len(p) == 4:
        dv = p[3]
    p[0] = (p[2], False, None, dv)
827731
def cli(env):
    """"""

    vsi = SoftLayer.VSManager(env.client)
    result = vsi.get_create_options()

    table = formatting.KeyValueTable(['name', 'value'])
    table.align['name'] = 'r'
    table.align['value'] = 'l'

    # Datacenters
    datacenters = [dc['template']['datacenter']['name']
                   for dc in result['datacenters']]
    datacenters = sorted(datacenters)

    table.add_row(['datacenter',
                   formatting.listing(datacenters, separator='\n')])

    def _add_flavor_rows(flavor_key, flavor_label, flavor_options):
        flavors = []

        for flavor_option in flavor_options:
            flavor_key_name = utils.lookup(flavor_option, 'flavor', 'keyName')
            if not flavor_key_name.startswith(flavor_key):
                continue

            flavors.append(flavor_key_name)

        if len(flavors) > 0:
            table.add_row(['flavors (%s)' % flavor_label,
                           formatting.listing(flavors, separator='\n')])

    if result.get('flavors', None):
        _add_flavor_rows('B1', 'balanced', result['flavors'])
        _add_flavor_rows('BL1', 'balanced local - hdd', result['flavors'])
        _add_flavor_rows('BL2', 'balanced local - ssd', result['flavors'])
        _add_flavor_rows('C1', 'compute', result['flavors'])
        _add_flavor_rows('M1', 'memory', result['flavors'])
        _add_flavor_rows('AC', 'GPU', result['flavors'])

    # CPUs
    standard_cpus = [int(x['template']['startCpus']) for x in result['processors']
                     if not x['template'].get('dedicatedAccountHostOnlyFlag',
                                              False)
                     and not x['template'].get('dedicatedHost', None)]
    ded_cpus = [int(x['template']['startCpus']) for x in result['processors']
                if x['template'].get('dedicatedAccountHostOnlyFlag', False)]
    ded_host_cpus = [int(x['template']['startCpus']) for x in result['processors']
                     if x['template'].get('dedicatedHost', None)]

    standard_cpus = sorted(standard_cpus)
    table.add_row(['cpus (standard)', formatting.listing(standard_cpus, separator=',')])
    ded_cpus = sorted(ded_cpus)
    table.add_row(['cpus (dedicated)', formatting.listing(ded_cpus, separator=',')])
    ded_host_cpus = sorted(ded_host_cpus)
    table.add_row(['cpus (dedicated host)', formatting.listing(ded_host_cpus, separator=',')])

    # Memory
    memory = [int(m['template']['maxMemory']) for m in result['memory']
              if not m['itemPrice'].get('dedicatedHostInstanceFlag', False)]
    ded_host_memory = [int(m['template']['maxMemory']) for m in result['memory']
                       if m['itemPrice'].get('dedicatedHostInstanceFlag', False)]

    memory = sorted(memory)
    table.add_row(['memory',
                   formatting.listing(memory, separator=',')])

    ded_host_memory = sorted(ded_host_memory)
    table.add_row(['memory (dedicated host)',
                   formatting.listing(ded_host_memory, separator=',')])

    # Operating Systems
    op_sys = [o['template']['operatingSystemReferenceCode'] for o in
              result['operatingSystems']]

    op_sys = sorted(op_sys)
    os_summary = set()

    for operating_system in op_sys:
        os_summary.add(operating_system[0:operating_system.find('_')])

    for summary in sorted(os_summary):
        table.add_row([
            'os (%s)' % summary,
            os.linesep.join(sorted([x for x in op_sys
                                    if x[0:len(summary)] == summary]))
        ])

    # Disk
    local_disks = [x for x in result['blockDevices']
                   if x['template'].get('localDiskFlag', False)
                   and not x['itemPrice'].get('dedicatedHostInstanceFlag',
                                              False)]

    ded_host_local_disks = [x for x in result['blockDevices']
                            if x['template'].get('localDiskFlag', False)
                            and x['itemPrice'].get('dedicatedHostInstanceFlag',
                                                   False)]

    san_disks = [x for x in result['blockDevices']
                 if not x['template'].get('localDiskFlag', False)]

    def add_block_rows(disks, name):
        """Add block rows to the table."""
        simple = {}
        for disk in disks:
            block = disk['template']['blockDevices'][0]
            bid = block['device']

            if bid not in simple:
                simple[bid] = []

            simple[bid].append(str(block['diskImage']['capacity']))

        for label in sorted(simple):
            table.add_row(['%s disk(%s)' % (name, label),
                           formatting.listing(simple[label],
                                              separator=',')])

    add_block_rows(san_disks, 'san')
    add_block_rows(local_disks, 'local')
    add_block_rows(ded_host_local_disks, 'local (dedicated host)')

    # Network
    speeds = []
    ded_host_speeds = []
    for option in result['networkComponents']:
        template = option.get('template', None)
        price = option.get('itemPrice', None)

        if not template or not price \
                or not template.get('networkComponents', None):
            continue

        if not template['networkComponents'][0] \
                or not template['networkComponents'][0].get('maxSpeed', None):
            continue

        max_speed = str(template['networkComponents'][0]['maxSpeed'])
        if price.get('dedicatedHostInstanceFlag', False) \
                and max_speed not in ded_host_speeds:
            ded_host_speeds.append(max_speed)
        elif max_speed not in speeds:
            speeds.append(max_speed)

    speeds = sorted(speeds)
    table.add_row(['nic', formatting.listing(speeds, separator=',')])

    ded_host_speeds = sorted(ded_host_speeds)
    table.add_row(['nic (dedicated host)',
                   formatting.listing(ded_host_speeds, separator=',')])

    env.fout(table)
742423
public static boolean deleteDuplicatedQualfiier(Feature feature, String qualifierName)
	{
		ArrayList<Qualifier> qualifiers = (ArrayList<Qualifier>) feature.getQualifiers(qualifierName);
		Set<String> qualifierValueSet = new HashSet<String>();

		for (Qualifier qual : qualifiers)
		{
			if (qual.getValue() != null)
			{
				if (!qualifierValueSet.add(qual.getValue()))
				{
					feature.removeQualifier(qual);
					return true;
				}
			}

		}
		return false;

	}
407008
public Version with(Qualifier qualifier, int qualifierNumber) {
    this.qualifier = defaultIfNull(qualifier, Qualifier.UNDEFINED);
    this.qualifierNumber = Math.max(qualifierNumber, 0);
    return this;
  }
1359319
function(key, qualifier) {
            return tFunc.qualTrv.call(this, {
                method: "find",
                key: key,
                qualifier: qualifier
            });
        }
138673
def const_name
      components = title.gsub(/\W/,' ').split.collect {|word| word.strip.upcase }
      if @derived_from
        components << HQMF::Counter.instance.next
      end
      components.join '_'
    end
471174
public final void qualifiedName() throws RecognitionException {
		int qualifiedName_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 60) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:583:5: ( Identifier ( '.' Identifier )* )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:583:7: Identifier ( '.' Identifier )*
			{
			match(input,Identifier,FOLLOW_Identifier_in_qualifiedName2123); if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:583:18: ( '.' Identifier )*
			loop83:
			while (true) {
				int alt83=2;
				int LA83_0 = input.LA(1);
				if ( (LA83_0==47) ) {
					alt83=1;
				}

				switch (alt83) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:583:19: '.' Identifier
					{
					match(input,47,FOLLOW_47_in_qualifiedName2126); if (state.failed) return;
					match(input,Identifier,FOLLOW_Identifier_in_qualifiedName2128); if (state.failed) return;
					}
					break;

				default :
					break loop83;
				}
			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 60, qualifiedName_StartIndex); }

		}
	}
1355314
def flavor_list(request):
    """"""
    try:
        return api.nova.flavor_list(request)
    except Exception:
        exceptions.handle(request,
                          _('Unable to retrieve instance flavors.'))
        return []
864826
public static InstanceContext parse( String s ) {

		String name = null, qualifier = null, instancePathOrComponentName = null;
		if( s != null ) {
			Matcher m = Pattern.compile( "(.*)::(.*)::(.*)" ).matcher( s );
			if( m.matches()) {
				name = m.group( 1 ).equals( "null" ) ? null : m.group( 1 );
				qualifier = m.group( 2 ).equals( "null" ) ? null : m.group( 2 );
				instancePathOrComponentName = m.group( 3 ).equals( "null" ) ? null : m.group( 3 );
			}
		}

		return new InstanceContext( name, qualifier, instancePathOrComponentName );
	}
865189
@Override
    public GroupDef group(String name) {
        return new GroupDefImpl(getDescriptorName(), model, model.getOrCreate("group@qualifier=" + name));
    }
1251766
def flavor_absent(name, **kwargs):
    '''
    
    '''
    dry_run = __opts__['test']
    ret = {'name': name, 'result': False, 'comment': '', 'changes': {}}

    try:
        object_list = __salt__['nova.flavor_list'](**kwargs)
        object_id = object_list[name]['id']
    except KeyError:
        object_id = False

    if not object_id:
        ret['result'] = True
        ret['comment'] = 'Flavor "{0}" does not exist.'.format(name)
    else:
        if dry_run:
            ret['result'] = None
            ret['comment'] = 'Flavor "{0}", id: {1}  would be deleted.'.format(name, object_id)
            ret['changes'] = {name: {'old': 'Flavor "{0}", id: {1}  exists.'.format(name, object_id),
                                     'new': ret['comment']}}
        else:
            flavor_delete = __salt__['nova.flavor_delete'](object_id, **kwargs)

            if flavor_delete:
                ret['result'] = True
                ret['comment'] = 'Flavor "{0}", id: {1}  deleted.'.format(name, object_id)
                ret['changes'] = {name: {'old': 'Flavor "{0}", id: {1}  existed.'.format(name, object_id),
                                         'new': ret['comment']}}

    return ret
828605
def qualifiers(self, qualifiers):
        """"""
        # We make sure that the dictionary is a NocaseDict object, and that the
        # property values are CIMQualifier objects:
        # pylint: disable=attribute-defined-outside-init
        self._qualifiers = NocaseDict()
        if qualifiers:
            try:
                # This is used for iterables:
                iterator = qualifiers.items()
            except AttributeError:
                # This is used for dictionaries:
                iterator = qualifiers
            for item in iterator:
                if isinstance(item, CIMQualifier):
                    key = item.name
                    value = item
                elif isinstance(item, tuple):
                    key, value = item
                else:
                    raise TypeError(
                        _format("Input object for qualifiers has invalid item "
                                "in iterable: {0!A}", item))
                self.qualifiers[key] = _cim_qualifier(key, value)
715085
public StatementBuilder withQualifiers(SnakGroup qualifiers) {
		getQualifierList(qualifiers.getProperty()).addAll(qualifiers);
		return getThis();
	}
274671
def name_parts(self):
        """"""

        default = PartialMixin.ANY

        return ([(k, default, True)
                for k, _, _ in PartitionName._name_parts]
                +
                [(k, default, True)
                 for k, _, _ in Name._generated_names]
                )
937636
def sanitize_qualifiers(repos=None, followers=None, language=None):
    '''
    
    '''
    qualifiers = ''

    if repos:
        qualifiers += 'repos:{0} '.format(repos)
        qualifiers = re.sub(r"([+])([=a-zA-Z0-9]+)", r">\2", qualifiers)
        qualifiers = re.sub(r"([-])([=a-zA-Z0-9]+)", r"<\2", qualifiers)

    if followers:
        qualifiers += 'followers:{0} '.format(followers)
        qualifiers = re.sub(r"([+])([=a-zA-Z0-9]+)", r">\2", qualifiers)
        qualifiers = re.sub(r"([-])([=a-zA-Z0-9]+)", r"<\2", qualifiers)

    try:
        if language in ALLOWED_LANGUAGES and not language == '':
            qualifiers += 'language:{0} '.format(language)
        elif language == '':
            qualifiers += ''
        else:
            raise AllowedLanguagesException
    except AllowedLanguagesException as e:
        print(e)

    return qualifiers
1319617
def _init_qualifier_decl(qualifier_decl, qual_repo):
        
        assert qualifier_decl.name not in qual_repo
        if qualifier_decl.tosubclass is None:
            qualifier_decl.tosubclass = True
        if qualifier_decl.overridable is None:
            qualifier_decl.overridable = True
        if qualifier_decl.translatable is None:
            qualifier_decl.translatable = False