Exemplo n.º 1
0
 def _wait_snapshot(self, snapshot):
     snapshot = self._ebs_snapshot(snapshot)
     LOG.debug('Checking that EBS snapshot %s is completed', snapshot.id)
     msg = "EBS snapshot %s wasn't completed. " \
                     "Timeout reached (%s seconds)" % (
                     snapshot.id, self._global_timeout)
     util.wait_until(
         lambda: snapshot.update() and snapshot.status != 'pending',
         logger=LOG,
         error_text=msg)
     if snapshot.status == 'error':
         msg = 'Snapshot %s creation failed. AWS status is "error"' % snapshot.id
         raise storage2.StorageError(msg)
     elif snapshot.status == 'completed':
         LOG.debug('Snapshot %s completed', snapshot.id)
Exemplo n.º 2
0
 def _wait_snapshot(self, snapshot):
     snapshot = self._ebs_snapshot(snapshot)
     LOG.debug('Checking that EBS snapshot %s is completed', snapshot.id)
     msg = "EBS snapshot %s wasn't completed. " \
                     "Timeout reached (%s seconds)" % (
                     snapshot.id, self._global_timeout)
     util.wait_until(
             lambda: snapshot.update() and snapshot.status != 'pending',
             logger=LOG,
             error_text=msg
     )
     if snapshot.status == 'error':
         msg = 'Snapshot %s creation failed. AWS status is "error"' % snapshot.id
         raise storage2.StorageError(msg)
     elif snapshot.status == 'completed':
         LOG.debug('Snapshot %s completed', snapshot.id)
Exemplo n.º 3
0
 def _status(self):
     self._check_ec2()
     snapshot = self._ebs_snapshot(self.id)
     snapshot.update()
     return self._status_map[snapshot.status]
Exemplo n.º 4
0
 def _status(self):
     self._check_ec2()
     snapshot = self._ebs_snapshot(self.id)
     snapshot.update()
     return self._status_map[snapshot.status]