Example #1
0
    def allocate_dev(self):
        context = self._config.context
        if "block_device" in context.ami:
            return BlockDevice(context.ami.block_device, None)

        with flock(self._lock_file):
            return self.find_available_dev()
Example #2
0
    def allocate_dev(self):
        context = self._config.context
        if "block_device" in context.ami:
            return BlockDevice(context.ami.block_device, None)

        with flock(self._lock_file):
            return self.find_available_dev()
Example #3
0
 def __enter__(self):
     with flock(self._lock_file):
         dev = self.find_available_dev()
     self._dev = dev
     return self._dev.node
Example #4
0
 def __enter__(self):
     with flock(self._lock_file):
         dev = self.find_available_dev()
     self._dev = dev
     return self._dev.node