'Extend an existing volume to the new size.'

def extend_volume(self, volume, new_size):

    src_vol = self._get_volume(volume['name_id'])
    thin_provisioned = self._is_thin_provisioned(src_vol)
    self._client.expand_volume(src_vol['id'], new_size, thin_provisioned)
    if (not (thin_provisioned or src_vol.get('diskPool'))):
        def check_progress():
            (complete, actions, eta) = self._get_pool_operation_progress(src_vol['volumeGroupRef'], 'remappingDve')
            if complete:
                raise loopingcall.LoopingCallDone()
            else:
                LOG.info('Waiting    for    volume    expansion    of    %(vol)s    to    complete,    current    remaining    actions    are    %(action)s.    ETA:    %(eta)s    mins.', {'vol': volume['name_id'], 'action': ',    '.join(actions), 'eta': eta})
        checker = loopingcall.FixedIntervalLoopingCall(check_progress)
        checker.start(interval=self.SLEEP_SECS, initial_delay=self.SLEEP_SECS, stop_on_exception=True).wait()
