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.')
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')))
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