summaryrefslogtreecommitdiff
path: root/reconfigure/configs/iptables.py
diff options
context:
space:
mode:
authorAndrew Shadura <andrew@shadura.me>2015-08-20 15:58:26 +0200
committerAndrew Shadura <andrew@shadura.me>2015-08-20 15:58:26 +0200
commitff1408420159488a106492ccd11dd234967029b6 (patch)
tree473420cee1c5229a427ec4cafead1aa6c0a26800 /reconfigure/configs/iptables.py
Imported Upstream version 0.1.29
Diffstat (limited to 'reconfigure/configs/iptables.py')
-rw-r--r--reconfigure/configs/iptables.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/reconfigure/configs/iptables.py b/reconfigure/configs/iptables.py
new file mode 100644
index 0000000..8a26211
--- /dev/null
+++ b/reconfigure/configs/iptables.py
@@ -0,0 +1,17 @@
+from reconfigure.configs.base import Reconfig
+from reconfigure.parsers import IPTablesParser
+from reconfigure.builders import BoundBuilder
+from reconfigure.items.iptables import IPTablesData
+
+
+class IPTablesConfig (Reconfig):
+ """
+ ``iptables-save`` and ``iptables-restore``
+ """
+ def __init__(self, **kwargs):
+ k = {
+ 'parser': IPTablesParser(),
+ 'builder': BoundBuilder(IPTablesData),
+ }
+ k.update(kwargs)
+ Reconfig.__init__(self, **k)