本文整理汇总了Java中org.openstack4j.api.OSClient.OSClientV3类的典型用法代码示例。如果您正苦于以下问题:Java OSClientV3类的具体用法?Java OSClientV3怎么用?Java OSClientV3使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OSClientV3类属于org.openstack4j.api.OSClient包,在下文中一共展示了OSClientV3类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: authenticateAndGetObjectStorageService
import org.openstack4j.api.OSClient.OSClientV3; //导入依赖的package包/类
private ObjectStorageService authenticateAndGetObjectStorageService() {
String OBJECT_STORAGE_AUTH_URL = "https://identity.open.softlayer.com/v3";
Identifier domainIdentifier = Identifier.byName(DOMAIN_ID);
System.out.println("Authenticating...");
OSClientV3 os = OSFactory.builderV3()
.endpoint(OBJECT_STORAGE_AUTH_URL)
.credentials(USERNAME,PASSWORD, domainIdentifier)
.scopeToProject(Identifier.byId(PROJECT_ID))
.authenticate();
System.out.println("Authenticated successfully!");
ObjectStorageService objectStorage = os.objectStorage();
return objectStorage;
}
开发者ID:ibm-bluemix-mobile-services,项目名称:bluemix-objectstorage-sample-liberty,代码行数:20,代码来源:SimpleServlet.java
示例2: getOsClient
import org.openstack4j.api.OSClient.OSClientV3; //导入依赖的package包/类
public OSClientV3 getOsClient() {
this.reauth();
return this.os;
}
示例3: createAuthenticated
import org.openstack4j.api.OSClient.OSClientV3; //导入依赖的package包/类
@Override
public OSClientV3 createAuthenticated() {
return this.factory.authenticate();
}