def wait_for_volume_state(volume_manager, expected_volume, desired_state, transient_states=(), time_limit=CINDER_TIMEOUT):
 waiter = VolumeStateMonitor(volume_manager, expected_volume, desired_state, transient_states, time_limit)
 return poll_until(waiter.reached_desired_state, repeat(1))

def wait_for_volume_state ( volume_manager , expected_volume , desired_state , transient_states = ( ) , time_limit = CINDER_TIMEOUT ) : waiter = VolumeStateMonitor ( volume_manager , expected_volume , desired_state , transient_states , time_limit ) return poll_until ( waiter . reached_desired_state , repeat ( 1 ) )
wait for a volume with the same id as expected_volume to be listed and to have a status value of desired_state .