1#!/usr/bin/env python
2#############################################################################
3# Copyright (c) 2020 Balabit
4#
5# This program is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 as published
7# by the Free Software Foundation, or (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17#
18# As an additional exemption you are allowed to compile & link against the
19# OpenSSL libraries as published by the OpenSSL project. See the file
20# COPYING for details.
21#
22#############################################################################
23
24
25class Rewrite(object):
26    group_type = "rewrite"
27
28    def __init__(self, driver_name, positional_parameters, **options):
29        self.driver_name = driver_name
30        self.options = options
31        self.positional_parameters = positional_parameters
32
33
34class SetTag(Rewrite):
35    def __init__(self, tag, **options):
36        super(SetTag, self).__init__("set_tag", [tag], **options)
37
38
39class SetPri(Rewrite):
40    def __init__(self, pri, **options):
41        super(SetPri, self).__init__("set_pri", [pri], **options)
42