You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by jasminSPC <no...@github.com> on 2015/02/25 01:47:33 UTC

[jclouds-labs] JClouds ProfitBricks provider - Snapshot API Vol.2 (#138)

Here is the repeated PR for Profitbricks Snapshot API.

Can you please close the previous one https://github.com/jclouds/jclouds-labs/pull/136
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * JClouds ProfitBricks provider - Snapshot API

-- File Changes --

    M profitbricks/src/main/java/org/jclouds/profitbricks/ProfitBricksApi.java (6)
    A profitbricks/src/main/java/org/jclouds/profitbricks/binder/snapshot/CreateSnapshotRequestBinder.java (44)
    A profitbricks/src/main/java/org/jclouds/profitbricks/binder/snapshot/RollbackSnapshotRequestBinder.java (43)
    A profitbricks/src/main/java/org/jclouds/profitbricks/binder/snapshot/UpdateSnapshotRequestBinder.java (53)
    M profitbricks/src/main/java/org/jclouds/profitbricks/compute/internal/ProvisioningStatusAware.java (5)
    M profitbricks/src/main/java/org/jclouds/profitbricks/compute/internal/ProvisioningStatusPollingPredicate.java (23)
    A profitbricks/src/main/java/org/jclouds/profitbricks/domain/Snapshot.java (432)
    A profitbricks/src/main/java/org/jclouds/profitbricks/features/SnapshotApi.java (87)
    A profitbricks/src/main/java/org/jclouds/profitbricks/http/parser/snapshot/BaseSnapshotResponseHandler.java (83)
    A profitbricks/src/main/java/org/jclouds/profitbricks/http/parser/snapshot/SnapshotListResponseHandler.java (52)
    A profitbricks/src/main/java/org/jclouds/profitbricks/http/parser/snapshot/SnapshotResponseHandler.java (48)
    A profitbricks/src/test/java/org/jclouds/profitbricks/binder/snapshot/CreateSnapshotRequestBinderTest.java (47)
    A profitbricks/src/test/java/org/jclouds/profitbricks/binder/snapshot/RollbackSnapshotRequestBinderTest.java (47)
    A profitbricks/src/test/java/org/jclouds/profitbricks/binder/snapshot/UpdateSnapshotRequestBinderTest.java (60)
    M profitbricks/src/test/java/org/jclouds/profitbricks/compute/internal/ProvisioningStatusPollingPredicateTest.java (33)
    M profitbricks/src/test/java/org/jclouds/profitbricks/features/ServerApiLiveTest.java (3)
    M profitbricks/src/test/java/org/jclouds/profitbricks/features/ServerApiMockTest.java (262)
    A profitbricks/src/test/java/org/jclouds/profitbricks/features/SnapshotApiLiveTest.java (132)
    A profitbricks/src/test/java/org/jclouds/profitbricks/features/SnapshotApiMockTest.java (262)
    A profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/snapshot/SnapshotListResponseHandlerTest.java (100)
    A profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/snapshot/SnapshotResponseHandlerTest.java (76)
    A profitbricks/src/test/resources/snapshot/snapshot-create.xml (11)
    A profitbricks/src/test/resources/snapshot/snapshot-delete.xml (10)
    A profitbricks/src/test/resources/snapshot/snapshot-rollback.xml (12)
    A profitbricks/src/test/resources/snapshot/snapshot-state-inprocess.xml (27)
    A profitbricks/src/test/resources/snapshot/snapshot-update.xml (10)
    A profitbricks/src/test/resources/snapshot/snapshot.xml (27)
    A profitbricks/src/test/resources/snapshot/snapshots.xml (47)

-- Patch Links --

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

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

Re: [jclouds-labs] JClouds ProfitBricks provider - Snapshot API Vol.2 (#138)

Posted by Ignasi Barrera <no...@github.com>.
This looks good now, but apart from the last comment, there are several things that must be changed:

* The `SnapshotApiMockTest` is again in windows format.
* The `SnapshotApiLiveTest` is again in windows format.
* Remove the `ServerApiLiveTest` from this PR, as it is not related to this PR and only changes spaces by tabs (which is against the jclouds style guide).
* Remove the `ServerApiMockTest` from this PR, as it is not related to this PR and only changes spaces by tabs (which is against the jclouds style guide).

Please, fix this and the inline comment, in a new commit in the PR. I'll take care of squashing before merging.

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

Re: [jclouds-labs] JClouds ProfitBricks provider - Snapshot API Vol.2 (#138)

Posted by jasminSPC <no...@github.com>.
I'm done with this. 

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

Re: [jclouds-labs] JClouds ProfitBricks provider - Snapshot API Vol.2 (#138)

Posted by Ignasi Barrera <no...@github.com>.
I think you misunderstood what I wanted to say (apologies if I didn't explain it properly). I said to remove the ServerApi mock and live tests from the PR, because they contained only formatting changes not related to this PR, but I didn't pretend to say "remove the files from the code". This PR now removes the files, but we want them. I just wanted to say: "undo the accidental changes that have been made to those files".

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

Re: [jclouds-labs] JClouds ProfitBricks provider - Snapshot API Vol.2 (#138)

Posted by Ignasi Barrera <no...@github.com>.
> +   public void testCreateSnapshot() {
> +      Snapshot snapshot = api.snapshotApi().createSnapshot(Snapshot.Request.CreatePayload.create(storageId, "my description", "test snapshot"));
> +
> +      assertNotNull(snapshot);
> +
> +      snapshotWaitingPredicate.apply(snapshot.id());
> +
> +      snapshotId = snapshot.id();
> +   }
> +
> +   @Test
> +   public void testGetAllSnapshots() {
> +      List<Snapshot> snapshots = api.snapshotApi().getAllSnapshots();
> +
> +      assertNotNull(snapshots);
> +      assertTrue(snapshots.size() > 0);

This can fail if this test is executed *before* the `testCreateSnapshot`. Configure the test dependency properly.

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