Closed #179.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/179#event-250395569
merged
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/179#issuecomment-78357174
Will merge when tests pass
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/179#issuecomment-78354993
Rebased changes to the original commit
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/179#issuecomment-78354886
Last round of sanity checks, then squash and merge.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/179#issuecomment-78341462
:+1:
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/179#issuecomment-78336509
I have removed the dependency on auto 1.1 and will refactor back to builders
once released.
At this point I want mostly to make sure this makes it into 1.9.0
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/179#issuecomment-78324705
I'm thinking snapshot is not updated yet. Will try to rebuild later - passes
locally.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/179#issuecomment-78173346
Applied changes made possible by https://github.com/jclouds/jclouds/pull/700
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/179#issuecomment-78172270
> @@ -52,7 +53,7 @@
> @Consumes(MediaType.APPLICATION_JSON)
> @Endpoint(CDN.class)
> @RequestFilters(AuthenticateRequest.class)
> - @Fallback(FalseOn500or503.class)
> + @Fallback(PoppyFallbacks.FalseOn500or503orIOE.class)
This PR still needs to be updated after
https://github.com/
> +import org.jclouds.json.SerializedNames;
> +
> +import com.google.auto.value.AutoValue;
> +
> +/**
> + * Representation of an OpenStack Poppy Caching Rule.
> + */
> +@AutoValue
> +public abstract class Caching {
> + public abstract String getName();
> + public abstract int getTtl();
> + @N
> + @Named("service:list")
> + @GET
> + @ResponseParser(ParseServices.class)
> + @Transform(ServicesToPagedIterable.class)
> + @Fallback(Fallbacks.EmptyPagedIterableOnNotFoundOr404.class)
> + PagedIterable list();
> +
> + /**
> +* Lists services by providing a specific set of list
> @@ -52,7 +53,7 @@
> @Consumes(MediaType.APPLICATION_JSON)
> @Endpoint(CDN.class)
> @RequestFilters(AuthenticateRequest.class)
> - @Fallback(FalseOn500or503.class)
> + @Fallback(PoppyFallbacks.FalseOn500or503orIOE.class)
Thanks @nacx - awesome!
---
Reply to this email directly or
> + @Fallback(NullOnNotFoundOr404.class)
> + @Nullable
> + Service get(@PathParam("id") String id);
> +
> + /**
> +* Creates a service.
> +*
> +* @param options the options to create the service with
> +* @return a URI to the created service
> +*/
> + @Named("service:
> +* @param id the id of the service to delete
> +* @return true if delete was successful, false if not
> +*/
> + @Named("network:delete")
> + @DELETE
> + @Path("/{id}")
> + @Fallback(Fallbacks.FalseOnNotFoundOr404.class)
> + boolean delete(@PathParam("id") String id);
> +
> +
> @@ -52,7 +53,7 @@
> @Consumes(MediaType.APPLICATION_JSON)
> @Endpoint(CDN.class)
> @RequestFilters(AuthenticateRequest.class)
> - @Fallback(FalseOn500or503.class)
> + @Fallback(PoppyFallbacks.FalseOn500or503orIOE.class)
Here is a patch that should fix the issue and allow you to r
> + @Named("service:list")
> + @GET
> + @ResponseParser(ParseServices.class)
> + @Transform(ServicesToPagedIterable.class)
> + @Fallback(Fallbacks.EmptyPagedIterableOnNotFoundOr404.class)
> + PagedIterable list();
> +
> + /**
> +* Lists services by providing a specific set of list
> +
> + @Override
> + public R bindToRequest(R request, Map Object> postParams) {
> + String jsonPatch = null;
> + Service service = (Service) postParams.get("service");
> +
> + Json json = Guice.createInjector(new
> GsonModule()).getInstance(Json.class);
> +
> + String ta
> + @Override
> + public R bindToRequest(R request, Map Object> postParams) {
> + String jsonPatch = null;
> + Service service = (Service) postParams.get("service");
> +
> + Json json = Guice.createInjector(new
> GsonModule()).getInstance(Json.class);
> +
> + String target
> @@ -52,7 +53,7 @@
> @Consumes(MediaType.APPLICATION_JSON)
> @Endpoint(CDN.class)
> @RequestFilters(AuthenticateRequest.class)
> - @Fallback(FalseOn500or503.class)
> + @Fallback(PoppyFallbacks.FalseOn500or503orIOE.class)
I've investigated a bit, and the issue you are facing is
[J
Thanks for the review @nacx! Good stuff. Any idea on who to contact about the
google auto 1.1 release? I don't want to bother them too much, especially if we
already asked.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/179#issuecomm
> +import org.jclouds.json.SerializedNames;
> +
> +import com.google.auto.value.AutoValue;
> +
> +/**
> + * Representation of an OpenStack Poppy Caching Rule.
> + */
> +@AutoValue
> +public abstract class Caching {
> + public abstract String getName();
> + public abstract int getTtl();
> + @N
> @@ -52,7 +53,7 @@
> @Consumes(MediaType.APPLICATION_JSON)
> @Endpoint(CDN.class)
> @RequestFilters(AuthenticateRequest.class)
> - @Fallback(FalseOn500or503.class)
> + @Fallback(PoppyFallbacks.FalseOn500or503orIOE.class)
testPingFailOn500(org.jclouds.openstack.poppy.v1.features.Po
> + * Diff to create JSONPatch using dependency.
> + * Send the JSONPatch in the request.
> + *
> + * JSONPatch RFC:
> + * https://tools.ietf.org/html/rfc6902
> + */
> +public class JSONPatchUpdate implements MapBinder {
> + @Inject
> + private BindToJsonPayload jsonBinder;
> +
> + @Override
> @@ -46,6 +46,20 @@
>
> org.jclouds*;version="${project.version}",*
>
>
> +
Absolutely. That would help us remove a lot of boilerplate code. Let's try to
push them to make a release!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-ope
> + @GET
> + @Path("/{id}")
> + @Fallback(NullOnNotFoundOr404.class)
> + @Nullable
> + Service get(@PathParam("id") String id);
> +
> + /**
> +* Creates a service.
> +*
> +* @param options the options to create the service with
> +* @return a URI to the created service
> +
> + @Override
> + public R bindToRequest(R request, Map Object> postParams) {
> + String jsonPatch = null;
> + Service service = (Service) postParams.get("service");
> +
> + Json json = Guice.createInjector(new
> GsonModule()).getInstance(Json.class);
> +
> + String ta
> +import javax.inject.Singleton;
> +
> +import org.jclouds.http.functions.ParseJson;
> +import org.jclouds.json.Json;
> +import org.jclouds.openstack.poppy.v1.domain.Services;
> +
> +import com.google.inject.TypeLiteral;
> +
> +/**
> + * Used by jclouds to provide more specific collections and fal
> @@ -52,7 +53,7 @@
> @Consumes(MediaType.APPLICATION_JSON)
> @Endpoint(CDN.class)
> @RequestFilters(AuthenticateRequest.class)
> - @Fallback(FalseOn500or503.class)
> + @Fallback(PoppyFallbacks.FalseOn500or503orIOE.class)
Let me try to reproduce it again then...
---
Reply to this
> +
> + /**
> +* Updates a service by applying JSONPatch internally.
> +* https://tools.ietf.org/html/rfc6902
> +* This requires providing your updateable JSON and the target JSON.
> +*
> +* @param service Source JSON
> +* @param createService Target JSON
> +* @return
> @@ -46,6 +46,20 @@
>
> org.jclouds*;version="${project.version}",*
>
>
> +
Almost a recurring theme at this point... :) But it's just so powerful!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/179/files#r25982047
> +import java.util.List;
> +import java.util.Set;
> +
> +import org.jclouds.javax.annotation.Nullable;
> +import org.jclouds.json.SerializedNames;
> +import org.jclouds.openstack.v2_0.domain.Link;
> +
> +import com.google.auto.value.AutoValue;
> +import com.google.inject.name.Named;
> +
> +/**
> +
> +import java.util.List;
> +
> +import org.jclouds.javax.annotation.Nullable;
> +import org.jclouds.json.SerializedNames;
> +
> +import com.google.auto.value.AutoValue;
> +import com.google.common.collect.ImmutableList;
> +
> +/**
> + * Representation of an OpenStack Poppy Origin.
> + */
> +@AutoV
> +import org.jclouds.json.SerializedNames;
> +
> +import com.google.auto.value.AutoValue;
> +
> +/**
> + * Representation of an OpenStack Poppy Caching Rule.
> + */
> +@AutoValue
> +public abstract class Caching {
> + public abstract String getName();
> + public abstract int getTtl();
> + @N
> @@ -46,6 +46,20 @@
>
> org.jclouds*;version="${project.version}",*
>
>
> +
Fine, but as discussed in other threads take care and don't merge this pull
request until that happens :)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-open
> @@ -52,7 +53,7 @@
> @Consumes(MediaType.APPLICATION_JSON)
> @Endpoint(CDN.class)
> @RequestFilters(AuthenticateRequest.class)
> - @Fallback(FalseOn500or503.class)
> + @Fallback(PoppyFallbacks.FalseOn500or503orIOE.class)
Can you share the stacktrace? This seems to be something tha
> + * 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 the License for the specific language governing permissions and
> +import org.jclouds.json.config.GsonModule;
> +import org.jclouds.openstack.poppy.v1.domain.Service;
> +import org.jclouds.rest.MapBinder;
> +import org.jclouds.rest.binders.BindToJsonPayload;
> +
> +import com.fasterxml.jackson.databind.ObjectMapper;
> +import com.github.fge.jsonpatch.diff.JsonD
>provided
>
> +
> + org.apache.jclouds.driver
> + jclouds-okhttp
> + ${project.parent.version}
> +
> +
> + com.github.fge
> + json-patch
> + 1.9
> +
This api's update feature uses PATCH that accepts a JSONPatch as per the RFC
https://too
> @@ -52,7 +53,7 @@
> @Consumes(MediaType.APPLICATION_JSON)
> @Endpoint(CDN.class)
> @RequestFilters(AuthenticateRequest.class)
> - @Fallback(FalseOn500or503.class)
> + @Fallback(PoppyFallbacks.FalseOn500or503orIOE.class)
Switching to okhttp: 500 errors seem to cause an IOException
> @@ -46,6 +46,20 @@
>
> org.jclouds*;version="${project.version}",*
>
>
> +
This PR uses autovalue 1.1 snapshot for now (until released)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/179/files#r25899272
> + * User side:
> + * Get a Service with api.get(service_id)
> + * Get a UpdateService builder by using Service.toUpdatabaleService()
> + *This step will provide an interface that exposes the updatable JSON
> values to the user.
> + * Use the UpdateService.Builder instance to modify and build
42 matches
Mail list logo