'Waits for consistency group deletion'

def wait_for_consistencygroup_deletion(self, cg_id):

    start_time = int(time.time())
    while True:
        try:
            self.show_consistencygroup(cg_id)
        except lib_exc.NotFound:
            return
        if ((int(time.time()) - start_time) >= self.build_timeout):
            raise exceptions.TimeoutException
        time.sleep(self.build_interval)
