use of org.openstack.client.common.OpenstackSession in project platformlayer by platformlayer.
the class OpenstackCloudHelpers method buildOpenstackSession.
private OpenstackSession buildOpenstackSession(OpenstackCloud cloud) throws OpsException {
String authUrl = cloud.endpoint;
String username = cloud.username;
String secret = cloud.password.plaintext();
String tenant = cloud.tenant;
OpenstackCredentials credentials = new OpenstackCredentials(authUrl, username, secret, tenant);
OpenstackSession session = OpenstackSession.create();
session.authenticate(credentials, true);
session.enable(OpenstackSession.Feature.VERBOSE);
return session;
}
use of org.openstack.client.common.OpenstackSession in project platformlayer by platformlayer.
the class OpenstackCasStore method getSession.
private OpenstackSession getSession() {
if (this.session == null) {
OpenstackSession session = OpenstackSession.create();
session.authenticate(getCredentials(), true);
this.session = session;
}
return this.session;
}
use of org.openstack.client.common.OpenstackSession in project platformlayer by platformlayer.
the class OpenstackBackupContext method getOpenstackSession.
public OpenstackSession getOpenstackSession() {
if (openstackSession == null) {
OpenstackSession session = OpenstackSession.create();
session.authenticate(credentials, false);
openstackSession = session;
ensureContainer();
}
return openstackSession;
}
Aggregations