Hi,
I'm using jClouds to access my swift storage. For now I've been using a
test machine, which have only supported API v1.0 with basic
username/password authentication. Now I have to make my code work with real
openstack swift installation which supports API v2.0 and provides
authentication via keystone.

Properties properties = new Properties();
properties.setProperty("swift.endpoint", endpoint);
BlobStoreContext context =
ContextBuilder.newBuilder("swift").overrides(properties).credentials(user,
password).buildView(BlobStoreContext.class);

 blobStore = context.getBlobStore();
 if (!blobStore.containerExists(container)) {
        blobStore.createContainerInLocation(null, container);
 }

I tried this solution
http://stackoverflow.com/questions/9423183/java-library-to-talk-to-swift-openstack-with-keystone-authentication(using
"swift-keystone" as provider) but I got Exception in thread "main"
java.util.NoSuchElementException: apiType object-store not found in catalog
[] while calling blobStore.containerExists(container))
I'm new to swift and jClouds and can't find any examples in the internet :(
Any help appreciated:)
Regards,
Ola

Reply via email to