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

Method commit

systemvm/debian/opt/cloud/bin/cs/CsFile.py:58–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

56 self.new_config = []
57
58 def commit(self):
59 if not self.is_changed():
60 logging.info("Nothing to commit. The %s file did not change" % self.filename)
61 return False
62 handle = open(self.filename, "w+")
63 for line in self.new_config:
64 handle.write(line)
65 handle.close()
66 logging.info("Wrote edited file %s" % self.filename)
67 self.config = list(self.new_config)
68 logging.info("Updated file in-cache configuration")
69 return True
70
71 def dump(self):
72 for line in self.new_config:

Callers 14

configure_ipsecMethod · 0.95
add_l2tp_ipsec_userMethod · 0.95
del_l2tp_ipsec_userMethod · 0.95
configure_l2tpIpsecMethod · 0.95
setupMethod · 0.95
_redundant_onMethod · 0.95
write_hostsMethod · 0.95
processMethod · 0.95
processMethod · 0.45

Calls 4

is_changedMethod · 0.95
writeMethod · 0.65
closeMethod · 0.65
infoMethod · 0.45

Tested by

no test coverage detected