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

Method clone

scripts/vm/hypervisor/xenserver/xenserver56fp1/NFSSR.py:246–254  ·  view source on GitHub ↗
(self, sr_uuid, vdi_uuid)

Source from the content-addressed store, hash-verified

244 return super(NFSFileVDI, self).attach(sr_uuid, vdi_uuid)
245
246 def clone(self, sr_uuid, vdi_uuid):
247 timestamp_before = int(util.get_mtime(self.sr.path))
248 ret = super(NFSFileVDI, self).clone(sr_uuid, vdi_uuid)
249 timestamp_after = int(util.get_mtime(self.sr.path))
250 if timestamp_after == timestamp_before:
251 util.SMlog("SR dir timestamp didn't change, updating")
252 timestamp_after += 1
253 os.utime(self.sr.path, (timestamp_after, timestamp_after))
254 return ret
255
256
257if __name__ == '__main__':

Callers

nothing calls this directly

Calls 2

intFunction · 0.85
get_mtimeMethod · 0.45

Tested by

no test coverage detected