Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-24 Thread Andrea Turli
Closed #345. -- 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/345#event-934203490

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-24 Thread Andrea Turli
Merged at [master](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/f749c88e) -- 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/345#issuecomment-274756356

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-24 Thread Andrea Turli
squashing and merging -- 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/345#issuecomment-274751245

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-24 Thread Andrea Turli
@andreaturli pushed 1 commit. 3d7946f fix checkstyle -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/345/files/b6344958cae8d54fae211316800d85ae5d13ae8f..3d7946fde99e45efbab1788daf9d0b4e629bb5b4

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-23 Thread Ignasi Barrera
There is one checkstyle violation to fix before merging: https://jclouds.ci.cloudbees.com/job/jclouds-labs-pull-requests/1622/org.apache.jclouds.labs$packet/violations/file/src/main/java/org/jclouds/packet/features/DeviceApi.java/ -- You are receiving this because you are subscribed to this

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-23 Thread Ignasi Barrera
nacx commented on this pull request. > @@ -143,7 +143,7 @@ protected ToPagedIterable(PacketApi api, Function ListOptions> hrefToOptio @Named("device:actions") @POST - @Path("/devices/{id}/actions") + @Path("/{id}/actions") The importance of having all tests! One bug

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-23 Thread Ignasi Barrera
nacx approved this pull request. Let's merge this! Thanks @andreaturli! -- 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/345#pullrequestreview-18035883

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-23 Thread Andrea Turli
@andreaturli pushed 1 commit. b634495 add mock and live tests for device api actions -- You are receiving this because you are subscribed to this thread. View it on GitHub:

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-23 Thread Ignasi Barrera
Thanks @andreaturli! Just some final comments. Almost there! :) -- 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/345#issuecomment-274545210

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-23 Thread Ignasi Barrera
nacx commented on this pull request. > @@ -73,7 +72,7 @@ public void testCreate() { .tags(ImmutableSet. of()) .build() ); - deviceId = URIs.toId(deviceCreated); + deviceId = deviceCreated.id(); assertNodeRunning(deviceId);

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-23 Thread Ignasi Barrera
nacx commented on this pull request. > + + api.deviceApi("93907f48-adfe-43ed-ad89-0e6e83721a54").delete("1"); + + assertEquals(server.getRequestCount(), 1); + assertSent(server, "DELETE", "/projects/93907f48-adfe-43ed-ad89-0e6e83721a54/devices/1"); + } + + public void

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-23 Thread Ignasi Barrera
nacx commented on this pull request. > + + private static class Devices extends PaginatedCollection { + @ConstructorProperties({"devices", "meta"}) + public Devices(List items, Meta meta) { +super(items, meta); + } + } + + public static class

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-21 Thread Andrea Turli
I've found that they have changed the createDevice and createSsh API that now returns domain objects rather than URI, so even easier! -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-20 Thread Andrea Turli
andreaturli commented on this pull request. > + assertEquals(size(devices), 5); + assertEquals(server.getRequestCount(), 1); + + assertSent(server, "GET", "/projects/93907f48-adfe-43ed-ad89-0e6e83721a54/devices?page=1_page=5"); + } + + public void

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-20 Thread Ignasi Barrera
nacx commented on this pull request. > + assertEquals(size(devices), 5); + assertEquals(server.getRequestCount(), 1); + + assertSent(server, "GET", "/projects/93907f48-adfe-43ed-ad89-0e6e83721a54/devices?page=1_page=5"); + } + + public void

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-20 Thread Ignasi Barrera
nacx commented on this pull request. > + assertEquals(size(actions), 5); + assertEquals(server.getRequestCount(), 1); + + assertSent(server, "GET", "/ssh-keys?page=1_page=5"); + } + + public void testListSshKeysWithOptionsReturns404() throws InterruptedException { +

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-20 Thread Andrea Turli
@andreaturli pushed 1 commit. f47db43 make CreateDevice constructor private -- You are receiving this because you are subscribed to this thread. View it on GitHub:

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-20 Thread Ignasi Barrera
nacx commented on this pull request. > +@AutoValue +public abstract static class CreateDevice { + +public abstract String hostname(); +public abstract String plan(); +public abstract String billingCycle(); +public abstract String facility(); +

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-20 Thread Andrea Turli
@andreaturli pushed 1 commit. adf0108 address @nacx comments -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/345/files/ae7c3142f1df1ae7e68274806dc52a2095bdcd24..adf01080394858560a645c8114b2bd085f35868c

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-19 Thread Ignasi Barrera
nacx commented on this pull request. > +@ConstructorProperties({ "devices", "meta" }) +public Devices(List items, Meta meta) { +super(items, meta); +} +} + +private static class ToPagedIterable extends

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-18 Thread Andrea Turli
andreaturli commented on this pull request. > +@ConstructorProperties({ "devices", "meta" }) +public Devices(List items, Meta meta) { +super(items, meta); +} +} + +private static class ToPagedIterable extends

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-18 Thread Ignasi Barrera
nacx commented on this pull request. > +@ConstructorProperties({ "devices", "meta" }) +public Devices(List items, Meta meta) { +super(items, meta); +} +} + +private static class ToPagedIterable extends

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-18 Thread Andrea Turli
andreaturli commented on this pull request. > +@ConstructorProperties({ "devices", "meta" }) +public Devices(List items, Meta meta) { +super(items, meta); +} +} + +private static class ToPagedIterable extends

Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-18 Thread Ignasi Barrera
nacx requested changes on this pull request. Thanks @andreaturli! This is taking shape! :) > + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package

[jclouds/jclouds-labs] add remaining features to support the abstraction (#345)

2017-01-18 Thread Andrea Turli
- add DeviceApi with Mock and Live Test - add FacilityApi with Mock and Live Test - add OperatingSystemApi with Mock and Live Test - add SshKeyApi with Mock and Live Test --- Notice this PR adds many files but because we carefully review already `ProjectApi` and I copied the same structure for