Extend store validation
@@ -20,6 +20,14 @@ def get_store_secret_from_definition(volume_name, volume_settings):
raise VolumeNotFoundError(
'Volume with store class `{}` is not supported.'.format(store))
+ if not secret:
+ raise VolumeNotFoundError(
+ 'Volume with store class `{}` does not define a secret.'.format(store))
+
+ if not secret_key:
+ raise VolumeNotFoundError(
+ 'Volume with store class `{}` does not define a secretKey.'.format(store))
+
return secret, secret_key
