Exemple #1
0
 def encryption(self, encryption):
     if self._encryption is None:
         if encryption in Constants.valid_args('create', 'encryption'):
             self._encryption = encryption
         else:
             raise Exception('Invalid arg for encryption: ' + encryption)
     else:
         raise Exception('Cannot reassign encryption value.')
Exemple #2
0
 def type(self, type):
     if not type in Constants.valid_args('create', 'type'):
         raise Exception('Invalid argument. Type arg must be among the following ' + ', '.join(valid_args('create')))
Exemple #3
0
 def fs(self, fs):
     if fs not in Constants.valid_args('create', 'fs'):
         raise Exception('Invalid argument. File-system (fs) arg must be among the following: ' + ', '.join(valid_args('create', 'fs')))
     else:
         self._fs = fs