Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
Description
This should work:
host=pingguo.local:read-resource
The node name is not a valid identifier 'pingguo.local' or the format is wrong for prefix 'null'
The validation in Util.isValidIdentifier() is limiting things to Character.isJavaIdentifierPart(c[i]) || c[i] == '-'
The org.jboss.as.controller.PathElement class is what validates address elements as we create them from dmr nodes. It uses the following patterns to validate:
/**
- A valid key contains alphanumerics and underscores, cannot start with a number, and cannot start or end with
- {@code -}
.
*/
private static final Pattern VALID_KEY_PATTERN = Pattern.compile("[_a-zA-Z](?:[-_a-zA-Z0-9]*[_a-zA-Z0-9])?");
private static final Pattern VALID_VALUE_PATTERN = Pattern.compile("\\*|[^*
p
p
]+");
Since '=', ':', ',' and '(' have special significance in the CLI there will need to be a mechanism to quote or escape those if used in path element values.