> @@ -487,4 +496,37 @@ private boolean keyVaultInUse(){
>        return !Strings.isNullOrEmpty(options.getKeyVaultIdAndSecret());
>     }
>  
> +   /**
> +    * Generates a valid storage account
> +    *
> +    * Storage account names must be between 3 and 24 characters in length 
> and may contain numbers and lowercase letters only.
> +    *
> +    * @param name the node name
> +    * @return the storage account name starting from a sanitized name (with 
> only numbers and lowercase letters only ).
> +    * If sanitized name is between 3 and 24 characters, storage account name 
> is equals to sanitized name.
> +    * If sanitized name is less than 3 characters, storage account is 
> sanitized name plus 4 random chars.
> +    * If sanitized name is more than 24 characters, storage account is first 
> 10 chars of sanitized name plus 4 random chars plus last 10 chars of 
> sanitized name.
> +    */
> +   private static String generateStorageAccountName(String name) {

Please, add appropriate unit tests for this method so we don't break it 
unintentionally in the future. Tests should properly test the naming convention 
and the boundaries.

---
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-labs/pull/301/files/a34066c4331d7552669ed4fb005feec2374c442e#r70630490

Reply via email to