mirror of https://github.com/apache/cloudstack.git
address comment
This commit is contained in:
parent
e3f1ccbf86
commit
f29002bf08
|
|
@ -207,7 +207,7 @@ public class ClvmStorageAdaptor extends LibvirtStorageAdaptor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void createTemplateOnClvmNg(String templatePath, String templateUuid, int timeout, KVMStoragePool pool) {
|
||||
public void createTemplate(String templatePath, String templateUuid, int timeout, KVMStoragePool pool) {
|
||||
String vgName = getVgName(pool.getLocalPath());
|
||||
String lvName = "template-" + templateUuid;
|
||||
String lvPath = "/dev/" + vgName + "/" + lvName;
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ public class KVMStoragePoolManager {
|
|||
|
||||
public void createTemplateOnClvmNg(String templatePath, String templateUuid, int timeout, KVMStoragePool pool) {
|
||||
StorageAdaptor adaptor = getStorageAdaptor(pool.getType());
|
||||
adaptor.createTemplateOnClvmNg(templatePath, templateUuid, timeout, pool);
|
||||
adaptor.createTemplate(templatePath, templateUuid, timeout, pool);
|
||||
}
|
||||
|
||||
public Ternary<Boolean, Map<String, String>, String> prepareStorageClient(StoragePoolType type, String uuid, Map<String, String> details) {
|
||||
|
|
|
|||
|
|
@ -149,11 +149,7 @@ public interface StorageAdaptor {
|
|||
return new Pair<>(true, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a template LV on a CLVM_NG pool from the given QCOW2 template file.
|
||||
* Default implementation is a no-op; overridden by ClvmStorageAdaptor.
|
||||
*/
|
||||
default void createTemplateOnClvmNg(String templatePath, String templateUuid, int timeout, KVMStoragePool pool) {
|
||||
// no-op for non-CLVM adaptors
|
||||
default void createTemplate(String templatePath, String templateUuid, int timeout, KVMStoragePool pool) {
|
||||
// no-op
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue