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

Method add_chain

systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py:189–194  ·  view source on GitHub ↗

Add the given chain if it is not already present

(self, rule)

Source from the content-addressed store, hash-verified

187 self.get_unseen()
188
189 def add_chain(self, rule):
190 """ Add the given chain if it is not already present """
191 if not self.has_chain(rule.get_table(), rule.get_chain()):
192 if rule.get_chain():
193 CsHelper.execute("iptables -t %s -N %s" % (rule.get_table(), rule.get_chain()))
194 self.chain.add(rule.get_table(), rule.get_chain())
195
196 def del_standard(self):
197 """ Del rules that are there but should not be deleted

Callers 1

compareMethod · 0.95

Calls 5

has_chainMethod · 0.95
get_tableMethod · 0.80
get_chainMethod · 0.80
executeMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected