def encrypt_lvm_image(): dmcrypt.create_volume( self.path.rpartition("/")[2], self.lv_path, CONF.ephemeral_storage_encryption.cipher, CONF.ephemeral_storage_encryption.key_size, key, )
def test_create_volume(self): expected_commands = [ ('cryptsetup', 'create', self.TARGET, self.PATH, '--cipher=' + self.CIPHER, '--key-size=' + str(self.KEY_SIZE), '--key-file=-') ] dmcrypt.create_volume(self.TARGET, self.PATH, self.CIPHER, self.KEY_SIZE, self.KEY) self.assertEqual(expected_commands, self.executes) self.assertEqual(self.KEY_STR, self.kwargs['process_input'])
def test_create_volume(self): expected_commands = [ ( "cryptsetup", "create", self.TARGET, self.PATH, "--cipher=" + self.CIPHER, "--key-size=" + str(self.KEY_SIZE), "--key-file=-", ) ] dmcrypt.create_volume(self.TARGET, self.PATH, self.CIPHER, self.KEY_SIZE, self.KEY) self.assertEqual(expected_commands, self.executes) self.assertEqual(self.KEY_STR, self.kwargs["process_input"])
def encrypt_lvm_image(): dmcrypt.create_volume(self.path.rpartition('/')[2], self.lv_path, CONF.ephemeral_storage_encryption.cipher, CONF.ephemeral_storage_encryption.key_size, key)