Search in sources :

Example 1 with StorageConfiguration

use of org.platformlayer.ops.machines.StorageConfiguration in project platformlayer by platformlayer.

the class OpenstackBackupContextFactory method build.

@Override
public OpenstackBackupContext build(ItemBase item) throws OpsException {
    Machine machine = instances.findMachine(item);
    if (machine == null) {
        throw new OpsException("Cannot determine machine for: " + item);
    }
    StorageConfiguration storageConfiguration = cloud.getStorageConfiguration(machine);
    return build(storageConfiguration);
}
Also used : OpsException(org.platformlayer.ops.OpsException) OpenstackStorageConfiguration(org.platformlayer.service.cloud.openstack.ops.OpenstackStorageConfiguration) StorageConfiguration(org.platformlayer.ops.machines.StorageConfiguration) Machine(org.platformlayer.ops.Machine)

Example 2 with StorageConfiguration

use of org.platformlayer.ops.machines.StorageConfiguration 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)

Aggregations

StorageConfiguration (org.platformlayer.ops.machines.StorageConfiguration)2 OpenstackCredentials (org.openstack.client.OpenstackCredentials)1 Machine (org.platformlayer.ops.Machine)1 OpsException (org.platformlayer.ops.OpsException)1 OpenstackStorageConfiguration (org.platformlayer.service.cloud.openstack.ops.OpenstackStorageConfiguration)1