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

Method writehb

scripts/vm/hypervisor/ovm3/storagehealth.py:60–69  ·  view source on GitHub ↗
(self,file="")

Source from the content-addressed store, hash-verified

58 return 0
59
60 def writehb(self,file=""):
61 if file:
62 nfile="%s.new" % (file)
63 epoch=time.time()
64 text_file = open("%s" % nfile, "w")
65 text_file.write("%s" % epoch)
66 text_file.close()
67 shutil.move(nfile,file)
68 self.logger.debug('Worked on file %s for %s' %
69 (file, (time.time() - epoch)))
70
71 """ We only want mounted nfs filesystems """
72 def nfsoutput(self):

Callers 1

targetMethod · 0.95

Calls 4

debugMethod · 0.80
writeMethod · 0.65
closeMethod · 0.65
moveMethod · 0.45

Tested by

no test coverage detected