def nodefile(self, filename, contents, mode = 0644):
        f = self.opennodefile(filename, "w")
        f.write(contents)
        os.chmod(f.name, mode)
        f.close()
        self.info("created nodefile: '%s'; mode: 0%o" % (f.name, mode))
dataset/ETHPy150Open coreemu/core/daemon/core/phys/pnodes.py/PhysicalNode.nodefile/original