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

Method config

python/lib/cloudutils/serviceConfig.py:820–833  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

818 bash("iptables -I INPUT -p tcp -m tcp --dport %s -j ACCEPT"%port)
819
820 def config(self):
821 try:
822 for port in self.ports:
823 self.allowPort(port)
824
825 for rule in self.rules:
826 bash("iptables " + rule)
827
828 bash("iptables-save > /etc/sysconfig/iptables")
829 self.syscfg.svo.stopService("iptables")
830 self.syscfg.svo.startService("iptables")
831 return True
832 except:
833 raise
834
835 def restore(self):
836 return True

Callers

nothing calls this directly

Calls 4

allowPortMethod · 0.95
bashClass · 0.85
stopServiceMethod · 0.45
startServiceMethod · 0.45

Tested by

no test coverage detected