简体   繁体   English

jclouds-使用身份验证v1进行openstack-swift吗?

[英]jclouds - use authentication v1 for openstack-swift?

I have an openstack-swift blob store set up with v1 authentication that I wish to access via jclouds. 我有一个设置为v1身份验证的openstack-swift blob存储,我希望通过jclouds访问。 Is there a way to do this? 有没有办法做到这一点?

(As far as I can tell, the KeystoneAuthenticationModule is always installed.) (据我所知,始终安装KeystoneAuthenticationModule。)

Thank you. 谢谢。

It should be possible to do this with jclouds. 使用jclouds应该可以做到这一点。 Try this: 尝试这个:

    ContextBuilder builder = ContextBuilder
        .newBuilder("swift")
        .credentials(IDENTITY, CREDENTIAL)
        .endpoint(ENDPOINT);
    BlobStoreContext blobStoreContext = builder.build(
        BlobStoreContext.class);
    BlobStore blobStore = blobStoreContext.getBlobStore();

Replace IDENTITY, CREDENTIAL, ENDPOINT above with the appropriate values. 将上面的IDENTITY,CREDENTIAL,ENDPOINT替换为适当的值。

After this you can use the blobStore object for actual blobstore operations such as createContainer, getBlob, putBlob, etc. 之后,您可以将blobStore对象用于实际的blobstore操作,例如createContainer,getBlob,putBlob等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM