Pushed to master as
[67cae0ca](https://git1-us-west.apache.org/repos/asf?p=jclouds-labs.git;a=commit;h=67cae0ca).
Thanks @devcsrj!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/128#issuecomment-73050251
Oh this streams. Haha! Anyway, @nacx I amended the previous commit and [here's
the
change](https://github.com/devcsrj/jclouds-labs/commit/e16878763e51f249a428335f11279393ee5deabc#diff-7772dc9ed46441061f1e9d43596e1866R96).
---
Reply to this email directly or view it on GitHub:
https://github.com/
>is this change better?
Yes, it is better, but take into account that if the `isSoapPayload` returns
false you are not updating the payload in the response, and the original input
stream might be already read. I'd put the soap check inside the try/finally
block to make sure the response always
Hi @nacx , is this change better?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/128#issuecomment-72304981
> @@ -119,4 +129,9 @@ private static boolean hasPayload(final HttpResponse
> response) {
>return response.getPayload() != null &&
> response.getPayload().getRawContent() != null;
> }
>
> + private static boolean isSoapPayload( final InputStream is ) throws
> IOException {
> +
Here are the Storage API [live
tests](https://gist.github.com/devcsrj/d0f3cb9d7c0f2e6a5988).
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/128#issuecomment-71960552
> @@ -119,4 +129,9 @@ private static boolean hasPayload(final HttpResponse
> response) {
>return response.getPayload() != null &&
> response.getPayload().getRawContent() != null;
> }
>
> + private static boolean isSoapPayload( final InputStream is ) throws
> IOException {
> +
BTW, can you share the live test results?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/128#issuecomment-71921895
Thanks @devcsrj!
Just one last minor (style) comment: prefer `if (foo) {` (wihtout spaces)
instead of `if ( foo ) {`.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/128#issuecomment-71921739
> +
> + try {
> + api.createServer( Server.Request.CreatePayload.create(
> "some-datacenter-id", "node1", 99, 12800) );
> + fail( "Request should have failed.");
> + } catch (Exception ex){
> + assertTrue(ex instanceof InsufficientResourcesException, "Except
> + ProfitBricksApi pbApi = api( server.getUrl( rootUrl ) );
> + StorageApi api = pbApi.storageApi();
> +
> + String storageId = "qswdefrg-qaws-qaws-defe-rgrgdsvcxbrh";
> +
> + String content = "" + storageId +
> "";
> +
> + try {
> + boolean result = api.deleteSto
> + this.waitUntilAvailable = Predicates2.retry(
> + new ProvisioningStatusPollingPredicate( api,
> ProvisioningStatusAware.STORAGE, ProvisioningState.AVAILABLE ),
> + 6l * 60l, 2l, TimeUnit.SECONDS );
> + }
> +
> + @Test( expectedExceptions = InsufficientResourc
> @@ -119,4 +129,9 @@ private static boolean hasPayload(final HttpResponse
> response) {
>return response.getPayload() != null &&
> response.getPayload().getRawContent() != null;
> }
>
> + private static boolean isSoapPayload( final InputStream is ) throws
> IOException {
> +
> @@ -59,7 +59,11 @@ public void handleError(final HttpCommand command, final
> HttpResponse response)
> break;
> case 413:
> case 503:
> -exception = new
> InsufficientResourcesException(response.getMessage(), exception);
> + // if nothi
> // @Nullable public abstract List loadBalancers();
> - public static DataCenter create(String id, String name, int version,
> ProvisioningState state, Location location) {
> - return new AutoValue_DataCenter(id, name, version, state, location);
> + public static DataCenter create(Str
> @@ -50,6 +50,8 @@ public boolean apply(String input) {
> return expect == api.dataCenterApi().getDataCenterState(input);
> case SERVER:
> return expect == api.serverApi().getServer( input ).state();
> + case STORAGE:
> +return expect == api.
Following PRs [72](https://github.com/jclouds/jclouds-labs/pull/72) and
[119](https://github.com/jclouds/jclouds-labs/pull/119), here is another PR
that implements ProfitBricks' [Storage
API](https://www.profitbricks.com/apidoc/1_3/APIDocumentation.html?StorageOperations.html).
You can view, com
17 matches
Mail list logo