You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Andrew Bayer <no...@github.com> on 2013/08/01 20:36:15 UTC
[jclouds] Removed async from cloudsigma (#86)
You can merge this Pull Request by running:
git pull https://github.com/abayer/jclouds-1 deasync-cloudsigma
Or you can view, comment on it, or merge it online at:
https://github.com/jclouds/jclouds/pull/86
-- Commit Summary --
* Removed async from cloudsigma
-- File Changes --
R apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/CloudSigmaApi.java (248)
M apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/CloudSigmaApiMetadata.java (21)
D apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/CloudSigmaClient.java (304)
M apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/compute/CloudSigmaComputeServiceAdapter.java (9)
M apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/compute/config/CloudSigmaComputeServiceContextModule.java (6)
M apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/config/CloudSigmaRestClientModule.java (7)
M apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/predicates/DriveClaimed.java (6)
M apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/util/Servers.java (3)
R apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/CloudSigmaApiTest.java (72)
M apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/CloudSigmaClientLiveTest.java (6)
M providers/cloudsigma-zrh/src/test/java/org/jclouds/cloudsigma/compute/CloudSigmaZurichComputeServiceLiveTest.java (6)
-- Patch Links --
https://github.com/jclouds/jclouds/pull/86.patch
https://github.com/jclouds/jclouds/pull/86.diff
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by Andrew Bayer <no...@github.com>.
> @@ -62,8 +61,7 @@ public void testStartNodeWithSSD() throws RunNodesException {
> Set<? extends NodeMetadata> nodes = client.createNodesInGroup(group, 1, template);
> NodeMetadata node = get(nodes, 0);
>
> - CloudSigmaClient api = CloudSigmaClient.class.cast(client.getContext().unwrap(
> - CloudSigmaApiMetadata.CONTEXT_TOKEN).getApi());
> + CloudSigmaApi api = CloudSigmaApi.class.cast(client.getContext());
And fixed. Thanks!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86/files#r5557311
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by Andrew Bayer <no...@github.com>.
Pushed to master.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86#issuecomment-22011157
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #94](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/94/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86#issuecomment-21965950
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by Andrew Phillips <no...@github.com>.
> @@ -85,7 +84,7 @@ public boolean apply(DriveInfo drive) {
> }
>
> });
> - private final CloudSigmaClient client;
> + private final CloudSigmaApi client;
As with the other de-async commits: variable name is still `client`.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86/files#r5556062
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by Andrew Phillips <no...@github.com>.
Only one potentially blocking question regarding `CloudSigmaZurichComputeServiceLiveTest.java` changes.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86#issuecomment-22015594
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by Andrew Phillips <no...@github.com>.
> import com.google.common.util.concurrent.Futures;
> import com.google.common.util.concurrent.ListenableFuture;
> import com.google.common.util.concurrent.ListeningExecutorService;
> import com.google.common.util.concurrent.UncheckedExecutionException;
>
> /**
> - * defines the connection between the {@link CloudSigmaClient} implementation
> + * defines the connection between the {@link org.jclouds.cloudsigma.CloudSigmaApi} implementation
Absolute package name needed?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86/files#r5556055
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by Andrew Bayer <no...@github.com>.
Reopened #86.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by Andrew Bayer <no...@github.com>.
> @@ -62,8 +61,7 @@ public void testStartNodeWithSSD() throws RunNodesException {
> Set<? extends NodeMetadata> nodes = client.createNodesInGroup(group, 1, template);
> NodeMetadata node = get(nodes, 0);
>
> - CloudSigmaClient api = CloudSigmaClient.class.cast(client.getContext().unwrap(
> - CloudSigmaApiMetadata.CONTEXT_TOKEN).getApi());
> + CloudSigmaApi api = CloudSigmaApi.class.cast(client.getContext());
I had weird problems with that one. Let me play around.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86/files#r5557260
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by Andrew Bayer <no...@github.com>.
Closed #86.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #549](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/549/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86#issuecomment-21965172
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by Andrew Phillips <no...@github.com>.
> @@ -60,7 +60,7 @@
> import com.google.inject.Guice;
>
> /**
> - * Tests behavior of {@code CloudSigmaClient}
> + * Tests behavior of {@code CloudSigmaApi}
Rename file to `CloudSigmaApiLiveTest`?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86/files#r5556093
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #546](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/546/) FAILURE
Looks like there's a problem with this pull request
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86#issuecomment-21960289
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by Andrew Phillips <no...@github.com>.
> */
> @POST
> @ResponseParser(KeyValuesDelimitedByBlankLinesToDriveInfo.class)
> @Path("/drives/{uuid}/clone")
> @MapBinder(BindCloneDriveOptionsToPlainTextString.class)
> - ListenableFuture<DriveInfo> cloneDrive(@PathParam("uuid") String sourceUuid, @PayloadParam("name") String newName,
> - CloneDriveOptions... options);
> + DriveInfo cloneDrive(@PathParam("uuid") String sourceUuid, @PayloadParam("name") String newName,
> + CloneDriveOptions... options);
Formatting? And is it really `CloneDriveOptions`, i.e. an array rather than an single object? It's in the old code so not a subject of this PR, but just curious...
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86/files#r5556027
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #91](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/91/) FAILURE
Looks like there's a problem with this pull request
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86#issuecomment-21960454
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by Andrew Bayer <no...@github.com>.
Closed #86.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by Andrew Phillips <no...@github.com>.
>
> /**
> - * @see CloudSigmaClient#shutdownServer
> + * Shutdown a server
"Shuts down a server"?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86/files#r5556039
Re: [jclouds] Removed async from cloudsigma (#86)
Posted by Andrew Phillips <no...@github.com>.
> @@ -62,8 +61,7 @@ public void testStartNodeWithSSD() throws RunNodesException {
> Set<? extends NodeMetadata> nodes = client.createNodesInGroup(group, 1, template);
> NodeMetadata node = get(nodes, 0);
>
> - CloudSigmaClient api = CloudSigmaClient.class.cast(client.getContext().unwrap(
> - CloudSigmaApiMetadata.CONTEXT_TOKEN).getApi());
> + CloudSigmaApi api = CloudSigmaApi.class.cast(client.getContext());
This works? It looks like `client` is a ComputeService here, so `client.getContext()` would be a CSC, no? Don't we need
```
CloudSigmaApi api = client.getContext().unwrapApi(CloudSigmaApi.class);
```
here?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/86/files#r5556143