jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject [jclouds/jclouds-labs] JCLOUDS-1273: Support multiple resource groups in ARM (#385)
Date Mon, 24 Apr 2017 14:47:53 GMT
https://issues.apache.org/jira/browse/JCLOUDS-1273

The compute service live tests pass (there is one transient failure unrelated to this change):

```bash
Failed tests: 
  AzureComputeServiceLiveTest>BaseComputeServiceLiveTest.testOptionToNotBlock:870 duration(37)
longer than expected(30) seconds! 

Tests run: 27, Failures: 1, Errors: 0, Skipped: 0
Total time: 01:10 h (Wall Clock)
```

I still have some manual tests pending to make sure everything works as expected, but I'm
submitting this for early feedback. The changes in this PR are:

* Added helper methods to the `IdReference` class to extract the resource group and name from
the object's URI. This helps hen getting resources by id and to build the APIs pointing to
the right resource group (not the default one for the location).
* Methods that list resources (listNodes, listSecurityGroups, etc) have been changed to consider
all existing resource groups.
* All transformation functions take into account the resource group of the current object
instead of the default one (this was the root cause of the linked issue).
* The `resourceGroupMap` has been renamed to `defaultResourceGroup` and its usage has been
removed from all classes. The only class using it is the SecurityGroupExtension, since there
is no mean to specify the resource group where the security group should be created. They
are created in the default one when using the extension.
* A `resourceGroup` method has been added to the `AzureTemplateOptions` to let users configure
the resource group where all stuff will be created when creating nodes.

@andreaturli @danielestevez feedback and tests welcome!
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds-labs/pull/385

-- Commit Summary --

  * JCLOUDS-1273: Support multiple resource groups in ARM

-- File Changes --

    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/AzureComputeApi.java (8)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/AzureComputeService.java
(15)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/AzureComputeServiceAdapter.java
(88)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/config/AzureComputeServiceContextModule.java
(18)
    R azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/domain/LocationAndName.java
(22)
    A azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/domain/ResourceGroupAndName.java
(50)
    R azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/domain/ResourceGroupAndNameAndIngressRules.java
(33)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeImageExtension.java
(39)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtension.java
(100)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/CustomImageToVMImage.java
(4)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/NetworkSecurityGroupToSecurityGroup.java
(7)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/TemplateToAvailabilitySet.java
(8)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VMHardwareToHardware.java
(20)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VMImageToImage.java
(25)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VirtualMachineToNodeMetadata.java
(50)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VirtualMachineToStatus.java
(11)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/loaders/CreateSecurityGroupIfNeeded.java
(15)
    R azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/loaders/DefaultResourceGroup.java
(6)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/options/AzureTemplateOptions.java
(78)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CleanupResources.java
(79)
    R azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CreateResourcesThenCreateNodes.java
(76)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/IdReference.java
(39)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMHardware.java (11)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VMImage.java (8)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/JobApi.java (2)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/util/VMImages.java (2)
    M azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/AzureComputeServiceLiveTest.java
(29)
    M azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/AzureTemplateBuilderLiveTest.java
(2)
    M azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeImageExtensionLiveTest.java
(24)
    M azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtensionLiveTest.java
(40)
    A azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/domain/IdReferenceTest.java
(62)
    M azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ImageApiLiveTest.java
(30)
    M azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiLiveTest.java
(50)
    M azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/internal/AzureLiveTestUtils.java
(10)
    M azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/internal/BaseAzureComputeApiLiveTest.java
(2)

-- Patch Links --

https://github.com/jclouds/jclouds-labs/pull/385.patch
https://github.com/jclouds/jclouds-labs/pull/385.diff

-- 
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/385

Mime
View raw message