

@atomic.action_timer('cinder.create_snapshot')
def _create_snapshot(self, volume_id, force=False, **kwargs):
    'Create one snapshot.\n\n        Returns when the snapshot is actually created and is in the "Available"\n        state.\n\n        :param volume_id: volume uuid for creating snapshot\n        :param force: flag to indicate whether to snapshot a volume even if\n                      it\'s attached to an instance\n        :param kwargs: Other optional parameters to initialize the volume\n        :returns: Created snapshot object\n        '
    kwargs['force'] = force
    client = cinder_wrapper.wrap(self._clients.cinder, self)
    snapshot = client.create_snapshot(volume_id, **kwargs)
    time.sleep(CONF.benchmark.cinder_volume_create_prepoll_delay)
    snapshot = bench_utils.wait_for(snapshot, ready_statuses=['available'], update_resource=bench_utils.get_from_manager(), timeout=CONF.benchmark.cinder_volume_create_timeout, check_interval=CONF.benchmark.cinder_volume_create_poll_interval)
    return snapshot

dataset/ETHPy150Open openstack/rally/rally/plugins/openstack/scenarios/cinder/utils.py CinderScenario._create_snapshot/original