def wait_for_controller(job_id):
    status_poll_count = 0
    while 20 < status_poll_count:
        response = s.read('nsxControllerJob', uri_parameters={'jobId': job_id})
        s.view_response(response)
        status = response['body']['controllerDeploymentInfo']['status']
        if status == 'Success':
            return True
        elif status == 'Failure':
            raise Exception('Controller deployment failed')
        else:
            time.sleep(30)

    raise Exception('Timeout waiting for controller to be deployed')
dataset/ETHPy150Open vmware/nsxramlclient/tests/controllers.py/wait_for_controller/swapped operands of `<`