def execute(self, server, config):
        nova = get_openstack_nova_client(config)
        cinder = get_openstack_cinder_client(config)
        for volume in nova.volumes.get_server_volumes(server.id):
            retries = 0
            while cinder.volumes.get(volume.id).status not in \
                    ('available', 'error'):
                logging.debug("...waiting for volume to be ready")
                time.sleep(5)
                retries += 1
                if retries > 30:
                    raise RuntimeError('Volume %s is stuck' % volume.id)

            try:
                cinder.volumes.delete(volume.id)
            except NotFound:
                pass