Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/523#discussion_r96462182
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/core/location/cloud/CloudLocationConfig.java
 ---
    @@ -74,6 +74,9 @@
         public static final ConfigKey<Integer> VM_NAME_MAX_LENGTH = 
ConfigKeys.newIntegerConfigKey(
             "vmNameMaxLength", "Maximum length of VM name", 60);
     
    +    public static final ConfigKey<String> VM_NAME_DISALLOWED_PATTERN = 
ConfigKeys.newStringConfigKey(
    +            "vmNameAllowedChars", "The character pattern to remove from a 
VM name", "[^a-zA-Z0-9\\-_]");
    --- End diff --
    
    Name mismatch - `VM_NAME_DISALLOWED_PATTERN`, `vmNameAllowedChars`. Also 
not obvious it's a regex, figured it out after looking at the default value.
    
    Prefer to have a white-list rather than a black list. I see that's a bit 
tricky to do with regexes. Could iterate through the characters of the string 
and match each one against the regex. wdyt?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to