@@ -135,34 +135,49 @@ public static enum TemplateType {
135135 ISODISK /* Template corresponding to a iso (non root disk) present in an OVA */
136136 }
137137
138+ public enum EncryptionSupport {
139+ /**
140+ * Encryption not supported.
141+ */
142+ Unsupported ,
143+ /**
144+ * Will use hypervisor encryption driver (qemu -> luks)
145+ */
146+ Hypervisor ,
147+ /**
148+ * Storage pool handles encryption and just provides an encrypted volume
149+ */
150+ Storage
151+ }
152+
138153 public static enum StoragePoolType {
139- Filesystem (false , true , true ), // local directory
140- NetworkFilesystem (true , true , true ), // NFS
141- IscsiLUN (true , false , false ), // shared LUN, with a clusterfs overlay
142- Iscsi (true , false , false ), // for e.g., ZFS Comstar
143- ISO (false , false , false ), // for iso image
144- LVM (false , false , false ), // XenServer local LVM SR
145- CLVM (true , false , false ),
146- RBD (true , true , false ), // http://libvirt.org/storage.html#StorageBackendRBD
147- SharedMountPoint (true , true , true ),
148- VMFS (true , true , false ), // VMware VMFS storage
149- PreSetup (true , true , false ), // for XenServer, Storage Pool is set up by customers.
150- EXT (false , true , false ), // XenServer local EXT SR
151- OCFS2 (true , false , false ),
152- SMB (true , false , false ),
153- Gluster (true , false , false ),
154- PowerFlex (true , true , true ), // Dell EMC PowerFlex/ScaleIO (formerly VxFlexOS)
155- ManagedNFS (true , false , false ),
156- Linstor (true , true , false ),
157- DatastoreCluster (true , true , false ), // for VMware, to abstract pool of clusters
158- StorPool (true , true , true ),
159- FiberChannel (true , true , false ); // Fiber Channel Pool for KVM hypervisors is used to find the volume by WWN value (/dev/disk/by-id/wwn-<wwnvalue>)
154+ Filesystem (false , true , EncryptionSupport . Hypervisor ), // local directory
155+ NetworkFilesystem (true , true , EncryptionSupport . Hypervisor ), // NFS
156+ IscsiLUN (true , false , EncryptionSupport . Unsupported ), // shared LUN, with a clusterfs overlay
157+ Iscsi (true , false , EncryptionSupport . Unsupported ), // for e.g., ZFS Comstar
158+ ISO (false , false , EncryptionSupport . Unsupported ), // for iso image
159+ LVM (false , false , EncryptionSupport . Unsupported ), // XenServer local LVM SR
160+ CLVM (true , false , EncryptionSupport . Unsupported ),
161+ RBD (true , true , EncryptionSupport . Unsupported ), // http://libvirt.org/storage.html#StorageBackendRBD
162+ SharedMountPoint (true , true , EncryptionSupport . Hypervisor ),
163+ VMFS (true , true , EncryptionSupport . Unsupported ), // VMware VMFS storage
164+ PreSetup (true , true , EncryptionSupport . Unsupported ), // for XenServer, Storage Pool is set up by customers.
165+ EXT (false , true , EncryptionSupport . Unsupported ), // XenServer local EXT SR
166+ OCFS2 (true , false , EncryptionSupport . Unsupported ),
167+ SMB (true , false , EncryptionSupport . Unsupported ),
168+ Gluster (true , false , EncryptionSupport . Unsupported ),
169+ PowerFlex (true , true , EncryptionSupport . Hypervisor ), // Dell EMC PowerFlex/ScaleIO (formerly VxFlexOS)
170+ ManagedNFS (true , false , EncryptionSupport . Unsupported ),
171+ Linstor (true , true , EncryptionSupport . Storage ),
172+ DatastoreCluster (true , true , EncryptionSupport . Unsupported ), // for VMware, to abstract pool of clusters
173+ StorPool (true , true , EncryptionSupport . Hypervisor ),
174+ FiberChannel (true , true , EncryptionSupport . Unsupported ); // Fiber Channel Pool for KVM hypervisors is used to find the volume by WWN value (/dev/disk/by-id/wwn-<wwnvalue>)
160175
161176 private final boolean shared ;
162177 private final boolean overProvisioning ;
163- private final boolean encryption ;
178+ private final EncryptionSupport encryption ;
164179
165- StoragePoolType (boolean shared , boolean overProvisioning , boolean encryption ) {
180+ StoragePoolType (boolean shared , boolean overProvisioning , EncryptionSupport encryption ) {
166181 this .shared = shared ;
167182 this .overProvisioning = overProvisioning ;
168183 this .encryption = encryption ;
@@ -177,6 +192,10 @@ public boolean supportsOverProvisioning() {
177192 }
178193
179194 public boolean supportsEncryption () {
195+ return encryption == EncryptionSupport .Hypervisor || encryption == EncryptionSupport .Storage ;
196+ }
197+
198+ public EncryptionSupport encryptionSupportMode () {
180199 return encryption ;
181200 }
182201 }
0 commit comments