Commit dcbc6f79 by Bach Dániel

firewall: store iptables chains in OrderedDict

parent 4f0c58b6
import re
import logging
from collections import OrderedDict
from netaddr import IPAddress, AddrFormatError
from datetime import datetime, timedelta
from itertools import product
......@@ -18,7 +19,7 @@ logger = logging.getLogger(__name__)
class BuildFirewall:
def __init__(self):
self.chains = {}
self.chains = OrderedDict()
def add_rules(self, *args, **kwargs):
for chain_name, ipt_rule in kwargs.items():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment