Re: [jclouds/jclouds] Adds new more relaxed validator for Azure entities (#1213)

2018-05-29 Thread Daniel Estévez
Thanks for the suggestions @demobox, PR was already merged but i added those improvements here https://github.com/jclouds/jclouds/pull/1215 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [jclouds/jclouds] Adds new more relaxed validator for Azure entities (#1213)

2018-05-26 Thread Andrew Phillips
demobox commented on this pull request. > + */ +@Singleton +public class AzureNameValidator extends Validator { + private final int min = 2; + private final int max = 63; + + public void validate(String name) { + + if (name == null || name.length() < min || name.length() > max) +

Re: [jclouds/jclouds] Adds new more relaxed validator for Azure entities (#1213)

2018-05-26 Thread Andrew Phillips
demobox commented on this pull request. > +/** + * Validates name for azure entities + * https://docs.microsoft.com/en-us/azure/architecture/best-practices/naming-conventions + * + * @see org.jclouds.predicates.Validator + */ +@Singleton +public class AzureNameValidator extends Validator { +

Re: [jclouds/jclouds] Adds new more relaxed validator for Azure entities (#1213)

2018-05-26 Thread Andrew Phillips
demobox commented on this pull request. > + +import org.jclouds.predicates.Validator; + +import com.google.common.base.CharMatcher; +import com.google.inject.Singleton; + +/** + * Validates name for azure entities + *

Re: [jclouds/jclouds] Adds new more relaxed validator for Azure entities (#1213)

2018-05-25 Thread Ignasi Barrera
Pushed to master and 2.1.x. Thanks! -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/1213#issuecomment-391969708

Re: [jclouds/jclouds] Adds new more relaxed validator for Azure entities (#1213)

2018-05-25 Thread Ignasi Barrera
Closed #1213. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/1213#event-1646000469

Re: [jclouds/jclouds] Adds new more relaxed validator for Azure entities (#1213)

2018-05-25 Thread Ignasi Barrera
nacx approved this pull request. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/1213#pullrequestreview-123270045

Re: [jclouds/jclouds] Adds new more relaxed validator for Azure entities (#1213)

2018-05-24 Thread Daniel Estévez
Added a test! (and fixed an error message by the way) with all the main cases i could think of @nacx Also, i added this class under _org.jclouds.azurecompute.arm.config.*_ not sure if it's the best place so feel free to suggest any other one -- You are receiving this because you are

Re: [jclouds/jclouds] Adds new more relaxed validator for Azure entities (#1213)

2018-05-23 Thread Ignasi Barrera
Please add unit tests that verify the validator and test the corner cases. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/1213#issuecomment-391515264

[jclouds/jclouds] Adds new more relaxed validator for Azure entities (#1213)

2018-05-23 Thread Daniel Estévez
You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds/pull/1213 -- Commit Summary -- * Adds new more relaxed validator for Azure entities -- File Changes -- A