"""
machine = validation.Validate(username, state, machine_id=fields.getfirst('machine_id')).machine
- token = control.vnctoken(machine)
+ token = controls.vnctoken(machine)
host = controls.listHost(machine)
if host:
port = 10003 + [h.hostname for h in config.hosts].index(host)