use of org.libvirt.StoragePool in project cloudstack by apache.
the class LibvirtStoragePoolTest method testExternalSnapshot.
public void testExternalSnapshot() {
String uuid = "60b46738-c5d0-40a9-a79e-9a4fe6295db7";
String name = "myfirstpool";
StorageAdaptor adapter = Mockito.mock(LibvirtStorageAdaptor.class);
StoragePool storage = Mockito.mock(StoragePool.class);
LibvirtStoragePool nfsPool = new LibvirtStoragePool(uuid, name, StoragePoolType.NetworkFilesystem, adapter, storage);
assertFalse(nfsPool.isExternalSnapshot());
LibvirtStoragePool rbdPool = new LibvirtStoragePool(uuid, name, StoragePoolType.RBD, adapter, storage);
assertTrue(rbdPool.isExternalSnapshot());
LibvirtStoragePool clvmPool = new LibvirtStoragePool(uuid, name, StoragePoolType.CLVM, adapter, storage);
assertTrue(clvmPool.isExternalSnapshot());
}
Aggregations