Search in sources :

Example 1 with JavaStorageLayer

use of com.cloud.utils.storage.JavaStorageLayer in project cosmic by MissionCriticalCloud.

the class KvmStorageProcessor method configure.

public boolean configure(final String name, final Map<String, Object> params) throws ConfigurationException {
    this.storageLayer = new JavaStorageLayer();
    this.storageLayer.configure("StorageLayer", params);
    String storageScriptsDir = (String) params.get("storage.scripts.dir");
    if (storageScriptsDir == null) {
        storageScriptsDir = getDefaultStorageScriptsDir();
    }
    this.createTmplPath = Script.findScript(storageScriptsDir, "createtmplt.sh");
    if (this.createTmplPath == null) {
        throw new ConfigurationException("Unable to find the createtmplt.sh");
    }
    this.manageSnapshotPath = Script.findScript(storageScriptsDir, "managesnapshot.sh");
    if (this.manageSnapshotPath == null) {
        throw new ConfigurationException("Unable to find the managesnapshot.sh");
    }
    this.cmdsTimeout = ((Integer) params.get("cmds.timeout")) * 1000;
    return true;
}
Also used : ConfigurationException(javax.naming.ConfigurationException) JavaStorageLayer(com.cloud.utils.storage.JavaStorageLayer)

Example 2 with JavaStorageLayer

use of com.cloud.utils.storage.JavaStorageLayer in project cosmic by MissionCriticalCloud.

the class LibvirtComputingResource method initStorage.

private void initStorage(final Map<String, Object> propertiesMap) throws ConfigurationException {
    this.storage = new JavaStorageLayer();
    this.storage.configure("StorageLayer", propertiesMap);
}
Also used : JavaStorageLayer(com.cloud.utils.storage.JavaStorageLayer)

Aggregations

JavaStorageLayer (com.cloud.utils.storage.JavaStorageLayer)2 ConfigurationException (javax.naming.ConfigurationException)1