Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5BF06200BBA for ; Sat, 5 Nov 2016 17:47:26 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 5A836160AEF; Sat, 5 Nov 2016 16:47:26 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7AA35160AE9 for ; Sat, 5 Nov 2016 17:47:25 +0100 (CET) Received: (qmail 55578 invoked by uid 500); 5 Nov 2016 16:47:24 -0000 Mailing-List: contact user-help@jclouds.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@jclouds.apache.org Delivered-To: mailing list user@jclouds.apache.org Received: (qmail 55568 invoked by uid 99); 5 Nov 2016 16:47:24 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Nov 2016 16:47:24 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 13CFE1A07BA for ; Sat, 5 Nov 2016 16:47:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.381 X-Spam-Level: ** X-Spam-Status: No, score=2.381 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 0R3_n7tageMl for ; Sat, 5 Nov 2016 16:47:21 +0000 (UTC) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 499AC5F3BD for ; Sat, 5 Nov 2016 16:47:21 +0000 (UTC) Received: by mail-lf0-f45.google.com with SMTP id o141so13164019lff.1 for ; Sat, 05 Nov 2016 09:47:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=2C9b8+CW/f5zlHAuRUC6KuUJOI7rMpzJ98nu24X2Uvg=; b=m2Q3XZLB/YlwgklXKaCAQS5GE+9dFjfuf0e7mVilVKSN8ds6HBU9xzXasQPdX0q0AJ G2/U1+QxVL1YKl7ARrBztnZXWMUTCjx60RHlTCdK0i7LtdFXhv1FTsDX87vHPWEe2BJV 03WTM7vZJkmtloWOjtILGXnpyq64ta5EjQ4zDHSGIx4DE6p981lv6VyubgyMU/IqADfP v5Liq64/ceSAjV44ctcbzm6I4EKTCGWK13F+hk0jHrSOsuiX6BLynh7gFphEXbGhihV2 ooBaV3fjnz+/y2WRDRAabGOBdQ0Wk58G9oHfSTFw4wJaNKk1SJ2tonuycpz+ganFlT8b Dpzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=2C9b8+CW/f5zlHAuRUC6KuUJOI7rMpzJ98nu24X2Uvg=; b=JtPhkjjbPWZxKKfjKHQQkyEBc+hVz/xOtGzYtsnUEv3rrCKpihTh5UGkOvdRrfHB1d uqSiSRuOBpRDk+AX4VUMCZGSsvcQEK1NT1yfOxJBu1SquBStge/5e1Vs7M+6l8GCIq55 GYwfynF2geLfgV/op9pI5xnHrccLlkmtOrsu1GvYn3Dy5ClZwcJmc0N7b4xzpv9fz6Eo QXxpWTikNa6tZQ5GFTcvBqeqHWDs6kWP7Rdu+zjF3pOygiGkR+inccZ0oRA4BqiOkOJW ykU/bi/beK2fV6jZqUTv8NGWF5CeVYFD4aZ0YO0/+oYLW2YIKkbsuh8JdMzAymDmhpcS eUJw== X-Gm-Message-State: ABUngvcwPdUJnXTmXG9w0hAmYUqdouryO5fLDJAYdXrvPPZMrE5++VbGZLaK6TxcKyb4tH0w9G4/7qeNvzI6Tw== X-Received: by 10.25.192.1 with SMTP id q1mr1147633lff.143.1478364433769; Sat, 05 Nov 2016 09:47:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.160.20 with HTTP; Sat, 5 Nov 2016 09:47:13 -0700 (PDT) In-Reply-To: <1d555e42c603b1a9958ea2ce74bb65d5@qrmedia.com> References: <001a114ba18abcba650540901674@google.com> <1d555e42c603b1a9958ea2ce74bb65d5@qrmedia.com> From: Ken Date: Sat, 5 Nov 2016 17:47:13 +0100 Message-ID: Subject: Re: Fwd: Delivery Status Notification (Failure) To: Andrew Phillips Cc: user@jclouds.apache.org Content-Type: multipart/alternative; boundary=f403045e3594ec6b130540908a2f archived-at: Sat, 05 Nov 2016 16:47:26 -0000 --f403045e3594ec6b130540908a2f Content-Type: text/plain; charset=UTF-8 Hi Andrew, Thanks, sorry for the longer message before. Here is a short code example, directly taken from the examples here. ..... > > public Swifter() { > Iterable modules = ImmutableSet.of( > new SLF4JLoggingModule()); > > String provider = "openstack-swift"; > String identity = "xx:xx"; > String credential = "xxxx"; > > swiftApi = ContextBuilder.newBuilder(provider) > .endpoint("http://xx.xx.xx:50034/v2.0") > .credentials(identity, credential) > .modules(modules) > .buildApi(SwiftApi.class); > } > > private void createContainer() { > System.out.println("Create Container"); > > ContainerApi containerApi = swiftApi.getContainerApi("RegionOne"); > CreateContainerOptions options = CreateContainerOptions.Builder > .metadata(ImmutableMap.of( > "key1", "value1", > "key2", "value2")); > > containerApi.create(CONTAINER_NAME, options); > > System.out.println(" " + CONTAINER_NAME); > } > > private void uploadObjectFromString() { > System.out.println("Upload Object From String"); > > ObjectApi objectApi = swiftApi.getObjectApi("RegionOne", > CONTAINER_NAME); > Payload payload = newByteSourcePayload(wrap("Hello > World".getBytes())); > > objectApi.put(OBJECT_NAME, payload, > PutOptions.Builder.metadata(ImmutableMap.of("key1", "value1"))); > > System.out.println(" " + OBJECT_NAME); > } > > > } > On Sat, Nov 5, 2016 at 5:39 PM, Andrew Phillips wrote: > Hi Ken > > I want to use Jcloud swift and nova, the connection always time outs >> after >> successfully authenticating... >> > > Could you provide a short code sample (with passwords etc. obfuscated) to > help us understand how the connection is configured? > > Regards > > ap > --f403045e3594ec6b130540908a2f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Andrew,

Thanks, sorry for the longer= message before.
Here is a short code example, directly taken fro= m=C2=A0the example= s here.

.....

=C2=A0 =C2=A0public Swifter() {<= /div>
=C2=A0 =C2=A0 =C2=A0 Iterable<Module> modules =3D Immutable= Set.<Module>of(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 n= ew SLF4JLoggingModule());

=C2=A0 =C2=A0 =C2=A0 Str= ing provider =3D "openstack-swift";
=C2=A0 =C2=A0 =C2= =A0 String identity =3D "xx:xx";
=C2=A0 =C2=A0 =C2=A0 S= tring credential =3D "xxxx";

=C2=A0 =C2= =A0 =C2=A0 swiftApi =3D ContextBuilder.newBuilder(provider)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .endpoint("http://xx.xx.xx:50034/v2.0") =C2=A0
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .credentials(identity, credential= )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .modules(modules)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .buildApi(SwiftApi.class);=
=C2=A0 =C2=A0}

=C2=A0 =C2=A0private voi= d createContainer() {
=C2=A0 =C2=A0 =C2=A0 System.out.println(&qu= ot;Create Container");

=C2=A0 =C2=A0 =C2=A0 C= ontainerApi containerApi =3D swiftApi.getContainerApi("RegionOne"= );
=C2=A0 =C2=A0 =C2=A0 CreateContainerOptions options =3D Create= ContainerOptions.Builder
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 .metadata(ImmutableMap.of(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 "key1", "value1",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "key2= ", "value2"));

=C2=A0 =C2=A0 =C2=A0= containerApi.create(CONTAINER_NAME, options);

=C2= =A0 =C2=A0 =C2=A0 System.out.println(" =C2=A0" + CONTAINER_NAME);=
=C2=A0 =C2=A0}

=C2=A0 =C2=A0private voi= d uploadObjectFromString() {
=C2=A0 =C2=A0 =C2=A0 System.out.prin= tln("Upload Object From String");

=C2=A0= =C2=A0 =C2=A0 ObjectApi objectApi =3D swiftApi.getObjectApi("RegionOn= e", CONTAINER_NAME);
=C2=A0 =C2=A0 =C2=A0 Payload payload = =3D newByteSourcePayload(wrap("Hello World".getBytes()));

=C2=A0 =C2=A0 =C2=A0 objectApi.put(OBJECT_NAME, payload, = PutOptions.Builder.metadata(ImmutableMap.of("key1", "value1&= quot;)));

=C2=A0 =C2=A0 =C2=A0 System.out.println(= " =C2=A0" + OBJECT_NAME);
=C2=A0 =C2=A0}

=
=C2=A0 =C2=A0
}

On Sat, Nov 5, 2016 at 5:39 PM,= Andrew Phillips <aphillips@qrmedia.com> wrote:
Hi Ken

I want to use Jcloud swift and nova, the connection always time outs
after
successfully authenticating...

Could you provide a short code sample (with passwords etc. obfuscated) to h= elp us understand how the connection is configured?

Regards

ap

--f403045e3594ec6b130540908a2f--