@utils.retry(exception.SnapshotIsBusy)
def wait_for_busy_snapshot(self, flexvol, snapshot_name):
    'Checks for and handles a busy snapshot.\n\n        If a snapshot is busy, for reasons other than cloning, an exception is\n        raised immediately. Otherwise, wait for a period of time for the clone\n        dependency to finish before giving up. If the snapshot is not busy then\n        no action is taken and the method exits.\n        '
    snapshot = self.get_snapshot(flexvol, snapshot_name)
    if (not snapshot['busy']):
        LOG.debug('Backing consistency group snapshot %s available for deletion.', snapshot_name)
        return
    else:
        LOG.debug('Snapshot %(snap)s for vol %(vol)s is busy, waiting for volume clone dependency to clear.', {'snap': snapshot_name, 'vol': flexvol})
        raise exception.SnapshotIsBusy(snapshot_name=snapshot_name)
Checks for and handles a busy snapshot.

If a snapshot is busy, for reasons other than cloning, an exception is
raised immediately. Otherwise, wait for a period of time for the clone
dependency to finish before giving up. If the snapshot is not busy then
no action is taken and the method exits.
@utils.retry(exception.SnapshotIsBusy)
def wait_for_busy_snapshot(self, flexvol, snapshot_name):
    'Checks for and handles a busy snapshot.\n\n        If a snapshot is busy, for reasons other than cloning, an exception is\n        raised immediately. Otherwise, wait for a period of time for the clone\n        dependency to finish before giving up. If the snapshot is not busy then\n        no action is taken and the method exits.\n        '
    snapshot = self.get_snapshot(flexvol, snapshot_name)
    if (not snapshot['busy']):
        LOG.debug('Backing consistency group snapshot %s available for deletion.', snapshot_name)
        return
    else:
        LOG.debug('Snapshot %(snap)s for vol %(vol)s is busy, waiting for volume clone dependency to clear.', {'snap': snapshot_name, 'vol': flexvol})
        raise exception.SnapshotIsBusy(snapshot_name=snapshot_name)