def METHOD_NAME(self, max_wait=30):
    r = 0
    prev_s = None
    while True:
        s = self.get_smf_status("network/routing-setup")
        if s == "online":
            break
        if s != prev_s or prev_s is None:
            self.log.info("waiting for network/routing-setup online state. current state: %s" % s)
        prev_s = s
        r += 1
        if r > max_wait:
            self.log.error("timeout waiting for network/routing-setup online state")
            break
        time.sleep(1)