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

Method waitfordevice

systemvm/debian/opt/cloud/bin/cs/CsAddress.py:299–309  ·  view source on GitHub ↗
(self, timeout=2)

Source from the content-addressed store, hash-verified

297 self.devlist.append(vals[0])
298
299 def waitfordevice(self, timeout=2):
300 count = 0
301 while count < timeout:
302 if self.dev in self.devlist:
303 return True
304 time.sleep(1)
305 count += 1
306 self.buildlist()
307 logging.error(
308 "Device %s cannot be configured - device was not found", self.dev)
309 return False
310
311 def list(self):
312 return self.devlist

Callers 3

processMethod · 0.80
_redundant_onMethod · 0.80
set_primaryMethod · 0.80

Calls 3

buildlistMethod · 0.95
sleepMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected