address comment

This commit is contained in:
Pearl Dsilva 2026-04-29 12:49:55 -04:00
parent e3f1ccbf86
commit f29002bf08
3 changed files with 4 additions and 8 deletions

View File

@ -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;

View File

@ -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) {

View File

@ -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
}
}