Andrew Gaul created JCLOUDS-795:
---
Summary: S3 should retry on 500 InternalError
Key: JCLOUDS-795
URL: https://issues.apache.org/jira/browse/JCLOUDS-795
Project: jclouds
Issue Type: Improvement
Andrew Gaul created JCLOUDS-794:
---
Summary: generic S3 provider should not provide default endpoint
Key: JCLOUDS-794
URL: https://issues.apache.org/jira/browse/JCLOUDS-794
Project: jclouds
Issue
I don't like having two accessors for the same information either but we're
choosing between the lesser of two evils here. If you only had
`complexMetadata`, you'd be forcing users to always write code like
Object value = image.getComplexMetadata().get("key");
if (value instanceof List)
> super(id, name, links, uuid, tenantId, userId, updated, created,
> hostId, accessIPv4, accessIPv6, status, null, flavor, keyName, configDrive,
> addresses, metadata, extendedStatus, extendedAttributes, diskConfig);
> }
>}
> }
> +
> + @Singleton
> + public
> + server.enqueue(addCommonHeaders(new
> MockResponse().setBody(stringFromResource("/access.json";
> + server.enqueue(addCommonHeaders(new
> MockResponse().setBody(stringFromResource("/image_list_with_block_device_mapping_object.json";
> +
> + try {
> + NovaApi nov
> + server.enqueue(addCommonHeaders(new
> MockResponse().setBody(stringFromResource("/access.json";
> + server.enqueue(addCommonHeaders(new
> MockResponse().setBody(stringFromResource("/image_list_with_block_device_mapping_array.json";
> +
> + try {
> + NovaApi nova
> + server.enqueue(addCommonHeaders(new
> MockResponse().setBody(stringFromResource("/access.json";
> + server.enqueue(addCommonHeaders(new
> MockResponse().setBody(stringFromResource("/image_list_with_block_device_mapping_object.json";
> +
> + try {
> + NovaApi nov
> + @Override
> + public Image deserialize(JsonElement jsonElement, Type type,
> JsonDeserializationContext context)
> + throws JsonParseException {
> + JsonObject json = jsonElement.getAsJsonObject();
> +
> + Map complexMetatdata = null;
> + Map meta
> @@ -271,6 +282,10 @@ public Resource getServer() {
>return this.metadata;
> }
>
> + public Map getComplexMetadata() {
Put the Javadoc on both `getComplexMetadata()` and `getMetadata()`. Don't worry
about the lack of Javadoc elsewhere in this class at the moment. It's these
meth
> })
> protected ServerInternalWithoutImage(String id, @Nullable String
> name, java.util.Set links, @Nullable String uuid, String tenantId,
> - String userId, Date updated, Date created,
> @Nullable String hostId, @Nullable String accessIPv4,
I think what @everett-toews was saying though is that `` is
always going to be more common, so it's not desirable to force casting on every
call to `getMetadata()`. It might make more sense to *only* populate
`complexMetadata` with non-string data, because you're always guaranteed to get
someth
> +package org.jclouds.openstack.nova.v2_0.features;
> +
> +import com.google.common.collect.FluentIterable;
> +import com.squareup.okhttp.mockwebserver.MockResponse;
> +import com.squareup.okhttp.mockwebserver.MockWebServer;
> +import org.jclouds.openstack.nova.v2_0.NovaApi;
> +import org.jclouds.
> @@ -271,6 +282,10 @@ public Resource getServer() {
>return this.metadata;
> }
>
> + public Map getComplexMetadata() {
Where should I put that documentation? I didn't see much javadoc in this class.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds
> @@ -86,6 +86,7 @@ public static Status fromValue(String v) {
>protected int minRam;
>protected Resource server;
>protected Map metadata = ImmutableMap.of();
Good question! I don't know if this is common enough in the greater community
to warrant that, personally. I'm bas
> + @Override
> + public Image deserialize(JsonElement jsonElement, Type type,
> JsonDeserializationContext context)
> + throws JsonParseException {
> + JsonObject json = jsonElement.getAsJsonObject();
> +
> + Map complexMetatdata = null;
> + Map meta
> })
> protected ServerInternalWithoutImage(String id, @Nullable String
> name, java.util.Set links, @Nullable String uuid, String tenantId,
> - String userId, Date updated, Date created,
> @Nullable String hostId, @Nullable String accessIPv4,
[
https://issues.apache.org/jira/browse/JCLOUDS-655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Everett Toews updated JCLOUDS-655:
--
Assignee: Taylor Jones
> com.google.gson.JsonSyntaxException on trying to start a new instance
Nothing happening here. It's long past time to close this PR. I'll leave it to
@inbarsto to choose a path forward. Considering the [Api/Provider Writing
Practices](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49578594)
a fresh start may be in order.
---
Reply to this email d
I don't like having two accessors for the same information, but this is going
to be temporal. I'm OK with the change as long as we mark the deprecation and
properly document it.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/626#issuecomment-673571
>return props;
> }
>
> + @Override
> + @BeforeClass(groups = "live")
> + public void setup() {
> + super.setup();
> + String providedRegion = System.getProperty("test." +
> LocationConstants.PROPERTY_REGION);
> + if (providedRegion != null) {
> +regions =
> +
> + try {
> + HeatApi heatApi = api(server.getUrl("/").toString(),
> "openstack-heat", overrides);
> + StackApi api = heatApi.getStackApi("RegionOne");
> +
> + AutoStack stack = api.get("simple_stack",
> "3095aefc-09fb-4bc7-b1f0-f21a304e864c");
> + System.
> + for (Method m : methods) {
> +System.out.println(m.getName());
> + }
> +
> + /*
> + * Check request
> + */
> + assertThat(server.getRequestCount()).isEqualTo(2);
> + assertAuthentication(server);
> + assertRequest(ser
> + @Override
> + public Image deserialize(JsonElement jsonElement, Type type,
> JsonDeserializationContext context)
> + throws JsonParseException {
> + JsonObject json = jsonElement.getAsJsonObject();
> +
> + Map complexMetatdata = null;
> + Map meta
> @@ -86,6 +86,7 @@ public static Status fromValue(String v) {
>protected int minRam;
>protected Resource server;
>protected Map metadata = ImmutableMap.of();
Should this field be marked `@Deprecated` and properly redirect to the new one
int he javadoc?
---
Reply to this
> + /**
> + * @param capabilities The capabilities of this Stack.
> + * @return The builder object.
> + * @see Stack#getCapabilities()
> + */
> + public T capabilities(Set capabilities) {
> + this.capabilities = capabilities;
> + return self();
> +
I think this is a reasonable way to approach this and not break backwards
compatibility or force the user to always deal with `Map` when
the more common case is `Map`
@nacx @inbarsto Since you were kind enough to reply to the [Dealing with
different JSON value types in a
Map](http://mail-archi
> + }
> +],
> +"checksum": "32c08d302f9206668030d47789b77858",
> +"min_ram": "1",
> +"disk_format": "qcow2",
> +"image_name": "Ubuntu LTS 14.04",
> +"bdm_v2": "True",
> +"image_id": "cfefefc1-eba2-4b1e-9b07-a8c74a872d65",
> +"
> +package org.jclouds.openstack.nova.v2_0.features;
> +
> +import com.google.common.collect.FluentIterable;
> +import com.squareup.okhttp.mockwebserver.MockResponse;
> +import com.squareup.okhttp.mockwebserver.MockWebServer;
> +import org.jclouds.openstack.nova.v2_0.NovaApi;
> +import org.jclouds.
> @@ -271,6 +282,10 @@ public Resource getServer() {
>return this.metadata;
> }
>
> + public Map getComplexMetadata() {
Both `getComplexMetadata()` and `getMetadata()` will need to be documented very
well. Please explain why each one exists and that `metadata` will always be a
su
> + @Override
> + public Image deserialize(JsonElement jsonElement, Type type,
> JsonDeserializationContext context)
> + throws JsonParseException {
> + JsonObject json = jsonElement.getAsJsonObject();
> +
> + Map complexMetatdata = null;
> + Map meta
> super(id, name, links, uuid, tenantId, userId, updated, created,
> hostId, accessIPv4, accessIPv6, status, null, flavor, keyName, configDrive,
> addresses, metadata, extendedStatus, extendedAttributes, diskConfig);
> }
>}
> }
> +
> + @Singleton
> + public
> @@ -56,9 +61,10 @@
> @Singleton
> public Map provideCustomAdapterBindings() {
>return ImmutableMap.of(
> -HostResourceUsage.class, new HostResourceUsageAdapter(),
> -ServerWithSecurityGroups.class, new
> ServerWithSecurityGroupsAdapter(),
> -Se
> })
> protected ServerInternalWithoutImage(String id, @Nullable String
> name, java.util.Set links, @Nullable String uuid, String tenantId,
> - String userId, Date updated, Date created,
> @Nullable String hostId, @Nullable String accessIPv4,
[
https://issues.apache.org/jira/browse/JCLOUDS-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14249993#comment-14249993
]
Andrea Turli commented on JCLOUDS-664:
--
Hi [~Bhash90],
Good start! I think OSImageT
Thanks @devcsrj! I'll have a look at the PR this week so you can move forward.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/72#issuecomment-67297972
35 matches
Mail list logo