Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-26 Thread Ignasi Barrera
Closed #119. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/119#event-224541848

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-26 Thread Ignasi Barrera
Pushed to master as [3b6ddf0](https://git-wip-us.apache.org/repos/asf?p=jclouds-labs.git;a=commit;h=3b6ddf0d74bb7f4d5b7376b6e7f00b7336b139e8). Thanks @devcsrj! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/119#issuecomment-71441228

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-22 Thread Ignasi Barrera
Really nice test coverage @devcsrj. Thanks for the effort! Mind squashing the commits so I can merge it? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/119#issuecomment-70999626

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-18 Thread Reijhanniel Jearl Campos
Hi @nacx . I addressed the comments and is now ready for another review cycle. :) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/119#issuecomment-70445219

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-14 Thread Reijhanniel Jearl Campos
> @@ -56,6 +56,8 @@ protected BaseProfitBricksRequestBinder(String paramName) { > protected abstract String createPayload(T payload); > > protected String formatIfNotEmpty(String pattern, Object param) { > + if (param == null ) > + return ""; >return Strings.isNullOrE

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-14 Thread Reijhanniel Jearl Campos
> +import org.jclouds.rest.annotations.XMLResponseParser; > + > +@RequestFilters({BasicAuthentication.class, > ProfitBricksSoapMessageEnvelope.class}) > +@Consumes(MediaType.TEXT_XML) > +@Produces(MediaType.TEXT_XML) > +public interface ImageApi { > + > + /** > +* @return Outputs a list of a

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-14 Thread Reijhanniel Jearl Campos
> + > + public abstract boolean isCpuHotPlug(); > + > + public abstract boolean isCpuHotUnPlug(); > + > + public abstract boolean isRamHotPlug(); > + > + public abstract boolean isRamHotUnPlug(); > + > + public abstract boolean isNicHotPlug(); > + > + public abstract boolean isNicHotUnP

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-14 Thread Reijhanniel Jearl Campos
> +import org.jclouds.rest.annotations.Payload; > +import org.jclouds.rest.annotations.PayloadParam; > +import org.jclouds.rest.annotations.RequestFilters; > +import org.jclouds.rest.annotations.XMLResponseParser; > + > +@RequestFilters( { BasicAuthentication.class, > ProfitBricksSoapMessageEnvelo

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-14 Thread Ignasi Barrera
Thanks! Most comments are minors. Given [this comment](https://github.com/jclouds/jclouds-labs/pull/119#discussion_r22944097), though, I realized that the mock tests are not verifying that the requests we generate have the expected body. This passed unnoticed in the previous review, but we shou

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-14 Thread Ignasi Barrera
> + try { > + Image image = api.getImage(id); > + assertRequestHasCommonProperties(server.takeRequest()); > + assertNotNull(image); > + assertEquals(image.id(), id); > + } finally { > + pbApi.close(); > + server.shutdown(); > + } > + >

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-14 Thread Ignasi Barrera
> + * > + * http://www.apache.org/licenses/LICENSE-2.0 > + * > + * Unless required by applicable law or agreed to in writing, software > + * distributed under the License is distributed on an "AS IS" BASIS, > + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > + * See

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-14 Thread Ignasi Barrera
> +import org.jclouds.rest.annotations.XMLResponseParser; > + > +@RequestFilters({BasicAuthentication.class, > ProfitBricksSoapMessageEnvelope.class}) > +@Consumes(MediaType.TEXT_XML) > +@Produces(MediaType.TEXT_XML) > +public interface ImageApi { > + > + /** > +* @return Outputs a list of a

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-14 Thread Ignasi Barrera
> +import org.jclouds.rest.annotations.Payload; > +import org.jclouds.rest.annotations.PayloadParam; > +import org.jclouds.rest.annotations.RequestFilters; > +import org.jclouds.rest.annotations.XMLResponseParser; > + > +@RequestFilters( { BasicAuthentication.class, > ProfitBricksSoapMessageEnvelo

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-14 Thread Ignasi Barrera
> +return valueOf( v ); > + } catch ( IllegalArgumentException ex ) { > +return UNRECOGNIZED; > + } > + } > + } > + > + @Nullable > + public abstract String id(); > + > + @Nullable > + @Override > + public abstract String name(); > + > + @N

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-14 Thread Ignasi Barrera
> + @Nullable > + public abstract AvailabilityZone availabilityZone(); > + > + @Nullable > + public abstract Date creationTime(); > + > + @Nullable > + public abstract Date lastModificationTime(); > + > +// public abstract List storages(); > +// public abstract List storages(); > +

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-14 Thread Ignasi Barrera
> + > + public abstract boolean isCpuHotPlug(); > + > + public abstract boolean isCpuHotUnPlug(); > + > + public abstract boolean isRamHotPlug(); > + > + public abstract boolean isRamHotUnPlug(); > + > + public abstract boolean isNicHotPlug(); > + > + public abstract boolean isNicHotUnP

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-14 Thread Ignasi Barrera
> + HDD, CDROM, UNRECOGNIZED; > + > + public static Type fromValue(String v) { > + try { > +return valueOf(v); > + } catch (IllegalArgumentException ex) { > +return UNRECOGNIZED; > + } > + } > + } > + > + public abstract String id()

Re: [jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-14 Thread Ignasi Barrera
> @@ -56,6 +56,8 @@ protected BaseProfitBricksRequestBinder(String paramName) { > protected abstract String createPayload(T payload); > > protected String formatIfNotEmpty(String pattern, Object param) { > + if (param == null ) > + return ""; >return Strings.isNullOrE

[jclouds-labs] JCLOUDS-702: JCloud ProfitBricks provider - Server & Image API (#119)

2015-01-13 Thread Reijhanniel Jearl Campos
Hi! This PR is the implementation of ProfitBricks' API for: * **Server** - [live test](https://gist.github.com/devcsrj/6a17a3c1347f740b0715) * **Image** - [live test](https://gist.github.com/devcsrj/e4ab53864b75afa9655b) As usual, looking forward to awesome code reviews! You can merge this Pull R