jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds/jclouds-labs] JCLOUDS-1231: Implement the SecurityGroupExtension in ARM (#347)
Date Thu, 26 Jan 2017 16:19:46 GMT
nacx commented on this pull request.



> +   AzureComputeSecurityGroupExtension(AzureComputeApi api, @Memoized Supplier<Set<?
extends Location>> locations,
+         Function<NetworkSecurityGroup, SecurityGroup> groupConverter,
+         SecurityGroupAvailablePredicateFactory securityRuleAvailable,
+         @Named(TIMEOUT_RESOURCE_DELETED) Predicate<URI> resourceDeleted,
+         LoadingCache<String, ResourceGroup> resourceGroupMap) {
+      this.api = api;
+      this.locations = locations;
+      this.securityGroupConverter = groupConverter;
+      this.securityGroupAvailable = securityRuleAvailable;
+      this.resourceDeleted = resourceDeleted;
+      this.resourceGroupMap = resourceGroupMap;
+   }
+
+   @Override
+   public Set<SecurityGroup> listSecurityGroups() {
+      return ImmutableSet.copyOf(concat(transform(locations.get(), new Function<Location,
Set<SecurityGroup>>() {

I think it is good to enforce immutability. All the ARM model is immutable. Why should these
collections be different? There are no methods that receive a list of security groups, so
I don't see any value a mutable list could have, so let's try to default to immutable as a
best practice.

-- 
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/347
Mime
View raw message