You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by fmartelli <no...@github.com> on 2015/04/03 12:23:04 UTC

[jclouds-labs] [JCLOUDS-873] fixed (#161)

You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * [JCLOUDS-873] fixed

-- File Changes --

    M azurecompute/src/main/java/org/jclouds/azurecompute/AzureManagementApiMetadata.java (7)
    M azurecompute/src/main/java/org/jclouds/azurecompute/binders/RuleToXML.java (6)
    M azurecompute/src/main/java/org/jclouds/azurecompute/compute/AzureComputeServiceAdapter.java (37)
    M azurecompute/src/main/java/org/jclouds/azurecompute/compute/config/AzureComputeServiceContextModule.java (43)
    M azurecompute/src/main/java/org/jclouds/azurecompute/compute/extensions/AzureComputeSecurityGroupExtension.java (128)
    M azurecompute/src/main/java/org/jclouds/azurecompute/compute/strategy/GetOrCreateStorageServiceAndVirtualNetworkThenCreateNodes.java (2)
    M azurecompute/src/main/java/org/jclouds/azurecompute/domain/NetworkSecurityGroup.java (39)
    M azurecompute/src/main/java/org/jclouds/azurecompute/domain/Rule.java (96)
    M azurecompute/src/main/java/org/jclouds/azurecompute/domain/StorageService.java (2)
    M azurecompute/src/main/java/org/jclouds/azurecompute/features/NetworkSecurityGroupApi.java (92)
    M azurecompute/src/main/java/org/jclouds/azurecompute/util/ConflictManagementPredicate.java (185)
    M azurecompute/src/main/java/org/jclouds/azurecompute/xml/NetworkSecurityGroupHandler.java (7)
    M azurecompute/src/main/java/org/jclouds/azurecompute/xml/RuleHandler.java (20)
    M azurecompute/src/test/java/org/jclouds/azurecompute/compute/AzureComputeServiceAdapterLiveTest.java (17)
    M azurecompute/src/test/java/org/jclouds/azurecompute/compute/AzureComputeServiceContextLiveTest.java (34)
    M azurecompute/src/test/java/org/jclouds/azurecompute/features/AffinityGroupApiLiveTest.java (4)
    M azurecompute/src/test/java/org/jclouds/azurecompute/features/DeploymentApiLiveTest.java (12)
    A azurecompute/src/test/java/org/jclouds/azurecompute/features/NetworkSecurityGroupApiLiveTest.java (226)
    A azurecompute/src/test/java/org/jclouds/azurecompute/features/NetworkSecurityGroupApiMockTest.java (180)
    M azurecompute/src/test/java/org/jclouds/azurecompute/features/TrafficManagerApiLiveTest.java (10)
    M azurecompute/src/test/java/org/jclouds/azurecompute/features/VirtualMachineApiLiveTest.java (46)
    M azurecompute/src/test/java/org/jclouds/azurecompute/features/VirtualNetworkApiLiveTest.java (15)
    M azurecompute/src/test/java/org/jclouds/azurecompute/internal/AbstractAzureComputeApiLiveTest.java (9)
    M azurecompute/src/test/java/org/jclouds/azurecompute/internal/BaseAzureComputeApiLiveTest.java (31)
    A azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListNetworkSecurityGroupsHandlerTest.java (47)
    M azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkSecurityGroupHandlerTest.java (68)
    M azurecompute/src/test/resources/networksecuritygroup.xml (98)
    A azurecompute/src/test/resources/networksecuritygroupforsubnet.xml (4)
    A azurecompute/src/test/resources/networksecuritygroupfulldetails.xml (97)
    A azurecompute/src/test/resources/networksecuritygroups.xml (12)

-- Patch Links --

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161

Re: [jclouds-labs] [JCLOUDS-873] fixed (#161)

Posted by fmartelli <no...@github.com>.
@nacx, I'm missing why you are referencing #161 from #163.
#161 is completed and ready to be reviewed/merged. Please let me know if you need something more.

Thanks.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161#issuecomment-91239724

Re: [jclouds-labs] [JCLOUDS-873] fixed (#161)

Posted by fmartelli <no...@github.com>.
Hi @nacx, I'm working o this issue. Live tests take more then 1h and 30m .... stay tuned.
Thanks.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161#issuecomment-91128546

Re: [jclouds-labs] [JCLOUDS-873] fixed (#161)

Posted by Ignasi Barrera <no...@github.com>.
> +                 "*",
> +                 "192.168.0.1",
> +                 "80",
> +                 Rule.Protocol.TCP
> +         )), "request-1");
> +
> +         assertSent(server, "PUT", "/services/networking/networksecuritygroups/mygroup/rules/myrule");
> +      } finally {
> +         server.shutdown();
> +      }
> +   }
> +
> +   private NetworkSecurityGroupApi networkSecurityGroupApi(final MockWebServer server) {
> +      return api(server.getUrl("/")).getNetworkSecurityGroupApi();
> +   }
> +}

Add the mock tests that exercise the defined fallbacks.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161/files#r28064957

Re: [jclouds-labs] [JCLOUDS-873] fixed (#161)

Posted by fmartelli <no...@github.com>.
@nacx, just rebased again on the latest commit.
Any news?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161#issuecomment-92271501

Re: [jclouds-labs] [JCLOUDS-873] fixed (#161)

Posted by fmartelli <no...@github.com>.
exactly: it has been required to manage conflict errors (http status code 409)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161#issuecomment-91248188

Re: [jclouds-labs] [JCLOUDS-873] fixed (#161)

Posted by Ignasi Barrera <no...@github.com>.
Thanks! Just waiting for the tests mentioned in https://github.com/jclouds/jclouds-labs/pull/161#discussion_r28064957.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161#issuecomment-92280818

Re: [jclouds-labs] [JCLOUDS-873] fixed (#161)

Posted by fmartelli <no...@github.com>.
Rebased on 11ae78af457c298f4d4771c8a4326551c13c401c.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161#issuecomment-91253904

Re: [jclouds-labs] [JCLOUDS-873] fixed (#161)

Posted by Ignasi Barrera <no...@github.com>.
Oh, apologies. I didn't notice both refer to a different issue and though 163 was this one rebased. I didn't look at the content of the commits. Will review it now :)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161#issuecomment-91241029

Re: [jclouds-labs] [JCLOUDS-873] fixed (#161)

Posted by Ignasi Barrera <no...@github.com>.
Hi @fmartelli!
Now that the other Azure PRs have been merged, could you rebase this one so it only contains the commits that are relevant to the JIRA issue? I look forward to having a look at this and merging it!
Thanks!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161#issuecomment-91044296

Re: [jclouds-labs] [JCLOUDS-873] fixed (#161)

Posted by fmartelli <no...@github.com>.
Hi @nacx, I've just pushed the rebase  and the squash into just one commit.

Please, consider that the commit includes all required changes for this issue: 
1. completes Network Security Group API implementation and adds mock and live tests
2. fix test conflicts inherited from several rebases
3. add a required improvement of ConflictManagementPredicate

Thank you for your support.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161#issuecomment-91132943

Re: [jclouds-labs] [JCLOUDS-873] fixed (#161)

Posted by Ignasi Barrera <no...@github.com>.
> +              getNetworkSecurityGroupAppliedToSubnet(VIRTUAL_NETWORK_NAME, DEFAULT_SUBNET_NAME);
> +      assertEquals(group.state(), NetworkSecurityGroup.State.CREATED);
> +   }
> +
> +   @Test(dependsOnMethods = {"getForSubnet"})
> +   public void removeFromSubnet() {
> +      assertTrue(new ConflictManagementPredicate(api) {
> +
> +         @Override
> +         protected String operation() {
> +            return api().removeFromSubnet(VIRTUAL_NETWORK_NAME, DEFAULT_SUBNET_NAME, GROUP1);
> +         }
> +      }.apply(GROUP1));
> +   }
> +
> +   @AfterClass

Use `@AfterClass(alwaysRun = true)`

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161/files#r28064849

Re: [jclouds-labs] [JCLOUDS-873] fixed (#161)

Posted by fmartelli <no...@github.com>.
@nacx, @andreaturli could you review this PR?

The PR has been rebased on the current latest commit (aac957447270e6bc78d62de628cfb539add5045f).

Mock and live tests for network security group operations have been provided.
Several changes have been required both to improve/fix live tests and to include recently merged PRs.
 
All the changes have been squashed in a single commit.

Thank you for your support.
Regards.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161#issuecomment-89250291

Re: [jclouds-labs] [JCLOUDS-873] fixed (#161)

Posted by Ignasi Barrera <no...@github.com>.
Just a couple of comments, but it looks good! Thanks @fmartelli!

Just to be sure: the ConflictManagement predicate is basically used to deal with the Azure operations that block the resources error and wait until the API allows the new incoming operations, right?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161#issuecomment-91245957

Re: [jclouds-labs] [JCLOUDS-873] fixed (#161)

Posted by fmartelli <no...@github.com>.
@nacx, I'm sorry for the mistake.
I've just pushed the fix requested by you.
Thanks.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161#issuecomment-92289213

Re: [jclouds-labs] [JCLOUDS-873] fixed (#161)

Posted by Ignasi Barrera <no...@github.com>.
Squashed and pushed to [master](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/29435e1c) and [1.9.x](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/2b69bed1). Thanks @fmartelli!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/161#issuecomment-92293178