diff --git a/systemvm/patches/debian/config/opt/cloud/bin/configure.py b/systemvm/patches/debian/config/opt/cloud/bin/configure.py index 1a076967e9e..5e857de46e0 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/configure.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/configure.py @@ -103,10 +103,10 @@ class CsAcl(CsDataBag): rnge = '' if "first_port" in self.rule.keys() and \ self.rule['first_port'] == self.rule['last_port']: - rnge = self.rule['first_port'] + rnge = self.rule['first_port'] if "first_port" in self.rule.keys() and \ self.rule['first_port'] != self.rule['last_port']: - rnge = "%s:%s" % (rule['first_port'], rule['last_port']) + rnge = "%s:%s" % (rule['first_port'], rule['last_port']) if self.direction == 'ingress': if rule['protocol'] == "icmp": self.fw.append(["mangle", "front", @@ -136,7 +136,7 @@ class CsAcl(CsDataBag): if rule['protocol'] != "all": fwr += "-p %s " % rule['protocol'] + \ " -m %s " % rule['protocol'] + \ - " --dport %s" % rnge + " --dport %s" % rnge self.fw.append(["filter", "front", "%s -j %s" % (fwr, rule['action'])]) class AclDevice(): @@ -172,7 +172,6 @@ class CsAcl(CsDataBag): else: self.init_vr(self, direction, acl, rule, config) - def init_vpc(self, direction, acl, rule, config): self.table = "" self.device = acl.device diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs_firewallrules.py b/systemvm/patches/debian/config/opt/cloud/bin/cs_firewallrules.py index 4c7a14c0136..0cef7234c94 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs_firewallrules.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs_firewallrules.py @@ -18,14 +18,15 @@ from pprint import pprint import copy + def merge(dbag, data): - dbagc = copy.deepcopy(dbag) + dbagc = copy.deepcopy(dbag) if "rules" not in data: return dbagc for rule in data['rules']: - id = str(rule['id']) + id = str(rule['id']) if rule['revoked']: - del(dbagc[id]) + del(dbagc[id]) if id not in dbagc.keys(): - dbagc[id] = rule + dbagc[id] = rule return dbagc