You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Ali Bazlamit <no...@github.com> on 2018/06/01 13:32:34 UTC

[jclouds/jclouds-labs] Oneandone blk storage ssh keys (#437)

[JCLOUDS-1425 1&1 Block Storage and SSH keys API ](https://issues.apache.org/jira/browse/JCLOUDS-1425)
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Added block storage support.
  * Added ssh key support.
  * Merge branch 'master' of https://github.com/jclouds/jclouds-labs into oneandone-blk-storage-ssh-keys
  * Minor changes

-- File Changes --

    M oneandone/src/main/java/org/apache/jclouds/oneandone/rest/OneAndOneApi.java (9)
    A oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/BlockStorage.java (154)
    A oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/SshKey.java (102)
    A oneandone/src/main/java/org/apache/jclouds/oneandone/rest/features/BlockStorageApi.java (92)
    A oneandone/src/main/java/org/apache/jclouds/oneandone/rest/features/SshKeyApi.java (79)
    A oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/BlockStorageApiLiveTest.java (118)
    A oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/BlockStorageApiMockTest.java (200)
    A oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/SshKeyApiLiveTest.java (91)
    A oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/SshKeyApiMockTest.java (165)
    A oneandone/src/test/resources/blockstorage/get.json (18)
    A oneandone/src/test/resources/blockstorage/list.json (52)
    A oneandone/src/test/resources/sshkeys/get.json (13)
    A oneandone/src/test/resources/sshkeys/list.json (28)

-- Patch Links --

https://github.com/jclouds/jclouds-labs/pull/437.patch
https://github.com/jclouds/jclouds-labs/pull/437.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/437

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Ali Bazlamit <no...@github.com>.
@nacx a friendly nudge, could we please move on with this PR and the other 1&1 PR as soon as you guys have time.

-- 
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/437#issuecomment-397967267

Re: [jclouds/jclouds-labs] Oneandone blk storage ssh keys (#437)

Posted by Ali Bazlamit <no...@github.com>.
@alibazlamit pushed 1 commit.

3f611fe  license header again


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/437/files/089363c3fae056582fe2fdeb92648cdeda3404e9..3f611fe312f5a43009e60db63ae7fe7c2b79cbb8

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Ali Bazlamit <no...@github.com>.
alibazlamit commented on this pull request.



> +
+@Path("/block_storages")
+@Produces("application/json")
+@Consumes("application/json")
+@RequestFilters(AuthenticateRequest.class)
+public interface BlockStorageApi extends Closeable {
+
+   @Named("blockstorages:list")
+   @GET
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<BlockStorage> list();
+
+   @Named("blockstorages:list")
+   @GET
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<BlockStorage> list(GenericQueryOptions options);

This comment applies to all of the 1&1 features, there will be a lot of work to do. I suggest we do this in a separate PR.

-- 
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/437#discussion_r201014597

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Ali Bazlamit <no...@github.com>.
Yes, though i am not sure what are the required steps to move out from jclouds-labs to jclouds. We have been in the labs for a long time and would like to move forward.

What about the other PR for 1&1. Could you please give it a look and let me know if it is good too?

-- 
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/437#issuecomment-403753017

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Andrea Turli <no...@github.com>.
Closed #437.

-- 
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/437#event-1725278705

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Ali Bazlamit <no...@github.com>.
@alibazlamit pushed 1 commit.

6c882ef  Applied review changes


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/437/files/9ae6fe1066dca923129f6e3dde6a82565a6ee71b..6c882ef5aee3012666bc86793ca022bb1c6e80c5

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Andrea Turli <no...@github.com>.
@alibazlamit I was talking about `master` in jclouds-labs yet. 

Can you please squash the commits into 1? thanks

-- 
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/437#issuecomment-403755157

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Andrea Turli <no...@github.com>.
merged at [master](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/4a9536b8) 

thanks @alibazlamit 

-- 
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/437#issuecomment-403790894

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Andrea Turli <no...@github.com>.
andreaturli commented on this pull request.



> +
+@Path("/block_storages")
+@Produces("application/json")
+@Consumes("application/json")
+@RequestFilters(AuthenticateRequest.class)
+public interface BlockStorageApi extends Closeable {
+
+   @Named("blockstorages:list")
+   @GET
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<BlockStorage> list();
+
+   @Named("blockstorages:list")
+   @GET
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<BlockStorage> list(GenericQueryOptions options);

agreed

-- 
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/437#discussion_r201244892

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Ali Bazlamit <no...@github.com>.
alibazlamit commented on this pull request.



> +import javax.ws.rs.Produces;
+import org.jclouds.rest.annotations.BinderParam;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.MapBinder;
+import org.jclouds.rest.annotations.RequestFilters;
+
+@Path("/ssh_keys")
+@Produces("application/json")
+@Consumes("application/json")
+@RequestFilters(AuthenticateRequest.class)
+public interface SshKeyApi {
+
+   @Named("sshkeys:list")
+   @GET
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<SshKey> list();

Same answer as above


-- 
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/437#discussion_r201010178

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Ali Bazlamit <no...@github.com>.
alibazlamit commented on this pull request.



> +
+   @Named("sshkeys:create")
+   @POST
+   SshKey create(@BinderParam(BindToJsonPayload.class) SshKey.CreateSshKey sshKey);
+
+   @Named("sshkeys:update")
+   @PUT
+   @Path("/{sshKeyId}")
+   SshKey update(@PathParam("sshKeyId") String sshKeyId, @BinderParam(BindToJsonPayload.class) SshKey.UpdateSshKey sshKey);
+
+   @Named("sshkeys:delete")
+   @DELETE
+   @Path("/{sshKeyId}")
+   @Fallback(Fallbacks.NullOnNotFoundOr404.class)
+   @MapBinder(BindToJsonPayload.class)
+   SshKey delete(@PathParam("sshKeyId") String sshKeyId);

Yes
```
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.jclouds.oneandone.rest.features.SshKeyApiLiveTest
Configuring TestNG with: TestNG652Configurator
Starting test testGet(org.apache.jclouds.oneandone.rest.features.SshKeyApiLiveTest)
Starting test testList(org.apache.jclouds.oneandone.rest.features.SshKeyApiLiveTest)
Starting test testListWithOption(org.apache.jclouds.oneandone.rest.features.SshKeyApiLiveTest)
[pool-1-thread-1] Test testGet(org.apache.jclouds.oneandone.rest.features.SshKeyApiLiveTest) succeeded: 553ms
Test suite progress: tests succeeded: 1, failed: 0, skipped: 0.
[pool-1-thread-3] Test testList(org.apache.jclouds.oneandone.rest.features.SshKeyApiLiveTest) succeeded: 553ms
Test suite progress: tests succeeded: 2, failed: 0, skipped: 0.
[pool-1-thread-2] Test testListWithOption(org.apache.jclouds.oneandone.rest.features.SshKeyApiLiveTest) succeeded: 553ms
Test suite progress: tests succeeded: 3, failed: 0, skipped: 0.
Starting test testUpdate(org.apache.jclouds.oneandone.rest.features.SshKeyApiLiveTest)
[pool-1-thread-4] Test testUpdate(org.apache.jclouds.oneandone.rest.features.SshKeyApiLiveTest) succeeded: 862ms
Test suite progress: tests succeeded: 4, failed: 0, skipped: 0.
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.975 sec - in org.apache.jclouds.oneandone.rest.features.SshKeyApiLiveTest

Results :

Tests run: 4, Failures: 0, Errors: 0, Skipped: 0

------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 4.862s
Finished at: Mon Jul 09 17:32:42 CEST 2018
Final Memory: 11M/309M
------------------------------------------------------------------------
```

-- 
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/437#discussion_r201046977

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Ali Bazlamit <no...@github.com>.
alibazlamit commented on this pull request.



> +
+@Path("/block_storages")
+@Produces("application/json")
+@Consumes("application/json")
+@RequestFilters(AuthenticateRequest.class)
+public interface BlockStorageApi extends Closeable {
+
+   @Named("blockstorages:list")
+   @GET
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<BlockStorage> list();
+
+   @Named("blockstorages:list")
+   @GET
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<BlockStorage> list(GenericQueryOptions options);

Yes, in GenericQueryOptions you can choose to pass one of the five available parameters which includes pagination

-- 
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/437#discussion_r201009508

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Ali Bazlamit <no...@github.com>.
@andreaturli Sorry it was a bad merge from upstream on my side, the SSH and BlockStorage features are not that big of a change. It is 15 files after i correctly synced with upstream

-- 
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/437#issuecomment-402864481

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Ali Bazlamit <no...@github.com>.
alibazlamit commented on this pull request.



> +   @POST
+   BlockStorage create(@BinderParam(BindToJsonPayload.class) BlockStorage.CreateBlockStorage blockStorage);
+
+   @Named("blockstorages:update")
+   @PUT
+   @Path("/{blockStorageId}")
+   BlockStorage update(@PathParam("blockStorageId") String blockStorageId, @BinderParam(BindToJsonPayload.class) BlockStorage.UpdateBlockStorage blockStorage);
+
+   @Named("blockstorages:delete")
+   @DELETE
+   @Path("/{blockStorageId}")
+   @MapBinder(BindToJsonPayload.class)
+   @Fallback(Fallbacks.NullOnNotFoundOr404.class)
+   BlockStorage delete(@PathParam("blockStorageId") String blockStorageId);
+
+   @Named("blockstorages:servers:create")

Done

-- 
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/437#discussion_r201041580

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Andrea Turli <no...@github.com>.
andreaturli commented on this pull request.



> +
+@Path("/block_storages")
+@Produces("application/json")
+@Consumes("application/json")
+@RequestFilters(AuthenticateRequest.class)
+public interface BlockStorageApi extends Closeable {
+
+   @Named("blockstorages:list")
+   @GET
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<BlockStorage> list();
+
+   @Named("blockstorages:list")
+   @GET
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<BlockStorage> list(GenericQueryOptions options);

shouldn't we use a pattern like https://github.com/jclouds/jclouds/blob/master/providers/packet/src/main/java/org/jclouds/packet/features/DeviceApi.java#L64-L78 ?

-- 
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/437#discussion_r201013321

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Ali Bazlamit <no...@github.com>.
Done

-- 
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/437#issuecomment-403784731

Re: [jclouds/jclouds-labs] Oneandone blk storage ssh keys (#437)

Posted by Ali Bazlamit <no...@github.com>.
@alibazlamit pushed 1 commit.

089363c  minor changes


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/437/files/5c712c112ac88f55911887c285dd46350c80ccc9..089363c3fae056582fe2fdeb92648cdeda3404e9

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Andrea Turli <no...@github.com>.
andreaturli requested changes on this pull request.

some minor changes, but good overall. Thanks @alibazlamit 

> +
+@Path("/block_storages")
+@Produces("application/json")
+@Consumes("application/json")
+@RequestFilters(AuthenticateRequest.class)
+public interface BlockStorageApi extends Closeable {
+
+   @Named("blockstorages:list")
+   @GET
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<BlockStorage> list();
+
+   @Named("blockstorages:list")
+   @GET
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<BlockStorage> list(GenericQueryOptions options);

does 1&1 offers pagination?

> +   @POST
+   BlockStorage create(@BinderParam(BindToJsonPayload.class) BlockStorage.CreateBlockStorage blockStorage);
+
+   @Named("blockstorages:update")
+   @PUT
+   @Path("/{blockStorageId}")
+   BlockStorage update(@PathParam("blockStorageId") String blockStorageId, @BinderParam(BindToJsonPayload.class) BlockStorage.UpdateBlockStorage blockStorage);
+
+   @Named("blockstorages:delete")
+   @DELETE
+   @Path("/{blockStorageId}")
+   @MapBinder(BindToJsonPayload.class)
+   @Fallback(Fallbacks.NullOnNotFoundOr404.class)
+   BlockStorage delete(@PathParam("blockStorageId") String blockStorageId);
+
+   @Named("blockstorages:servers:create")

is it the right name? wouldn't be better `blockstorages:attachServer` ?

> +   @Path("/{blockStorageId}")
+   BlockStorage update(@PathParam("blockStorageId") String blockStorageId, @BinderParam(BindToJsonPayload.class) BlockStorage.UpdateBlockStorage blockStorage);
+
+   @Named("blockstorages:delete")
+   @DELETE
+   @Path("/{blockStorageId}")
+   @MapBinder(BindToJsonPayload.class)
+   @Fallback(Fallbacks.NullOnNotFoundOr404.class)
+   BlockStorage delete(@PathParam("blockStorageId") String blockStorageId);
+
+   @Named("blockstorages:servers:create")
+   @POST
+   @Path("/{blockStorageId}/server")
+   BlockStorage attachServer(@PathParam("blockStorageId") String blockStorageId, @BinderParam(BindToJsonPayload.class) Server.AttachServer server);
+
+   @Named("blockstorages:server:delete")

is it the right name? wouldn't be better `blockstorages:detachServer` ?

> +
+   @Named("sshkeys:create")
+   @POST
+   SshKey create(@BinderParam(BindToJsonPayload.class) SshKey.CreateSshKey sshKey);
+
+   @Named("sshkeys:update")
+   @PUT
+   @Path("/{sshKeyId}")
+   SshKey update(@PathParam("sshKeyId") String sshKeyId, @BinderParam(BindToJsonPayload.class) SshKey.UpdateSshKey sshKey);
+
+   @Named("sshkeys:delete")
+   @DELETE
+   @Path("/{sshKeyId}")
+   @Fallback(Fallbacks.NullOnNotFoundOr404.class)
+   @MapBinder(BindToJsonPayload.class)
+   SshKey delete(@PathParam("sshKeyId") String sshKeyId);

does delete return an SshKey object?

> +import javax.ws.rs.Produces;
+import org.jclouds.rest.annotations.BinderParam;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.MapBinder;
+import org.jclouds.rest.annotations.RequestFilters;
+
+@Path("/ssh_keys")
+@Produces("application/json")
+@Consumes("application/json")
+@RequestFilters(AuthenticateRequest.class)
+public interface SshKeyApi {
+
+   @Named("sshkeys:list")
+   @GET
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<SshKey> list();

same as above, `list` methods can have pagination?

> +import org.apache.jclouds.oneandone.rest.domain.Server;
+import org.apache.jclouds.oneandone.rest.domain.BlockStorage;
+import org.apache.jclouds.oneandone.rest.domain.options.GenericQueryOptions;
+import org.apache.jclouds.oneandone.rest.internal.BaseOneAndOneLiveTest;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import java.util.List;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+
+
+@Test(groups = "live", testName = "BlockStorageApiLiveTest")
+public class BlockStorageApiLiveTest extends BaseOneAndOneLiveTest {

as we don't have access to 1&1 endpoint, can you attach the relevant logs of this LiveTest?

> +
+import java.util.List;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+
+@Test(groups = "unit", testName = "BlockStorageApiMockTest", singleThreaded = true)
+public class BlockStorageApiMockTest extends BaseOneAndOneApiMockTest {
+
+   private BlockStorageApi blockStorageApi() {
+      return api.blockStorageApi();
+   }
+
+   @Test
+   public void testList() throws InterruptedException {
+      server.enqueue(

[minor] weird indentation

-- 
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/437#pullrequestreview-134981115

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Andrea Turli <no...@github.com>.
andreaturli commented on this pull request.



> +import org.apache.jclouds.oneandone.rest.internal.BaseOneAndOneApiMockTest;
+import org.testng.annotations.Test;
+
+import java.util.List;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+
+@Test(groups = "unit", testName = "SshKeyApiMockTest", singleThreaded = true)
+public class SshKeyApiMockTest extends BaseOneAndOneApiMockTest {
+
+   private SshKeyApi sshKeyApi() {
+      return api.sshKeyApi();
+   }
+
+   @Test

you can remove `@Test` annotation

-- 
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/437#pullrequestreview-134985333

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Andrea Turli <no...@github.com>.
andreaturli commented on this pull request.



> +import org.apache.jclouds.oneandone.rest.internal.BaseOneAndOneApiMockTest;
+import org.testng.annotations.Test;
+
+import java.util.List;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+
+@Test(groups = "unit", testName = "BlockStorageApiMockTest", singleThreaded = true)
+public class BlockStorageApiMockTest extends BaseOneAndOneApiMockTest {
+
+   private BlockStorageApi blockStorageApi() {
+      return api.blockStorageApi();
+   }
+
+   @Test

I think you can remove `@Test` annotation from methods

-- 
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/437#pullrequestreview-134985163

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Andrea Turli <no...@github.com>.
Hi @alibazlamit thanks for your perseverance

I really need to encourage you to open smaller PR: 75 files bring in a huge amount of changes and it is impossible to review all of them carefully. Can you take the time to close this PR and open up small incremental PRs maybe?
I think the first one could be ssh key support and then focus on the block storage?
Thanks

-- 
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/437#issuecomment-402684305

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Andrea Turli <no...@github.com>.
andreaturli approved this pull request.

lgtm, thanks @alibazlamit 



-- 
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/437#pullrequestreview-135706726

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Andrea Turli <no...@github.com>.
andreaturli commented on this pull request.



> +@Test(groups = "live", testName = "SshKeyApiLiveTest")
+public class SshKeyApiLiveTest extends BaseOneAndOneLiveTest {
+
+   private SshKey currentSshKey;
+   private List<SshKey> sshKeys;
+
+   private SshKeyApi sshKeyApi() {
+      return api.sshKeyApi();
+   }
+
+   @BeforeClass
+   public void setupTest() {
+      currentSshKey = sshKeyApi().create(SshKey.CreateSshKey.create("jclouds sshKey", "description", null));
+   }
+
+   @Test

you can remove `@Test` annotation

-- 
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/437#pullrequestreview-134985313

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Ali Bazlamit <no...@github.com>.
alibazlamit commented on this pull request.



> +   @Path("/{blockStorageId}")
+   BlockStorage update(@PathParam("blockStorageId") String blockStorageId, @BinderParam(BindToJsonPayload.class) BlockStorage.UpdateBlockStorage blockStorage);
+
+   @Named("blockstorages:delete")
+   @DELETE
+   @Path("/{blockStorageId}")
+   @MapBinder(BindToJsonPayload.class)
+   @Fallback(Fallbacks.NullOnNotFoundOr404.class)
+   BlockStorage delete(@PathParam("blockStorageId") String blockStorageId);
+
+   @Named("blockstorages:servers:create")
+   @POST
+   @Path("/{blockStorageId}/server")
+   BlockStorage attachServer(@PathParam("blockStorageId") String blockStorageId, @BinderParam(BindToJsonPayload.class) Server.AttachServer server);
+
+   @Named("blockstorages:server:delete")

Done

-- 
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/437#discussion_r201041597

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Ali Bazlamit <no...@github.com>.
alibazlamit commented on this pull request.



> +import org.apache.jclouds.oneandone.rest.domain.Server;
+import org.apache.jclouds.oneandone.rest.domain.BlockStorage;
+import org.apache.jclouds.oneandone.rest.domain.options.GenericQueryOptions;
+import org.apache.jclouds.oneandone.rest.internal.BaseOneAndOneLiveTest;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import java.util.List;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+
+
+@Test(groups = "live", testName = "BlockStorageApiLiveTest")
+public class BlockStorageApiLiveTest extends BaseOneAndOneLiveTest {

```
 T E S T S
-------------------------------------------------------
Running org.apache.jclouds.oneandone.rest.features.BlockStorageApiLiveTest
Configuring TestNG with: TestNG652Configurator
Starting test testGet(org.apache.jclouds.oneandone.rest.features.BlockStorageApiLiveTest)
Starting test testListWithOption(org.apache.jclouds.oneandone.rest.features.BlockStorageApiLiveTest)
Starting test testList(org.apache.jclouds.oneandone.rest.features.BlockStorageApiLiveTest)
Starting test testUpdate(org.apache.jclouds.oneandone.rest.features.BlockStorageApiLiveTest)
[pool-1-thread-3] Test testListWithOption(org.apache.jclouds.oneandone.rest.features.BlockStorageApiLiveTest) succeeded: 618ms
Test suite progress: tests succeeded: 1, failed: 0, skipped: 0.
[pool-1-thread-2] Test testList(org.apache.jclouds.oneandone.rest.features.BlockStorageApiLiveTest) succeeded: 841ms
Test suite progress: tests succeeded: 2, failed: 0, skipped: 0.
[pool-1-thread-1] Test testGet(org.apache.jclouds.oneandone.rest.features.BlockStorageApiLiveTest) succeeded: 1732ms
Test suite progress: tests succeeded: 3, failed: 0, skipped: 0.
[pool-1-thread-4] Test testUpdate(org.apache.jclouds.oneandone.rest.features.BlockStorageApiLiveTest) succeeded: 2065ms
Test suite progress: tests succeeded: 4, failed: 0, skipped: 0.
Starting test testAttachBlockStorage(org.apache.jclouds.oneandone.rest.features.BlockStorageApiLiveTest)
[pool-1-thread-5] Test testAttachBlockStorage(org.apache.jclouds.oneandone.rest.features.BlockStorageApiLiveTest) succeeded: 1400ms
Test suite progress: tests succeeded: 5, failed: 0, skipped: 0.
Starting test testDetachServer(org.apache.jclouds.oneandone.rest.features.BlockStorageApiLiveTest)
[pool-1-thread-5] Test testDetachServer(org.apache.jclouds.oneandone.rest.features.BlockStorageApiLiveTest) succeeded: 56239ms
Test suite progress: tests succeeded: 6, failed: 0, skipped: 0.
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 245.489 sec - in org.apache.jclouds.oneandone.rest.features.BlockStorageApiLiveTest

Results :

Tests run: 6, Failures: 0, Errors: 0, Skipped: 0

------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 4:06.543s
Finished at: Mon Jul 09 17:31:48 CEST 2018
Final Memory: 11M/309M
```

-- 
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/437#discussion_r201046695

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Andrea Turli <no...@github.com>.
@alibazlamit I assume this will be only merged onto `master` yes?

-- 
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/437#issuecomment-403731563

Re: [jclouds/jclouds-labs] JCLOUDS-1425 1&1 Block Storage and SSH keys API (#437)

Posted by Andrea Turli <no...@github.com>.
ok merging now

-- 
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/437#issuecomment-403787472