jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Chicchiriccò <notificati...@github.com>
Subject Re: [jclouds-labs] [JCLOUDS-850] Providing AzureTemplateBuilderLiveTest (#156)
Date Wed, 01 Apr 2015 09:45:26 GMT
> +
> +   public AzureTemplateBuilderLiveTest() {
> +      super();
> +
> +      provider = "azurecompute";
> +   }
> +
> +   @Override
> +   protected ProviderMetadata createProviderMetadata() {
> +      synchronized (this) {
> +         if (providerMeta == null) {
> +            providerMeta = new AzureComputeProviderMetadata();
> +         }
> +      }
> +      return providerMeta;
> +   }

I could not find any way to fetch the provider metadata once created by base class method
(and I needed it for `getIso3166Codes()`), so I thought the simpler way was to override and
provide a local reference.

BTW This is what I've also seen from [AWSEC2](https://github.com/jclouds/jclouds/blob/acd06b30245c4df27e4e36176916c95df60e42ca/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2TemplateBuilderLiveTest.java#L65)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/156/files#r27556105
Mime
View raw message