brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #523: Fix Azure ARM VM names
Date Tue, 17 Jan 2017 17:18:49 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message