mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
util: Add EncryptionTypeNone and unit tests
Add type none to distinguish disabled encryption (positive result) from invalid configuration (negative result). Signed-off-by: Marcel Lauhoff <marcel.lauhoff@suse.com>
This commit is contained in:
committed by
mergify[bot]
parent
f89076b1d7
commit
2abfafdf3f
@ -383,11 +383,13 @@ func (conn *Connection) CheckReservation(ctx context.Context,
|
||||
}
|
||||
}
|
||||
|
||||
if encryptionType != util.EncryptionTypeInvalid {
|
||||
if encryptionType != util.EncryptionTypeNone {
|
||||
if savedImageAttributes.EncryptionType != encryptionType {
|
||||
return nil, fmt.Errorf("internal state inconsistent, omap encryption type"+
|
||||
" mismatch, request KMS (%s) volume UUID (%s) volume omap KMS (%d)",
|
||||
kmsConfig, objUUID, savedImageAttributes.EncryptionType)
|
||||
" mismatch, request type %q(%d) volume UUID (%s) volume omap encryption type %q (%d)",
|
||||
util.EncryptionTypeString(encryptionType), encryptionType,
|
||||
objUUID, util.EncryptionTypeString(savedImageAttributes.EncryptionType),
|
||||
savedImageAttributes.EncryptionType)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user