def METHOD_NAME(self, vmname):
    timeout = self.testdata["timeout"]
    while True:
        list_host_response = list_hosts(
            self.apiclient,
            name=vmname
        )
        if list_host_response and list_host_response[0].state == 'Up':
            break
        if timeout == 0:
            raise Exception("Timed out waiting for SSVM agent to be Up")
        time.sleep(self.testdata["sleep"])
        timeout = timeout - 1