Class Grains
- java.lang.Object
-
- com.suse.salt.netapi.datatypes.target.Grains
-
-
Field Summary
Fields Modifier and Type Field Description static charDEFAULT_DELIMITERprotected chardelimiterprotected Stringkeyprotected Ttargetprotected TargetTypetypeprotected Stringvalue
-
Constructor Summary
Constructors Constructor Description Grains(String target)Creates a grains matcherGrains(String target, char delimiter)Creates a grains matcherGrains(String grain, String value)Creates a grains matcherGrains(String grain, String value, char delimiter)Creates a grains matcher
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description chargetDelimiter()StringgetGrain()Deprecated.UseDictionaryTarget.getKey()instead.StringgetKey()Map<String,Object>getProps()TgetTarget()TargetTypegetType()StringgetValue()
-
-
-
Field Detail
-
DEFAULT_DELIMITER
public static final char DEFAULT_DELIMITER
- See Also:
- Constant Field Values
-
key
protected final String key
-
value
protected final String value
-
delimiter
protected final char delimiter
-
target
protected final T target
-
type
protected final TargetType type
-
-
Constructor Detail
-
Grains
public Grains(String target)
Creates a grains matcher- Parameters:
target- the targeting expression
-
Grains
public Grains(String target, char delimiter)
Creates a grains matcher- Parameters:
target- the targeting expressiondelimiter- the character to delimit nesting in the grain name
-
Grains
public Grains(String grain, String value)
Creates a grains matcher- Parameters:
grain- the grain namevalue- the value to match
-
-
Method Detail
-
getGrain
@Deprecated public String getGrain()
Deprecated.UseDictionaryTarget.getKey()instead.- Returns:
- the grain identifier key
-
getKey
public String getKey()
- Returns:
- the grain name of this matcher
-
getValue
public String getValue()
- Returns:
- the value to match the grain
-
getDelimiter
public char getDelimiter()
- Returns:
- the delimiter used by this target
-
getProps
public Map<String,Object> getProps()
- Returns:
- a map of items to include in the API call payload This will include the 'delimiter' key if not using the default delimiter.
-
getTarget
public T getTarget()
-
getType
public TargetType getType()
-
-