What is a legal name for a cluster/instance/config/node/etc? Looks like it is:
@Pattern(regexp="[\\p{L}\\p{N}_][\\p{L}\\p{N}\\-_./;#]*")
which seems a bit liberal to me, but maybe that's what was allowed in v2.
My questions:
Other then the above annotation, is there an existing method that can
be used to verify a name is legal?
Do we want the ability to exclude some reserved words/names? Some of
the v2 documentation mentions you can use certain reserved words.
Currently the error you get for an illegal name is not very
friendly. Maybe this should be improved:
$ ./asadmin create-cluster @@@@
remote failure: Exception while adding the new configuration
org.jvnet.hk2.config.TransactionFailure: org.jvnet.hk2.config.ValidationException:
Constraints for this bean violated.
Message = configRef must match "[\p{L}\p{N}_][\p{L}\p{N}\-_./;#]*" :
org.jvnet.hk2.config.TransactionFailure: org.jvnet.hk2.config.ValidationException:
Constraints for this bean violated.
Message = configRef must match "[\p{L}\p{N}_][\p{L}\p{N}\-_./;#]*"
org.jvnet.hk2.config.ValidationException: Constraints for this bean violated. Message =
configRef must match "[\p{L}\p{N}_][\p{L}\p{N}\-_./;#]*"