Search in sources :

Example 1 with OpenstackCredentials

use of org.openstack.client.OpenstackCredentials 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;
}
Also used : OpenstackSession(org.openstack.client.common.OpenstackSession) OpenstackCredentials(org.openstack.client.OpenstackCredentials)

Example 2 with OpenstackCredentials

use of org.openstack.client.OpenstackCredentials in project platformlayer by platformlayer.

the class OpenstackCloudController method getStorageConfiguration.

@Override
public StorageConfiguration getStorageConfiguration() throws OpsException {
    String authUrl = model.endpoint;
    OpenstackCredentials credentials = new OpenstackCredentials(authUrl, model.username, model.password.plaintext(), model.tenant);
    StorageConfiguration config = new OpenstackStorageConfiguration(credentials);
    return config;
}
Also used : StorageConfiguration(org.platformlayer.ops.machines.StorageConfiguration) OpenstackCredentials(org.openstack.client.OpenstackCredentials)

Example 3 with OpenstackCredentials

use of org.openstack.client.OpenstackCredentials in project platformlayer by platformlayer.

the class OpenstackCloudController method getCasStore.

@Override
public OpenstackCasStore getCasStore() {
    OpenstackCredentials credential = new OpenstackCredentials(model.endpoint, model.username, model.password.plaintext(), model.tenant);
    String containerName = "platformlayer-artifacts";
    return new OpenstackCasStore(new CasStoreInfo(false), credential, containerName);
}
Also used : CasStoreInfo(org.platformlayer.cas.CasStoreInfo) OpenstackCredentials(org.openstack.client.OpenstackCredentials)

Aggregations

OpenstackCredentials (org.openstack.client.OpenstackCredentials)3 OpenstackSession (org.openstack.client.common.OpenstackSession)1 CasStoreInfo (org.platformlayer.cas.CasStoreInfo)1 StorageConfiguration (org.platformlayer.ops.machines.StorageConfiguration)1