MCPcopy Create free account
hub / github.com/apache/cloudstack / has_rule

Method has_rule

systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py:115–122  ·  view source on GitHub ↗
(self, new_rule)

Source from the content-addressed store, hash-verified

113 return self.chain.has_chain(table, chain)
114
115 def has_rule(self, new_rule):
116 for r in self.get():
117 if new_rule == r:
118 if new_rule.get_count() > 0:
119 continue
120 r.mark_seen()
121 return True
122 return False
123
124 def get_unseen(self):
125 del_list = [x for x in self.rules if x.unseen()]

Callers 1

compareMethod · 0.95

Calls 3

getMethod · 0.95
mark_seenMethod · 0.80
get_countMethod · 0.45

Tested by

no test coverage detected