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

Method clone

scripts/vm/hypervisor/xenserver/xenserver56/NFSSR.py:249–257  ·  view source on GitHub ↗
(self, sr_uuid, vdi_uuid)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

intFunction · 0.85
get_mtimeMethod · 0.45

Tested by

no test coverage detected