File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed
systemvm/patches/debian/config/opt/cloud/bin Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -64,10 +64,6 @@ def merge(dbag, rules):
6464 print "removing index %s" % str (index )
6565 if not index == - 1 :
6666 del dbag [source_ip ][index ]
67- # If all forwarding rules have been deleted
68- # remove IP from databag
69- if dbag [source_ip ] == []:
70- del dbag [source_ip ]
7167
7268 return dbag
7369
Original file line number Diff line number Diff line change @@ -45,13 +45,9 @@ def merge(dbag, ip):
4545 if ip ['nw_type' ] == 'control' :
4646 dbag [ip ['device' ]] = [ip ]
4747 else :
48- if ip ['add' ]:
49- if index != - 1 :
50- dbag [ip ['device' ]][index ] = ip
51- else :
52- dbag .setdefault (ip ['device' ], []).append (ip )
48+ if index != - 1 :
49+ dbag [ip ['device' ]][index ] = ip
5350 else :
54- if index != - 1 :
55- del (dbag [ip ['device' ]][index ])
51+ dbag .setdefault (ip ['device' ], []).append (ip )
5652
5753 return dbag
You can’t perform that action at this time.
0 commit comments